Generating a unique identifier

Steve Holden steve at holdenweb.com
Fri Sep 7 22:36:27 EDT 2007


Paul Rubin wrote:
> Paul Rubin <http://phr.cx@NOSPAM.invalid> writes:
>> the probability is about exp(-(2**60 / 2*2**160)) = 1/exp(2**101)
> 
> Bah.  Got that backwards and calculated wrong.  The probability of no
> collisions is
> 
>     exp(-(2**60) / (2*2**160)) = exp(-(2**-101)) = approx (1 - 2**-101)
> 
> which is very close to 1.  The probability of collision is about
> 2**-101 which is close to 0.  Proofread first, then post.  I keep
> getting that in the wrong order. 

Right. The words "birthday attack" should have been in the back of your 
mind while you were writing that message.

regards
  Steve
-- 
Steve Holden        +1 571 484 6266   +1 800 494 3119
Holden Web LLC/Ltd           http://www.holdenweb.com
Skype: holdenweb      http://del.icio.us/steve.holden
--------------- Asciimercial ------------------
Get on the web: Blog, lens and tag the Internet
Many services currently offer free registration
----------- Thank You for Reading -------------




More information about the Python-list mailing list