From the Python documentation for random.shuffle, which takes a list and randomizes the order if its elements:
Note that for even relatively small len (x) the total number of permutations x is greater than the period of most random numbers generators; this means that most permutations of a long sequence can never be generated.
Is this true for any language since the constraint seems dependent on a random number generator? Is it possible to write a function that can generate any possible permutation of an arbitrarily long list?
Colin source
share