# Cheryl and her annoying birthday

Remember the 1st Singaporean problem that went viral? Try this!

Albert and Bernard just became friends with Cheryl, and they want to know when her birthday is. Cheryl gives them two unknowns: $$M$$ and $$D.$$

$$M$$ is the month of Cheryl's birthday (1-12).

$$D$$ is the day of Cheryl's birthday.

Cheryl then tells Albert the sum $$M+D$$ and she tells Bernard the product $$M \times D$$.

So they strike a conversation.

Albert: "I don't know when Cheryl's birthday is, but I know that Bernard does not know too."

Bernard: "I could not figure out when Cheryl's birthday is, but I can now."

Albert: "Then I also figured out when Cheryl's birthday is.".

What is the earliest Cheryl's birthday could be?

February 13

A brute-force explanation:

For Albert not to immediately know Cheryl's birthday, then $A = M+D$ cannot be 2, 42, or 43, because there are unique dates that form these sums (1/1, 12/30, 12/31). $A$ can be anything between 3 and 41.

For Bernard not to immediately know Cheryl's birthday, then there must be multiple possible dates that form the product $B = M \times D$. The possibilities are:

2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16, 18, 20, 21, 22, 24, 25, 26, 27, 28, 30, 32, 33, 35, 36, 40, 42, 44, 45, 48, 50, 52, 54, 55, 56, 60, 63, 64, 66, 70, 72, 75, 77, 78, 80, 81, 84, 88, 90, 96, 99, 100, 104, 105, 108, 110, 112, 120, 126, 130, 132, 135, 140, 144, 150, 154, 156, 160, 162, 168, 176, 180, 189, 192, 198, 200, 210, 216, 220, 240, 252, 264, 270, 300.

For Albert to know that Bernard doesn't know, then any pair of positive integers that adds up to $A$ must have a product that falls into this ambiguous set. This limits $A$ to the set {3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 17}.

For this to give Bernard enough information, then knowing this constraint on $A$ must now make the product $B$ unique. So $B$ has to be either 25 (5/5), 26 (2/13), or 52 (4/13). Albert know knows Cheryl's birthday based on whether his number is 10, 15, or 17.

I think it is the

13th of February

Reasoning:

I eliminated any day/month combinations that have a unique product. For each sum D+M that Albert could know, there are up to 12 possible days. If Albert is sure that Bernard does not know, then NONE of those 12 possible days can have a unique product. This reduces the possibilities further. Once Bernard is aware of Albert's statement, he too can narrow down the possibilities in the same way. Now, he says he knows the birthday, which means that now in the reduced set of possibilities, the product must be unique. There are three options: 13th Feb, 3rd March and 13th April. The earliest of these is 13th Feb.

• It was not a very elegant solution though, essentially just brute force. I would be interested to know if there is a more elegant path to the solution. – user2390246 Mar 26 '16 at 18:58
• 13*2 = 26 is easy to solve for Bernard ! – Fabich Mar 26 '16 at 22:28
• No, it could also be 26*1 – user2390246 Mar 26 '16 at 22:58
• Yes sorry, there was an error in my reasoning ! there are three possibilities ! – Fabich Mar 26 '16 at 23:19

It is the

05/05 or 13/02 or 13/04

Explanations :

$D+M=2$ is obviously impossible.
If $D+M>18$, there is a chance that $D=17 /19/23 /29 /31$ and in this case $D*M$ is easy to identify for Bernard (all the possible value of D*M are unique values), but remember that Bernard can't find without clue !
$D+M=14$ is impossible because if $D=13$ and $M=1$ then $D*M=13$ is a unique value for Bernard.
$D+M=16$ is impossible because if $D=13$ and $M=3$ then $D*M=39$ is a unique value for Bernard.
After Albert first talk, we already know a lot : I colored in yellow all impossible values :
Among the white remaining possibilities, there are three unique value :
25 (05/05)
26 (13/02)
52 (13/04)
Because the corresponding values for Albert are unique (10, 15, 17), we can not guess the exact date but Albert can.