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...".
The real story is: "After creating that amount of UUIDs, I have a 50%
for every next UUID I make to be a duplicate..." - Which basically
means, Uniqueness expectation is destroyed by that time, and in fact,
long before that time.
What further is misleading, is that Loooooong before then, you will have
a decent chance of getting duplicate UUIDs, 1%, or even 0.0001% chance
happens billions of iterations sooner (which is already horribly bad for
the standard programming project, meaning you'd have to actively test
uniqueness long before this).
And even if the chance is 0.0000001% - there is no guarantee that any
next UUID is unique - in fact, it is guaranteed that by a 1 in 100
million chance, it won't be unique (so if you make 100 million UUIDs,
not an uncommon amount, it will hit a duplicate). It's like the Lotto
analogy: There is an extremely small chance for you to win the lotto
(IIRC 1 in 14 mil or so), yet every week or so, someone wins it...
Don't confuse low probability with likelihood of an event - the
population size dictates it.
Reminds me of this satire exchange between a probability theory
professor and a student (I am doing this from memory, so might get it
wrong, feel free to post the original if known):
Student: So, if I toss this coin ten times, It will land heads up five
times?
Professor: Probably.
Student: But it will definitely get heads at least once right?
Professor: Probably.
Student: But surely it won't land tails every time?
Professor: Probably not.
etc.
https://www.noisebridge.net/images/b/be/Conditional_risk.png
http://withfriendship.com/images/e/21237/probability-theory.gif
and...
http://xkcd.com/552/
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users