random cover of a range

Don nospam at nospam.com
Sat Feb 14 10:37:58 PST 2009


bearophile wrote:
> Jason House:
>> Believe it or not, that's an unreasonable requirement. IIRC, most RNG's have periods such as 2^32. You can't get more permutations than that. Somewhere in the ballpark of 17 elements, your requurement becones impossible to meet without a highly specialized RNG. I hope someone can prove me wrong about that!<
> 
> Mersenne Twister has a period much longer, if you want.
> For even longer permutations you have to generate them in a different way.
> 
> Bye,
> bearophile

I don't think the period of the generator is particularly important.
The problem is, it'd be pretty hard to get the required number of random 
seed bits.



More information about the Digitalmars-d mailing list