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

FUNCTION: Perm2ListInv - calculate the set of inversions of a permutation

CALLING SEQUENCE:

Perm2ListInv(perm)
SG[Perm2ListInv](perm)

PARAMETERS:

perm = any list denoting a permutation

SYNOPSIS:

EXAMPLES:


> with(SG):
> Perm2ListInv(Perm2Inv([4,1,3,2]));
 
                       [{1, 4}, {2, 3}, {2, 4}, {3, 4}]
 
> Perm2ListInv([4,1,3,2]);
 
                      [{1, 2}, {1, 3}, {1, 4}, {3, 4}]
 

SEE ALSO: Perm2Inv Perm2Length