20.6 SignPerm

SignPerm( perm )

SignPerm returns the sign of the permutation perm.

The sign s of a permutation p is defined by s = prod_{i < j}{(i^p - j^p)} / prod_{i < j}{(i - j)}, where n is the largest point moved by p and i,j range over 1...n.

One can easily show that sign is equivalent to the determinant of the permutation matrix of perm. Thus it is obvious that the function sign is a homomorphism.

    gap> SignPerm( (1,2,3)(5,6) );
    -1 

Previous Up Top Next
Index

GAP 3.4.4
April 1997