[Q]:Generate Unique ID's
Paul Rubin
http
Sat May 24 05:50:40 EDT 2003
Lulu of the Lotus-Eaters <mertz at gnosis.cx> writes:
> |No, absolutely not. If there's only 2^32 states in the RNG you can
> |expect to see duplicate UUID's after 2^16 rn's or so. It's the same
> |principle as the "birthday paradox"
>
> This is almost surely wrong. Or at least if the discussion is still
> about PSEUDO random number generators (maybe I lost the thread, and
> Rubin moved to discussing a 32-bit hard random source). Since a PRNG is
> a deterministic iteration of an algorithm, if some state N is the same
> as state M, then state N+1 is also the same as M+1. Therefore, if N and
> M are seperated by only 2^16, then the cycle of the PRNG is ipso facto
> <= 2^16 (there's no room for 2^32 states then, reductio ad absurdum).
Sorry, I don't mean 2^16 consecutive rn's from the same generator.
It's a distributed application, these rn's will be coming from all
over, etc.
More information about the Python-list
mailing list