muEC::SG::RandPerm – random permutation
returns a random permutation
Call:
muEC::SG::RandPerm(n, <type = grassmannian | dominant>)
Parameters:
n: |
degree of a symmetric group (positive integer) |
Options:
type = grassmannian | dominant: |
particular permutations (see details). |
Related Functions:
Details:
The muEC::SG::RandPerm function generates a random permutation belonging to the symmetric group of degree n.
muEC::SG::RandPerm(n, dominant) returns a random dominant permutation.
muEC::SG::RandPerm(n, grassmannian) returns a random grassmannian permutation.
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]