SG::Desc2ListPerm
--
generates all permutations with a given descent set
SG::Desc2ListPerm(desc,n)
desc | - | any list of positive integer |
n | - | degree of a symmetric group (positive integer) |
The SG::Desc2ListPerm
function generates all permutations having a given
descent set desc
.
The result is a list of permutations in lexicographic order.
>> muEC::SG::Desc2ListPerm( [1,2,4], 5 );
[[3, 2, 1, 5, 4], [4, 2, 1, 5, 3], [4, 3, 1, 5, 2], [4, 3, 2, 5, 1], [5, 2, 1, 4, 3], [5, 3, 1, 4, 2], [5, 3, 2, 4, 1], [5, 4, 1, 3, 2], [5, 4, 2, 3, 1]]
MuPAD Combinat, an open source algebraic combinatorics package