[Q]:Generate Unique ID's

Lulu of the Lotus-Eaters mertz at gnosis.cx
Sat May 24 03:52:49 EDT 2003


Paul Rubin <http://phr.cx@NOSPAM.invalid> wrote previously:
|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).

--
Keeping medicines from the bloodstreams of the sick; food from the bellies
of the hungry; books from the hands of the uneducated; technology from the
underdeveloped; and putting advocates of freedom in prisons.  Intellectual
property is to the 21st century what the slave trade was to the 16th.





More information about the Python-list mailing list