🎂 The Birthday Paradox
Watch people fill day-of-year buckets one by one until two share a birthday, while a live probability curve explains why collisions arrive far sooner than intuition suggests.
People arrive one by one and are assigned a random bucket on a ring — a day of the year, or a hash digest slot. Watch how quickly two arrivals land in the same bucket, and see the live probability curve explain why.
🔬 What It Demonstrates
Collision probability grows with the number of pairs, not the number of people, so it rises far faster than intuition suggests — the same combinatorics that lets birthday-style attacks break undersized cryptographic hashes.
🎮 How to Use
Pick a preset (birthdays or a hash bit-width) or drag the bucket-count slider directly. Watch pillars fill and flash red on collision, then track the running average trial length against the √(πN/2) theoretical estimate.
💡 Did You Know?
With only 23 people in a room there's already a 50% chance two share a birthday — and the same math means a 128-bit hash only offers about 64 bits of real collision resistance.
Watch people fill day-of-year buckets one by one until two share a birthday, while a live probability curve explains why collisions arrive far sooner than intuition suggests.
3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install