Many of you have undoubtedly heard by now the math puzzle about Cheryl’s birthday which has been sweeping across the internet. I appeared on CNN on Wednesday to explain the solution — here is a link to the problem and my explanation. Since that appearance, I’ve received dozens of emails about the problem and/or my explanation of it. I thought I’d share a few of my thoughts following this flurry of activity.

**The problem**

First, let’s recall the statement of the problem (translated into proper English as in the New York Times):

Albert and Bernard have just met Cheryl and want to know when her birthday is.

Cheryl says “I’m not going to tell you, but I’ll give you some clues.” She writes down a list of 10 dates:

May 15, May 16, May 19

June 17, June 18

July 14, July 16

August 14, August 15, August 17

“My birthday is one of these,” she says.

Then Cheryl whispers in Albert’s ear the month of her birthday. To Bernard, she whispers the day.

Albert and Bernard think for a minute and the following dialogue ensues:

Albert:I don’t know when Cheryl’s birthday is, but I know that Bernard doesn’t know either.

Bernard:I didn’t know Cheryl’s birthday at first, but now I do.

Albert:Well, now I know, too!When is Cheryl’s birthday?

**A solution**

**Spoiler Alert:** If you haven’t already tried to solve the problem, stop reading now and give it a try! You’ll get much more out of the comments below that way.

Here’s a quick overview of the solution I explained on CNN (with a few more details — I was limited to two minutes and was not given time to prepare a script!):

- In Albert’s first statement, the fact that he’s sure that Bernard does not know Cheryl’s birthday means that her birthday cannot be May 19th or June 18th (because there is only one 18 in Cheryl’s list, and only one 19).
- We can deduce even more from Albert’s first statement, though: Cheryl’s birthday cannot be in May or June at all! For example, consider the scenario where Albert has been told that Cheryl’s birthday is in May. In this case — assuming that Albert and Bernard are both perfectly rational — before Albert made his first remark he would have to have considered the possibility that Bernard had been told the number 19. And in that hypothetical scenario, Albert would know that Bernard must know Cheryl’s birthday. So Albert would not have been able to assert with certainty that Bernard does not know Cheryl’s birthday. Therefore
**Albert could****not have been told that Cheryl’s birthday is in May.**For similar reasons (with 19 replaced by 18), Albert could not have been told that Cheryl’s birthday is in June. And*both Albert and Bernard know this*, since they are completely logical people. - Having eliminated May and June as possibilities, from Bernard’s statement we deduce that Cheryl’s birthday cannot be on the 14th. For if Bernard had been told the number 14, he would have no way of knowing at this point whether Cheryl’s birthday is in July or August. But Bernard says he knows her birthday now. We are thus left with just three possibilities: August 15, July 16, and August 17.
- Albert’s second statement rules out August, since if Albert had been told August he would have no way of knowing whether Cheryl’s birthday was the 15th or the 17th. But he says that he now knows her birthday. The only remaining possibility is the answer to the problem: Cheryl was born on July 16th.

From the numerous emails I’ve received, it’s clear that the step where we eliminate May and June (the second bullet point above) is the hardest and most hotly debated aspect of the puzzle. It’s too bad that I didn’t have time to explain this step in more detail in the video I made. I hope the above explanation makes it clearer how we are able to rule out these possibilities…

**The Meta-Cheryl Challenge
**

Before discussing the original Cheryl puzzle further, here’s an interesting twist.** **Design a logic puzzle which fits the following outline and has a unique solution:

Albert and Bernard have just met Cheryl and want to know when her birthday is.

Cheryl says “I’m not going to tell you, but I’ll give you some clues.” She writes down a list of dates…

[

Come up with a list that will make the rest of the problem work!]“My birthday is one of these,” she says.

Then Cheryl whispers in Albert’s ear the month of her birthday. To Bernard, she whispers the day.

Albert and Bernard think for a minute and the following dialogue ensues:

Albert:I don’t know when Cheryl’s birthday is.

Bernard:I knew that you didn’t know.

Albert:I still don’t know.

Bernard:I didn’t know before you said that, but I know now.

Albert:In that case, I know too.When is Cheryl’s birthday?

**Note added April 20, 2015**: I revised the original Meta-Cheryl Challenge to make it a little more interesting.

Post your solutions in the comments section!

**An alternate solution?**

When I explained the solution to Cheryl’s birthday problem on CNN, I didn’t see how anyone could argue with the logic I used. But yesterday a very smart attorney friend of mine sent me the following justification for how he came up with a different answer:

*Consider the hypothetical wherein C’s birthday indeed happens to be August 17, so A knows only “August,” and B knows only “17.” Now let’s follow the logical sequence of the statements that A and B make (for this hypothetical):*

*At the very outset, A would know for certain that B couldn’t know which month it is (because each of the three possible days in August — namely 14,15, or 17 — occurs in two possible months. So, no matter which of the three it is, B won’t know at this point. Thus A can truthfully and confidently make his opening statement.**B, already knowing “17”, narrows it down to either June 17 or August 17 (the only two possible alternatives). Once B hears A’s first statement, B (being rational) reasons that A must have ruled out both May 19 and June 18 (because if it had been either, B would have known Cheryl’s birthday for certain since 18 and 19 are single occurrence “day numbers.” Now B further reasons that A, having reasoned this, must also have eliminated June 17 (because, once June 18 had been eliminated, there’s only one June date left, and if June had been the correct month known to A, A would have known Cheryl’s birthday). Since the first part of A’s statement declares that A doesn’t yet know Cheryl’s birthday, B reasons that June 17 is out. And once June 17 is out, B then can rationally conclude the answer is August 17, since that’s the only “17” left. So B can make his statement that now he knows.**When A hears B declare that he (B) knows, A reasons that the only day that would allow B to “know” would be 17, so A now also knows that Cheryl’s birthday is August 17.*

Here’s what I wrote back:

*If B is completely rational, i.e. he considers every possible month that A could be thinking of and rules out each one which is made logically impossible by A’s first utterance, then B will rule out more than just May 19 and June 18. He will rule out the entire months of May and June [see my reasoning above].*

*I agree that I haven’t yet shown what’s wrong with your hypothetical scenario; I’ve only shown that there is more information which B can glean from A’s first assertion than you’re admitting.*

*You write “…if June had been the correct month known to A, A would have known the full birthday… but since the first part of A’s statement declares that A doesn’t yet know it, B reasons that June 17 is out.” As I explained above, we can indeed rule out June 17 as a possibility. But it doesn’t make sense to me for B to rule out June 17 without also ruling out*

**all other dates**in May and June. Otherwise B is applying “partial logic”, which does indeed wreak havoc with the problem.

*What your analysis points out is that the problem breaks down if we only use*

**certain**logical conclusions and not**all**logical conclusions. The problem is delicate in this way. Defining in a precise way what the initial conditions really are, and what the “reasonable” assumptions are which the reader should make, is tricky. (I think this is a big part of why this problem has become so popular.)

*The basic ground rule which I consider implicit in this problem is that we as readers are supposed to assume that at each moment in time, A and B consider every hypothetical combination of months and days and then they rule out every scenario that is logically inconsistent with the current set of facts. If they only rule out certain logically consistent scenarios and not others, the problem does not work, despite the fact that they haven’t made any incorrect logical deductions. So while your deductions are not incorrect, it seems to me that you are nevertheless violating the spirit of the problem by not making other logical deductions as well.*

As a mathematician I don’t find my friend’s solution logically compelling, but I do think it illustrates how this problem is actually quite a bit more subtle than one might at first imagine. If we assume that at every stage of the problem both A and B rule out every scenario that is logically inconsistent with the current set of known facts, then July 16 is the unique solution. But if we drop this assumption, the puzzle might not have a well-defined answer.

Curiously, I independently received the exact same solution from someone else, and he was also an attorney. I may be over-generalizing here, but perhaps the assumptions which a mathematician is likely to make in thinking about a puzzle like this are different in some fundamental way from the assumptions which a lawyer is likely to make.

*Insert your favorite joke about mathematicians and/or lawyers here.*

**Some earlier puzzles of this sort**

As I mentioned above, this sort of logic puzzle is hardly new. The Dutch mathematician Hans Freudenthal published a puzzle in 1969 which was popularized by (who else?) Martin Gardner in the December 1979 issue of Scientific American. Gardner’s version, which he dubbed “the impossible problem”, is as follows:

Two numbers (not necessarily different) are chosen from the range of positive integers greater than 1 and not greater than 20. Only the sum of the two numbers is given to mathematician S. Only the product of the two is given to mathematician P. On the telephone S says to P “There is no way that you can determine my sum right now”. An hour later P calls him back to say “I know your sum”. Later S calls P again to report “Now I know your product”. What are the two numbers?

**Note added April 19, 2015**: I just learned that Martin Gardner’s version of the problem is indeed impossible(!), at least with the standard assumptions that a mathematician is likely to make given the setup. Gardner wrote in a postscript to his March 1980 column: “As hundreds of readers have pointed out, the ‘impossible problem’ given in this department for December turned out… to contain an error in its solution.” Here is an entire article about this issue, which presents a solution to Gardner’s original puzzle using what appears to me to be a rather dubious interpretation of the initial conditions. Let’s be frank: Gardner goofed. The original Frudenthal problem had the upper bound of 100 instead of 20, and the unique solution is that the two numbers are 4 and 13. Gardner was presumably trying to simplify the arduous case analysis needed to check that (4,13) is the only solution by noting that both solutions are less than 20. However, despite the fact that the solutions are less than 20, the problem does not work if we change the upper bound to 20. See if you can figure out why.

Keith Conrad informed me that a similar puzzle appeared much earlier, in 1948, in the Problems section of the American Math Monthly. The proposer was Lester Ford (of Ford circles fame):

**Some more logic puzzles (for those who dig this sort of thing!**)

The following two puzzles are adapted from Raymond Smullyan’s wonderful “What is the Name of this Book?”.

1. Once upon a time I visited an island inhabited only by knights (who always tell the truth) and knaves (who always lie). I came across two inhabitants resting under a tree. I asked one of them “Is either of you a knight”? He responded (with either a yes or a no), and I knew the answer to my question. Is the person to whom I addressed my question a knight or a knave, and what is the other one?

2. I wanted to know the answer to the Great Question “Why is there something instead of nothing?”, so I went to the two High Priests of the island. They made the following statements:

*First Priest:* I am a knave, and I don’t know why there is something instead of nothing.

*Second Priest:* I am a knight, and I don’t know why there is something instead of nothing.

Then one of the two High Priests, who did in fact know the answer to the Great Question, said “There is something instead of nothing.”

What did I conclude from all of this?

Our third and final puzzle is adapted from Peter Winkler’s book “Mathematical Mind-Benders”.

3. Suppose that you visit a (different) island and come across three natives, one each from a tribe of knights, a tribe of knaves, and a tribe of natterers (who answer every question randomly). You do not know which native is from which tribe. There are two boxes in front of you, and you know that one is full of gold and the other is full of poisonous gas, but you don’t know which is which. You are permitted to ask two yes-or-no questions, each question being directed to just one of the three natives. How can you get the information you need to open the correct box?

Solutions (to these problems as well as the Meta-Cheryl Challenge) will appear on my blog in one week.

**Coda: Reflections on sociology and mathematics**

As an educator I think it’s important to think about why people find Cheryl’s birthday problem so appealing. This genre of logic puzzles is quite old, and there are many similar problems out there. What is it about this particular problem that has captured the imagination of internet users around the globe? Perhaps there’s an embedded lesson that mathematicians can take home about how to make our subject more interesting to the masses… Based on the conversations and email exchanges that I’ve had, here are some aspects of this puzzle which people find attractive:

1. **The problem seems impossible and/or impenetrable at first glance.**

At a gut-check level it does not “feel like” Albert and Bernard’s remarks contain enough information to determine Cheryl’s birthday. Their remarks also appear rather cryptic at first glance, which helps mask their logical information content. The grammatical errors in the original formulation of the problem (which is from a Singapore high school Math Olympiad) also help obscure the content of Albert and Bernard’s statements! From a math competition point of view this is rather unfortunate, but I think it helps heat up some of the kitchen-table debates.

2. **The puzzle is quite hard for the average person, but solvable without any special knowledge.**

Unlike many challenging math puzzles, which often require at least some rudimentary algebra or geometry, this problem does not even involve arithmetic — it is pure logic. The key logical step is subtle, but it doesn’t rely on anything that most people would think of as “mathematics”.

3. **The underlying assumptions of the puzzle are not clearly stated.**

This makes it slightly problematic as a formal math problem, but great as a vehicle for finding something to argue with your friends and colleagues about. Are we supposed to assume that Albert and Bernard are “perfectly rational”? What does that actually mean?

4. **It is possible for an intelligent person to get a different answer from the “official” one without making any false deductions.**

This probably only affects a tiny percentage of people who think about the problem, but for me at least it’s what seems most interesting about the problem from a mathematical /pedagogical point of view.

5. **The statement of the problem lends itself to humorous quips which help alleviate the “sting” of not being able to solve it.**

I think one of the reasons some people don’t like mathematics, or claim not to, is that they feel embarrassed or belittled when an authority figure tells them that their answer is wrong. It’s often psychologically helpful to have an “out” other than “well I never was good at math…” With Cheryl’s Birthday, people who don’t manage to solve the problem can still make clever comments on social media and laugh at what their friends say (see item #7 below).

6. **The problem comes from a country with strict rules whose kids have a reputation for being good at math.**

I don’t think one should ignore the “Asia versus the U.S.” cultural aspect when trying to understand the problem’s popularity. The New York Times wrote: “Originally, Mr. Kong [the television host in Singapore who originally posted the problem] said this was a problem inflicted on fifth-graders, leading to hand-wringing that Singapore children were way better at math than everyone else in the world and worries that Singapore children were being mentally abused with convoluted logic at a young age. It turned out the problem actually came from a math olympiad test for math-savvy high school-age students. How would you fare in a room full of adolescent math competitors in Singapore?”

And last, but not least:

7. **The framing of the problem exudes sexual tension and plays into cultural stereotypes.**

My explanation of the problem aired on three different news shows, and every single anchor joked in one way or another about how Cheryl is being rather high-maintenance. At CNN.com they put it this way: “[The reader is given] enough clues to eliminate nine of the 10 dates and discover Cheryl’s birthday. That’s assuming you want to celebrate with Cheryl after she’s put you through all that trouble.” We leave the New Yorker’s take on the subject as the last word:

I believe the mathematical foundation of all these puzzles is called “Common Knowledge Theory”: http://en.wikipedia.org/wiki/Common_knowledge_%28logic%29

Thanks, Farbod — I didn’t know about that.

I just learned that Martin Gardner’s version of “The Impossible Problem” is indeed impossible(!), at least with the standard assumptions that a mathematician is likely to make given the setup. I have made some changes to the post as a result.

Actually, I believe, the August 17 solution is logically invalid.

The problem is on the line

“Now B further reasons that A, having reasoned this, must also have eliminated June 17 (because, once June 18 had been eliminated, there’s only one June date left, and if June had been the correct month known to A, A would have known Cheryl’s birthday). Since the first part of A’s statement declares that A doesn’t yet know Cheryl’s birthday, B reasons that June 17 is out.”

According to this reasoning, A is ruling out dates based purely on A’s own statements! B has not said anything at this point, so A does not know anything that he did not know at the start!

Consider the evidence available to A, which is just the month. A then makes a statement based on knowing the month. _B_ rules out June 18 on the basis of A’s statement. A already knows that it either is or isn’t June because C told him.

The attorney seems to have mixed up who is inferring what.

I agree that this reasoning is difficult to grasp and I can see why you want to label it “logically invalid”. But I still think that the main point is what I wrote in my post: the problem doesn’t work unless we use *all* possible inferences, not just some. B *can* rule out June 17 at the stage you’re analyzing, so in that sense my friend’s logic is OK. It’s just that B can rule out even more, namely the entire months of May and June!

Pingback: Post-Cherylmania wrap-up | Matt Baker's Math Blog

I was about to leave a reply about the solution here being wrong because of the May and June removal bit not being allowed, but as I was writing my reply I realized I had the names crossed in the conversation… I had assumed Albert was told the day, not the month! Interesting that the exact same conversation text has a different unique answer (June 17th) if you switch the speakers in the conversation.

So, if in the future if anyone comes shouting at you that you’re wrong and the answer is June 17th, they probably got the names mixed up 🙂