ACE BN BNA CG CLG COMP FM FREE HEKA IDCA NCA NCSF PART SFA SG SGA SP SYMF TAB TYP

FUNCTION: Perm2Length - calculate the length of a permutation

CALLING SEQUENCE:

Perm2Length(perm)
SG[Perm2Length](perm)

PARAMETERS:

perm = any list denoting a permutation

SYNOPSIS:

EXAMPLES:


> with(SG):
> perm:=[5,3,2,1,4]:
> Perm2Length(perm);
 
                                       7
 
> Perm2Rd(perm);
 
                              [4, 3, 2, 1, 3, 2, 3]
 
> Perm2Code(perm);
                                [4, 2, 1, 0, 0]
 

SEE ALSO: Perm2Code Perm2Rd