Comment

Comment by waynecochran

> Yes. I started writing my test program to see if hash > collisions actually happen - and are not just a theoretical construct.

This should be no surprise. The birthday paradox, as Knuth points in in TAoCP, makes it clear why collisions happen. Given 23 people in a room, there is a greater that 50% chance that at least two have the same birthday.

Placing only 23 keys into a hash table with 365 entries with a perfectly random hash function will probably result in at least one collision.

parent waynecochran 13 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton