On 11/17/16 6:10 AM, R Smith wrote:

On 2016/11/17 10:48 AM, J Decker wrote:
https://en.wikipedia.org/wiki/Birthday_problem

/.../
one duplicate. In other words, only after generating 1 billion UUIDs every
second for the next 100 years, the probability of creating just one
duplicate would be about 50%.

All correct, but sounding misleading... Your phrase tends to sound like "Only after 1 billion UUIDs / sec for 100 years do I have a 50% chance of getting a single duplicate...".
I think you miss the math. After 100 Years of generating a Billion UUIDs/sec, we have generated a rough order of 3x10^18 UUIDs, or about 2^62 UUIDs. We have 2^128 possible UUIDs, so we are no where near 50% chance of a duplicate for each one, and the 50% chance quoted was the chance that in that 3x10^18 UUIDs created, there is one pair of duplicates. (I haven't done the math to verify that number, but it is about right, we have used about 1/2 the bits, which about the point you expect the first duplicate)


--
Richard Damon

_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to