Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

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

by tye (Sage)
on Apr 01, 2012 at 04:03 UTC ( #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
Node Status?
node history
Node Type: note [id://962829]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (7)
As of 2020-11-27 21:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?