SG::RandPerm --
returns a random permutation
Call(s)
SG::RandPerm(n <,type>)
Parametersn | - | degree of a symmetric group (positive integer) |
Optionstype=dominant,grassmannian | - |
IntroductionThe SG::RandPerm function generates a random permutation
belonging to the symmetric group of degree n.
returns a random dominant permutation.
SG::RandPerm(n, dominant)
returns a random grassmannian permutation.
SG::RandPerm(n, grassmannian)
Example 1>> muEC::SG::RandPerm( 7 );
[7, 4, 2, 3, 5, 1, 6]
>> muEC::SG::RandPerm( 20, dominant );
[14, 11, 10, 12, 9, 6, 7, 5, 3, 4, 2, 8, 13, 15, 1, 16, 17,
18, 19]
>> muEC::SG::Perm2Code( % );
[13, 10, 9, 9, 8, 5, 5, 4, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0]
Related FunctionsMuPAD Combinat, an open source algebraic combinatorics package