Brain Teasers and Puzzles

Same Birthday in Line

There is a long line of people waiting to see a new movie. They announce that the first person to have the same birthday as someone standing before them in the line gets to meet one of the actors in the movie.

What place in line would maximize your chances of winning? Assume birthdays are uniformly distributed through the year.


20th in line would maximize your chances

A bit of a brute force solution: inspect the probabilities starting from first place in line (either manually, using code, or using spreadsheet software). Let Pn be the probability that the nth in line wins:

  • P1 = 0
    • Because they have no one to share a birthday with
  • P2 = 1 / 365 ≈ 0.00274
  • P3 = (1 – P1 – P2) * (2 / 365) ≈ 0.00546
    • First have to consider that #1 and 2 didn’t already win. Then multiply by 2 / 365 because now we know they must have distinct birthdays
  • P4 = (1 – P1 – P2 – P3) * (3 / 365) ≈ 0.00815
  • P19 ≈ 0.3221
  • P20 ≈ 0.3232
  • P21 ≈ 0.3201

You will notice that probabilities increase until 20th in line, and then decrease thereafter.

For a more elegant algebraic solution, you can check out the problem on Math StackExchange.

2 replies on “Same Birthday in Line”

Leave a Reply

Your email address will not be published. Required fields are marked *