Collision Bounds Beyond the Birthday Problem
Generalizing the birthday problem's surprising math, how few draws it takes before two land in the same bucket, to unequal bucket sizes and to 'how many draws for a triple match,' the versions interviewers actually push toward.
Prerequisites: The Birthday Problem
The problem. The birthday problem's headline result, 23 people are enough for a better-than-even chance two share a birthday, is well known enough that interviewers now push past it. Two natural follow-ups: what if the "days" aren't equally likely (real birthdays cluster around September)? And what does it take to get a triple match, not just a pair?
Recap: why 23 is the surprising answer
With people and equally likely days, the trick is to compute the complement, the probability of no shared birthday, because that's a clean product: . Each new person must avoid all previously claimed days. At , this product drops just below , so just exceeds 50%. The reason 23 feels too small is that people intuit "how many people to match me specifically" (that needs ), not "how many people for any pair", the number of pairs among 23 people is , and it's that count of pairs, each a small chance of matching, that drives the surprising result.
The no-match probability in the birthday problem falls off roughly like as grows, an exponential decay in the square of . Drag the rate on the curve above to get a feel for how sharply an exponential can fall once its exponent starts growing, which is exactly why the crossover to "more likely than not" happens at a surprisingly small rather than something closer to .
Extension 1: unequal bucket probabilities make collisions more likely, not less
If birthdays aren't uniform, some days are more popular, the true collision probability is always at least as large as the uniform case, for the same . Intuition: uniform is the "hardest" case to get a match, because spreading days out evenly minimizes the chance of overlap; any clustering (some days more popular than others) only concentrates people onto fewer effective buckets and makes matches more likely. This is a general fact about balls into bins, an uneven distribution over bins never decreases collision probability compared to the uniform distribution over the same number of bins.
Worked example: probability of a triple match
What's the smallest such that the probability three people share a birthday exceeds 50%? This doesn't have the same clean complement trick, since "no triple match" still allows pairs to match. The standard approach approximates via expected number of triples: the number of triples among people is , and each specific triple shares a birthday with probability (fix the first person's birthday, the other two must match it). Expected number of triple-matches . Setting this near 1 (a rough threshold for "likely to see at least one") gives , so , which solves to roughly . The known precise answer is for exceeding 50%, the rough count-matching approximation lands impressively close, which is itself a useful interview technique when an exact recursive computation isn't practical by hand.
The general technique: complement for pairs, expected-count for anything harder
For "probability of any pair matching," always reach for , since the no-match event has a clean multiplicative form. For anything beyond a simple pair, triples, unequal bucket sizes, or generalized "-collision" questions, the no-match complement usually stops being a clean product, and the practical fallback is the expected-number-of-matches approximation: compute via indicators, and use (or simply check where crosses over) as a workable estimate under interview time pressure.
The birthday problem's surprising smallness (n=23) comes from counting pairs, not people, grows quadratically in . Uneven bucket probabilities only increase collision probability versus the uniform case, and harder collision questions (triples, k-way matches) are best attacked with expected-count approximations rather than trying to extend the exact complement trick.
Don't try to force the "" trick onto triple-match or unequal-probability variants, the complement of "no triple match" doesn't factor as a clean product the way "no pair match" does, and forcing it leads to an intractable calculation under time pressure. Switch to expected-count reasoning instead.
Discussion
💡 Discussion rules
- Ask and answer about this concept. Off-topic gets removed.
- No homework dumps. Show what you tried first.
- Corrections are welcome. Cite a source when you claim an error.
Loading discussion…
Related concepts
- The Coupon-Collector Problem
- Symmetry Shortcuts for Draws Without Replacement
- First-Return Probabilities of a Random Walk
- The Chance That Random Points Fit in a Semicircle
- The Arcsine Law: Who Leads a Coin-Flip Race
- How Long the Gambler's Ruin Game Lasts
- Expected Maximum of n Uniform Draws
- The Hat-Check Problem and Expected Fixed Points
Practice in interviews
Further reading
- Grinstead & Snell, Introduction to Probability, ch. 3