Shuffling Caveats

Posted by Beetle B. on Wed 06 August 2014

When using a random number generator for shuffling, be wary of simple issues. Using cards as an example:

  1. If the seed is 32 bits, you’ll get at most \(2^{32}\) permutations, which is much less than \(52!\) for a uniform shuffling of a deck of cards.
  2. If your seed uses the clock, that may reduce the number of permutations even further.