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

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

Description

Every permutation can be written as a product of transpositions. One definition for the sign of a permutation $p$ is $1$ if it can be written as a product of an even number of transpositions and is $-1$ if it can be written as an odd number of transpositions.

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

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

o1 : Permutation
i2 : sign p

o2 = -1

See also

Ways to use this method:


The source of this document is in Permutations/Documentation/mainDocs.m2:679:0.