Cultish birthday puzzle

212 Views Asked by At

I was asked the following puzzle recently which I couldn't see how to solve.

A particular cult wants to find a group of people all of whom have different birthdays for some mysterious ceremony they are about to hold. However all they require in order to be quorate is to have in this group one person whose birthday is on Christmas day and one whose birthday is on the day Easter Sunday falls this year. They invite people into a room with $10$ chairs one at a time. If the person who comes in has the same birthday as anyone else in the room (not including the hosts) they are told to sit down. Otherwise they stay in the room standing up as part of the selected group. What are the chances they can get their group before all the chairs are full?

1

There are 1 best solutions below

3
On BEST ANSWER

Let $p(n,d,k)$ be the probability of succeding if the starting position is a group of $n$ standing people (with different birthdays), $d$ chairs still available and $k$ special dates still needed to cover. By convention, $p(n,d,k)=0$ if $d<0$.

We are looking for $p(0,d,2)$.

Clearly, $p(n,d,0)=1$ for any $n,d\ge0$.

To compoute $p(n,d,k)$ for $n,d\ge 0$, $k>0$, note that the next candidate hits one of the special days with $\frac k{365}$, needs a chair with $\frac n{365}$ and increases the group otherwise. Therefore, $$ p(n,d,k) = \frac k{365}p(n+1,d,k-1) + \frac n{365}p(n,d-1,k) + \frac{365-k-n}{365}p(n+1,d,k).$$ This allows us to compute the values recursively (note that one never needs to compute cases with $n+k>365$).

EDIT: Some specific value: $p(0,10,2)\approx 0.050811782658608833417260473067490416381$