Wednesday, May 20, 2015

The Viral Math Problem (Cheryl's Birthday) Explained

You might have heard of the rather popular math problem floating around the internet recently, and though it is known under many names, it is agreeable to say that it is a nice brain teaser. In this post, we'll look at Cheryl's Birthday problem and how to come up with the correct solution!



The infamous Cheryl.
Above is an image of the Facebook post that started this mess. Cheryl ambiguously lists some possible dates for her birthday, and tells Albert only the month, and tells Bernard only the day. After a peculiar three-line dialogue, they both come to know her birthday. How is this possible? It's a simple logic problem, really, so we need to break it down step-by-step.
First, let's organize the list of months and days in a chart. This will make it easier to read and observe what could be going on.

With the dates and months organized this way, we can now proceed with reading the seemingly worthless conversation. At first, Albert, who has only the month information, states that he does not know when the birthday is. This means nothing.
He then states that Bernard does not know, either. Okay, this is interesting. Let's take a look at our chart. If the day of the month of Cheryl's birthday was 18 or 19, Bernard would be off the hook! If he had either of those two days, there is only one possibility for month, and he would know the birthday right off the bat. Since Albert said that Bernard does not know the birthday with the current day that Bernard has, we can quickly eliminate those two dates, leaving our chart in this state:
The next item in the dialogue is Bernard's statement. He says that initially, given the date he got from Cheryl, he did not know the birthday. Now, from Albert's information (what is on our chart now), he knows when the birthday is. Why? Bernard knows that Albert only has the month, and he certainly could not eliminate the 18th or 19th if he had May or June, so both those months can be eliminated as possibilities. If we take those months off, we take away three more dates, and are left with this:
This makes things interesting. If we investigate Bernard's statement further, we have to ask how he is sure he has the correct month. Looking at our chart, Bernard only knows the day, so it can be 14, 15, 16, or 17. If Bernard had the 14th as the day, he could not know the correct month because there's two possibilities for 14, so it could not have been the 14th! We can update our chart:
The final statement will wrap this problem up for us. Albert says that now (given the above chart, essentially), he knows the birthday of Cheryl as well. How can he be so sure? Recall that Albert only has month information. If we have deduced the possibilities to these three, we must examine the month possibilities. July and August are left. July has one possible day, and August has two. In order for Albert to be 100% sure he has the correct day, he had to have been told "July" by Cheryl. That is the only month left with only one day as its possibility.
If Bernard were told 16, he would have thought the month could be either May or July. Since Albert helped eliminate May and June, the only possibility became July.

Cheryl's birthday is July 16th.
Important Readings, Further Explanations, and Resources