Birthday puzzle

Apr 13, 2015 20:37

The Guardian posted a story in their science section today: Can you solve the maths question for Singapore schoolkids that went viral? The article generated thousands of comments; glancing at a few of them, people have suggested several different answers. So, I'll post my answer below, along with my explanation. If you want to figure it out on your own first, I suggest that you spend some time on that before you read the rest of this post.

The puzzle features Albert, Bernard, and Cheryl. I suppose this offers an alternative to Alice, Bob, and Carol who pop up in all the cryptography scenarios. However, I think that Cheryl is going out of her way to be awkward; that's not the best way to get birthday cards from your friends! I'm also not quite sure why this puzzle is treated as a Maths problem, because it seems to be more about general logic.

As a clue to the answer, this puzzle reminded me of an old joke:

3 logicians walk into a bar.
The bartender asks: "Do you all want a beer?"
The first person says: "I don't know."
The second person says: "I don't know."
The third person says: "Yes."

To understand that, you need to realise that each of the logicians is answering the question on behalf of the group. So, the first person says "I don't know" because they want a beer but they don't know what the other two want. The second person also says "I don't know"; they want a beer, and they can deduce that the first person does too, but they don't know about the third person. The third person says "Yes" because they can deduce that the first two people want beers and they also want one.

Moving onto the puzzle from Singapore, there are 10 possible dates for Cheryl's birthday; she has told Albert the month and Bernard the day. It's significant that some of the days appear multiple times while the 18th and 19th only appear once. That means that if she tells Bernard that she was born on the 18th then he'll immediately know that she was born on 18th June. Similarly, if she tells Bernard that she was born on the 19th then he'll immediately know that she was born on 19th May.

We have to assume that Albert is well aware of this, so it's also significant that he initially says: "I don't know when Cheryl's birthday is but I know that Bernard does not know too."

So, suppose that Cheryl told Albert "I was born in May". It's then possible that she was born on 19th May, and told Bernard "I was born on the 19th". BUT, if she did that then Bernard would know her full birthday (as I explained above). Similarly, suppose that Cheryl told Albert "I was born in June". It's possible that she was born on 18th June, in which case she'd tell Bernard "I was born on the 18th" and that would be enough for him to figure out her full birthday.

Albert stated categorically that Bernard doesn't know Cheryl's birthday. He didn't say that Bernard "might not know", he said (paraphrasing): "I know beyond a shadow of a doubt that Bernard is in the dark. There is no way that Bernard could possibly know when Cheryl was born."

That means that Cheryl can't have been born in May or June; she must have told Albert that she was born in July or August, because every day in those months is ambiguous. Specifically:

  • If she was born on 14th July, she told Bernard "I was born on the 14th." This could be 14th July or 14th August.
  • If she was born on 16th July, she told Bernard "I was born on the 16th." This could be 16th May or 16th July.
  • If she was born on 14th August, she told Bernard "I was born on the 14th." This could be 14th July or 14th August.
  • If she was born on 15th August, she told Bernard "I was born on the 15th." This could be 15th May or 15th August.
  • If she was born on 17th August, she told Bernard "I was born on the 17th." This could be 17th June or 17th August.

However, after Bernard hears Albert's comment, he has extra information. He then says: "I didn't know what Cheryl's birthday was before, but I do now." (I'm adjusting tenses from the original puzzle to make it clearer; I think a few things were lost in translation.)

Specifically, Bernard has done the same calculation that I did, and he knows that Cheryl must have told Albert either July or August. That eliminates a few possibilities. So, modifying the list above:

  • If she was born on 14th July, she told Bernard "I was born on the 14th." This could be 14th July or 14th August.
  • If she was born on 16th July, she told Bernard "I was born on the 16th." This could be 16th May or 16th July.
  • If she was born on 14th August, she told Bernard "I was born on the 14th." This could be 14th July or 14th August.
  • If she was born on 15th August, she told Bernard "I was born on the 15th." This could be 15th May or 15th August.
  • If she was born on 17th August, she told Bernard "I was born on the 17th." This could be 17th June or 17th August.

If Cheryl was born on the 14th then Bernard still wouldn't know her full birthday, but he says that he's figured it out. That means that she must have been born on either the 15th, 16th, or 17th.

Albert then says that he's figured it out too. In other words, Bernard's comment has given Albert extra information. Bear in mind that Albert already knows the month. If Cheryl was born in August, there are two dates which are equally plausible (15th and 17th), and there's no way for Albert to know which one is correct. However, if Cheryl was born in July then she must have been born on the 16th. So, that's the answer: 16th July.

Working through the puzzle again, Cheryl initially told Albert: "I was born in July." She also told Bernard: "I was born on the 16th."

At that point, Albert knows that there are 2 possible birthdays (14th July and 16th July), but he doesn't know which is which. He also knows that Bernard doesn't have enough information to figure out the birthday either, because 14th and 16th both appear in other months.

When Bernard hears Albert's comment, that gives him extra information. He knows that Cheryl must have told Albert either July or August, and she's already told him (Bernard) that she was born on the 16th, so that gives him the complete date: 16th July.

Albert can then also conclude that Cheryl was born on 16th July.

However, I've been discussing this on Facebook and one of my friends disagreed with me. So, a poll!

Poll Cynthia's birthday

logic, birthday, poll

Previous post Next post
Up