Re: A birthday puzzle
You are looking for:
P(No Birthday Found Before Me)*P(Someone's Birthday In Line is the same as mine | Unique Birthdays)
Call them 1-f(n) and g(n).
g(n) is easy, its (n-1)/365, where n is your position in line.
f(n) is a little more tricky, in essence, its "a birthday matched before me, or everyone before me is unique, and I match".
So f(n) = f(n-1) + (1-(f(n-1))*g(n).
These can be calculated out.
So the max of (1-f(n))*g(n) occurs when n = 20, so when there are 19 people in front of you.
|