Put 23 strangers in a room and the odds that two of them share a birthday are already better than even — about 50.7%. Most people guess you'd need closer to 183, half of 365. The gap between that guess and reality is the famous birthday paradox, and it is not a trick of wording. It is a deep fact about how pairs grow.
You are not looking for someone with your birthday. You are looking for any matching pair, and the number of pairs among 23 people is — already more than the 365 days. Pairs, not people, drive the collision.
Replace "birthday" with "hash value" and "person" with "item," and you have one of the most important rules in computing: collisions in a space of size N start appearing not near N, but near the square root of N.
Comments
Loading comments...