A random permutation of distinct elements is a permutation
chosen uniformly from the
permutations of those elements. Common algorithms for constructing
random permutations include sorting the elements using independent random real numbers
as keys and the in-place Fisher-Yates shuffle
(Skiena 1990).
A random permutation on the integers can be implemented in the Wolfram
Language as RandomSample[Range[n]].
A random permutation in the permutation graph pg
can be computed using RandomPermutation[pg],
and
such random permutations by RandomPermutation[pg,
n].
random permutations in the symmetric group of
order
can be computed using RandomPermutation[d,
n].
There are an average of permutation inversions
in a permutation on
elements (Skiena 1990, p. 29). The expected number of
permutation cycles of length 1 in a random permutation over the symmetric group
is 1.