SG::Code2Perm --
calculates a permutation from its code
Call(s)
SG::Code2Perm(code <,n>)
Parameterscode | - | a list denoting the code of a permutation |
n | - | the degree of a symmetric group |
IntroductionThe SG::Code2Perm function calculates a permutation from its
Lehmer code.
Let [c1, c2, ...] be the code of
perm, then ci is equal to the number of
indices j>i such that
perm[j]<perm[i].
The argument n specifies the degree of the symmetric
group.
Example 1>> muEC::SG::Code2Perm( [2,4,0,1] );
[3, 6, 1, 4, 2, 5]
>> muEC::SG::Code2Perm( [2,4,0,1], 8 );
[3, 6, 1, 4, 2, 5, 7, 8]
Related FunctionsMuPAD Combinat, an open source algebraic combinatorics package