Sign

<text size="0.8em">Working with numbers? See sign (arithmetic) </text>

Returns the sign or parity of a permutation. It can be defined as the parity of pairs of elements x,y such that x<y and σ(x)>σ(y). Thus, the sign is +1 is σ is even or -1 if it is odd. Alternatively, the sign of a permutation can be defined from its decomposition into the product of transpositions as (-1)m, where m is the number of transpositions in the decomposition (although such decomposition is not unique, the parity is an invariant).

Syntax

sign(Permutation)

Description

Given a permutation, returns its sign.

arithmetic.sign_permutations.calc.png