muEC::SG::ListPerm – generates all permutations
computes the list of all permutations
Calls:
muEC::SG::ListPerm(l)
muEC::SG::ListPerm(n, <code>, <level>, <nb>, <type = lexic | cixel | vexillary | dominant | grassmannian>)
Parameters:
l: |
a list of values |
n: |
degree of a symmetric group (positive integer) |
Options:
code: |
codes instead of permutations |
level: |
by level in the permutohedron |
nb: |
only counts objects |
type = lexic | cixel | vexillary | dominant | grassmannian: |
See details |
Related Functions:
muEC::SG::GenPerm, muEC::TYP::IsPerm
Details:
The muEC::SG::ListPerm function generates permutations.
If the first argument is a list or a set l, it generates all distinct permutations of the elements of l.
If the first argument is an integer, say n, then the function returns the list of all permutations of the symmetric group of degree n. In this case, using n=0 is also allowed.
muEC::SG::ListPerm(n, lexic) or muEC::SG::ListPerm(n, cixel) returns all permutations in lexicographic or reverse lexicographic order.
muEC::SG::ListPerm(n, hold(level)) returns a list of lists. First list contains all permutations with 0 inversion, second one contains all permutations with 1 inversion, ..., last one contains all permutations with inversions.
muEC::SG::ListPerm(n, type), where type is either dominant, grassmannian or vexillary, returns the list of all dominant, grassmannian or vexillary permutations of the symmetric group of degree n. Vexillary permutations are generated using an algorithm due to J. West.
When the first argument is an integer, one can use another argument code, to produce Lehmer codes instead of permutations. When generating dominant permutations, it is faster to produce codes. One can also add the argument nb to count instead of producing permutations.
muEC::SG::ListPerm([1,1,3,3]);
muEC::SG::ListPerm(3, cixel);
muEC::SG::ListPerm(3, hold(level));
muEC::SG::ListPerm(3, hold(level), code);
muEC::SG::ListPerm(4, vexillary, nb);
muEC::SG::ListPerm(5, vexillary, nb, hold(level));
muEC::SG::ListPerm(5, nb, hold(level));