|
SOLUTIONS
|
BUILT-IN MATHEMATICA SYMBOL
RandomPermutation
RandomPermutation[gr]
gives a pseudorandom permutation in the permutation group gr.
RandomPermutation[gr, n]
gives a list of n pseudorandom permutations in the permutation group gr.
DetailsDetails
- Permutations are returned with uniform distribution in the given group.
- The result is given in disjoint cyclic form, with head Cycles.
- RandomPermutation[d] and RandomPermutation[d, n] return permutations in the symmetric group of degree d.
- RandomPermutation gives a different sequence of pseudorandom permutations whenever you run Mathematica. You can start with a particular seed using SeedRandom.
- A Method option to SeedRandom can be given to specify the pseudorandom generator used.
New in 8
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »

