Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: [OT] The statistics of hashing. (birthday)

by tye (Sage)
on Apr 01, 2012 at 04:03 UTC ( [id://962829]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    Bits Collision
    set  odds (2**32 bits)
    ...
    1e4    1.16%
    1e5   68.8%
    1e6  100% (to about 50 digits of accuracy)
    
  2. or download this
    use Math::BigApprox 'c';
    my $bits = 2**32;
    my $inserts = 1e5;
    print 1-(c($bits-$inserts)^c($bits-1))/c($bits)**$inserts, $/;
    
  3. or download this
    Odds  Inserts
    ----  -------
    ...
     50%  ~65e6
     90%  ~83e6
     99%  ~96e6
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://962829]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (5)
As of 2024-03-28 15:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found