Skip to content
DenseChip
Learn
PracticeCode labInterview

DenseChip

Navigate

Menu

LearnPracticeCode labInterview

Tools

All toolsSV editorCode repoResume
DenseChip

Practice, courses, and chip-design tools in one focused workspace.

LearnPracticeCode labInterviewToolsLearning paths

© 2026 DenseChip

AboutRoadmapCareersInternshipsFAQContactPrivacyTerms
Skip to lesson

Course contents

  • How to Use This Puzzle Bank
  • SystemVerilog Language Puzzles25
  • Difficulty Guide
  • Full Topic Map
  • Interview-Day Tips
  • Study Route: One Week Before the Interview
  • Study Route: Two Weeks
  • Study Route: Four Weeks (Full Course)4
  • OOP & Testbench Puzzles25
  • Concurrency & Timing Puzzles25
  • Randomization & Constraint Puzzles25
  • SVA Assertion Puzzles25
  • Functional Coverage Puzzles25
  • Logic & Aptitude Puzzles25
    • Classic Brain Teasers
    • Probability Puzzles
      • Biased Coin to Fair Bit (Von Neumann)
      • Expected Tosses Until First HH
      • Two Children, At Least One Boy
      • Monty Hall Switching Odds
      • Birthday Collision Threshold
      • Bayes on Failing Test Alerts
    • Digital Logic Puzzles
    • Debugging Riddles
    • Logic & Aptitude Puzzles: Tricky Q&A
  • Scenario & Debug Puzzles25
  • UVM Testbench Puzzles25
  • Clock, Reset & CDC Puzzles25
  • Bus and Interface Protocol Puzzles25
  • Interview Prep: Puzzle Rounds7
  • DV Puzzle Cheatsheet
Loading lesson

←Probability Puzzles
  1. Topics
  2. DV Interview Puzzles
  3. Logic & Aptitude Puzzles
  4. Probability Puzzles
  5. Birthday Collision Threshold
On this page

    VLSI DV Interview PuzzlesAll levels

    Birthday Collision Threshold

    How many people are needed so that probability of at least one shared birthday exceeds 50%? Ignore leap years and assume uniform birthdays.

    Puzzle

    Difficulty: Medium · Puzzle 5 of 6 · Topic: Probability Puzzles

    How many people are needed so that probability of at least one shared birthday exceeds 50%? Ignore leap years and assume uniform birthdays.

    Hint

    Compute complement first: all birthdays distinct.

    Step-by-step solution

    Diagram
    1) For n people, P(no match) = product_{k=0 to n-1} (365-k)/365.
    2) P(at least one match) = 1 - P(no match).
    3) Evaluate around n=23: P(no match) approx 0.4927.
    4) So P(match) approx 1 - 0.4927 = 0.5073.
    5) At n=22 this value is still below 0.5, so threshold is 23.

    Answer

    Answer: 23 people are needed for probability > 50% of a shared birthday.

    How this was checked

    Checked by running a model of the rule in a Python model. A computational check: the exact product formula gives 0.4757 at 22 people and 0.5073 at 23, so 23 is the threshold; 57 people reach 99% (P(56) = 0.988).

    Why candidates get it wrong

    Linear intuition ('365/2 = 183 people'): the number of pairs grows as n(n-1)/2, so by n=23 there are 253 pairs, each a 1/365 chance.

    Interviewer follow-up

    Approximate n for 99% collision probability. Model answer: n = 57 (P(57) = 0.990, P(56) = 0.988). The rule of thumb n ~ sqrt(2*365*ln(1/(1-P))) gives about 58, a slight overestimate of the exact 57.

    Say it out loud

    It's easier to compute the chance of no shared birthday, which is the product of 365 minus k over 365 for k from zero to n minus one. At 23 people that product is about 0.4927, so the chance of a match is about 0.507, just over half. At 22 people it is still below half, so the threshold is 23. The trap is linear intuition like 183 people; what grows is the number of pairs, and 23 people already have 253 pairs.

    Related topics

    • Back to Probability Puzzles

    • Logic & Aptitude Puzzles section

    Previous

    171 / 293

    Next: Bayes on Failing Test Alerts

    Up next

    Up nextBayes on Failing Test Alerts

    Sign in to save progress

    Practice this lessonPrevious lessonReport an error

    See also

    • Biased Coin to Fair Bit (Von Neumann)
    • Expected Tosses Until First HH
    • Two Children, At Least One Boy