Macaulay2 » Documentation
Packages » Permutations :: descents
next | previous | forward | backward | up | index | toc

descents -- computes the descents of a permutation

Description

A permutation $p=(p_1 \, \dots \, p_n)$ has a descent at $i$ (for $i < n$) if $p(i) > p(i+1)$.

i1 : p = permutation {3,1,2,5,4}

o1 = Permutation{3, 1, 2, 5, 4}

o1 : Permutation
i2 : descents p

o2 = {1, 4}

o2 : List

See also

Ways to use descents:

  • descents(Permutation)

For the programmer

The object descents is a method function.


The source of this document is in /build/reproducible-path/macaulay2-1.25.05+ds/M2/Macaulay2/packages/Permutations/Documentation/mainDocs.m2:187:0.