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

sign -- computes the sign of a permutation

Synopsis

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 sign:

For the programmer

The object sign is a method function.