I have looked into the Knuth collection shuffle algorithm with pseudorandom number generators. They say that a PRNG with a seed state of $19937$ bits (like one of the Mersenne Twisters) can shuffle a collection up to $2080$ with equal probability.
I made the calculations. Given a list of $2080$ elements, I calculated that I needed at least:
$$ \lceil \log_2 2080! \rceil $$
bits in the seed state to be able to shuffle the list with a chance of getting any possible combination. (it yields $19933$)
I'd like to reverse this function. That is, given a PRNG with $n$ bits of seed, what is the maximum size of the list I can shuffle without the PRN cycle being to short to encode all possible combinations of the sequence? Is there another way than setting up a table of the factorials and perform a lookup?
http://math.stackexchange.com/questions/61755/is-there-a-way-to-solve-for-an-unknown-in-a-factorial http://math.stackexchange.com/questions/18362/is-there-an-inverse-gamma-gamma-1-z-function
– Servaes Jun 05 '14 at 12:29