muEC::SG::Perm2ListInv – The inversions of a permutation

computes the set of inversions of a permutation.

→ Examples

Call:

muEC::SG::Perm2ListInv(perm)

Parameters:

perm

any list denoting a permutation

Related Functions:

muEC::SG::Perm2Length

Details:

The muEC::SG::Perm2ListInv function calculates the list of all inversions of a permutation. The result is in lexicographic ordering.

The set of inversions is a set of pairs of positions math such that math and math.

Example 1:

muEC::SG::Perm2ListInv( [4,1,3,2] );

math