SG::Code2Perm
--
calculates a permutation from its code
SG::Code2Perm(code <,n>)
code | - | a list denoting the code of a permutation |
n | - | the degree of a symmetric group |
The 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.
>> 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]
MuPAD Combinat, an open source algebraic combinatorics package