Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Let's consider a hash table with an allocation of 1MB, which is about 2^20 bytes. Assume also that each entry occupies a byte. Assuming that the hash function's values are distributed randomly, the probability of there being a collision with only 1000 entries is approximately 38% = 1-(2^20)!/(2^20 - 1000)!/(2^20)^1000. See the "Birthday Problem".


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: