Macaulay2 » Documentation
Packages » Permutations :: length(Permutation)
next | previous | forward | backward | up | index | toc

length(Permutation) -- computes the length of a permutation

Description

The length of a permutation is the size of its inversion set.

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

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

o1 : Permutation
i2 : length p

o2 = 3

See also

Ways to use this method:


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