muEC::SG::Perm2Length – calculates the length of a permutation

The muEC::SG::Perm2Length function calculates the length of the permutation perm, that is its number of inversions. This is also the minimal length of an expression of the permutation as a product of simple transpositions, as well as the sum of the components of its code.

→ Examples

Call:

muEC::SG::Perm2Length(perm)

Parameters:

perm

any list denoting a permutation

Related Functions:

muEC::SG::Perm2Code, muEC::SG::Perm2Rd

Example 1:

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

math

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

math

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

math