FUNCTION: Perm2CycleType - compute the cycle type of a permutation
CALLING SEQUENCE:
- Perm2CycleType(perm)
- SG[Perm2CycleType](perm)
-
PARAMETERS:
- perm = any list denoting a permutation
SYNOPSIS:
- The Perm2CycleType function calculates the cycle type of the permutation
perm.
- A permutation can be expressed as a product of disjoint cycles. The
corresponding partition is obtained by listing in weakly decreasing
order the lengths of these cycles.
- Whenever there is a conflict between the function name Perm2CycleType
and another name used in the same session, use the long form
SG['Perm2CycleType'].
EXAMPLES:
> with(SG):
> p:=[7,1,3,6,5,4,2]:
> Perm2CycleType(p);
[3, 2, 1, 1]
> Perm2Cycle(p);
[[1, 7, 2], [4, 6]]
SEE ALSO: Cycle2Perm Perm2Cycle