Skip to content

Instantly share code, notes, and snippets.

@elenzil
Last active August 29, 2015 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elenzil/5c52eccc33c7f8616755 to your computer and use it in GitHub Desktop.
Save elenzil/5c52eccc33c7f8616755 to your computer and use it in GitHub Desktop.
orion's solution to cheryl's birthday
this is the puzzle: http://www.techworm.net/2015/04/when-the-hell-is-cheryls-birthday-a-math-problem-from-singapore-goes-viral.html
first, the puzzle is a little weird because it doesn't explain how Albert knows Bernard does not know.
but ignoring that, or assuming that before Albert spoke, Bernard said "I do not know".
it's also not explicit about who knows which:
I make the assumption that Albert knows the month and Bernard knows the day number.
Albert knows Bernard does not know, which means it's not one of the day numbers which occur only once,
which means it's not May 19 or June 18.
However, knowing it's not May 19 or June 18 still isn't enough info, and Albert says so.
Bernard then reasons that this means it's also not June 17,
because if it were, then Albert would know the complete Date.
But now Bernard knows the date! All the remaining day numbers occur more than once except for August 17,
therefore because Bernard knows, now we also know, and it is August 17.
@bioball
Copy link

bioball commented Apr 20, 2015

Hm.. I think the first part of the problem is figuring out who knows the date, and who knows the month. I think we can deduce that Albert knows the date, because there's knows there's two unique dates in there, and he says that he knows Bernard doesn't know when the birthday is. It's the only way one of them can safely know that the other person doesn't know Cheryl's birthday

@bioball
Copy link

bioball commented Apr 20, 2015

Also, Cheryl needs to stop being such a punk!

@saurabhgupta1
Copy link

I don't see any issues with the puzzle.

  • Albert knows the month and Bernard knows the date.
  • Albert knows that Bernard does not know because the month is one that does not have a unique date. So the month can't be May or June - because May has 19th and June has 18th
  • Bernard now knows the answer. So it means the date can't be 14th since 14 is in both July and August. The date is one of July 16, August 15, or August 17
  • Albert now knows the answer too. So the month has to be July and not August. So the answer is July 16

@elenzil
Copy link
Author

elenzil commented Apr 22, 2015

Hm, yes.
I assumed that Albert was told that Bernard did not know,
which only lets me eliminate May 19 and June 18.
Without that assumption, then Albert has deduced that Bernard did not know,
which lets you eliminate all of May and June.
The rest follows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment