Live data from Hacker News

When Is Cheryl's Birthday?

nbviewer.ipython.org

51–60 of 136 posts

Re: When Is Cheryl's Birthday?

#51
post #40

Maybe I'm missing something, but the "hard" part of this problem is figuring on the trick. Once you know that, it becomes relatively easy – and you can't use a program to figure out the trick.

Which part is the trick? It all seems very straightforward to me.

It took me a bit to figure out that the third statement was meant to be Albert expressing his confidence that Bernard didn't know the answer and not Albert inducing from Bernard's silence that Bernard didn't know the answer. The latter implies something like the Python code below, which will end up giving August 17th as an answer instead:

  def statement3(date):
    possible_dates = tell(Month(date))
    return (not know(possible_dates)
      and not know(filter(lambda x : not know(x), 
        [tell(Day(d)) for d in possible_dates])))

Re: When Is Cheryl's Birthday?

#52
The problem with this problem, the way it was originally put, was the utterly confusing English masked into a logic problem.

Write your specifications clearly, and then it does not become an internationally shared 'problem' to solve.

[I work with insanely documented specifications just like this, year after year. Not putting a problem clearly is not something to aspire to.]

Re: When Is Cheryl's Birthday?

#53
post #46

Earlier quoted context omitted.

Its understanding what the question actually means when it says things like 'Bernard: At first I don't know when Cheryl's birthday is, but I know now.' ... this is actually a cryptic coding of the rules of the puzzle. If you properly understand those rules and convert them to code (as in the OP) then searching the possible answers for a match is trivial.

Why do you say that is cryptic? I can't think of a clearer or plainer way to express that fact.

For me the confusing part was when Albert knew that Bernard didn't know. I initially thought that he inferred this from Bernard telling him.

Re: When Is Cheryl's Birthday?

#54

Earlier quoted context omitted.

These are actually valid questions and you shouldn't be downvoted. The standard interpretation of the problem is highly questionable; Albert's initial remark is not actually dispositive to Bernhard, because if Bernhard had the 19 May date he would know the correct answer immediately without needing Albert to say anything. The suggestion that Albert's first statement necessarily eliminates all dates in May is false, a…

can you make your whole comment more explicit, I don't follow your objection.

[deleted]

Re: When Is Cheryl's Birthday?

#55

Earlier quoted context omitted.

can you make your whole comment more explicit, I don't follow your objection.

Let's consider the question: 1. "Why did Albert speak first?" Before we answer this, we need to develop a set of assumptions to operate under. Given the synthetic nature of the problem, we might assume that both Albert and Bernard are of equal ability, and able to make logical inferences based on reasonable assumptions. We'll also assume that both Albert and Bernard are only going to announce the binary state of each…

Albert speaks first because he's Albert! They're obviously just going alphabetically.

Maybe my other comment was right and they should have been called Alice, Bob, and Carol.

The way I read the question, it's as though a moderator said: "Albert, tell me what's on your mind." "Bernard?" "Albert?"

I will add that #4 should certainly be in the past tense ("at first I didn't know") because this way Albert and Bernard are in on the fact that they're part of a logical puzzle!! They should not know that they are characters in a puzzle.

This is how I read the puzzle:

Moderator to Albert: tell the reader what you know.

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

Moderator to Bernard: And you, Bernard?

Bernard: At first in this puzzle I don't know when Cheryl's birthday is (before Albert spoke), but now that you have asked Albert, and I've heard his response, I've figured it out.

Moderator to Albert: And any thoughts from you, now that Bernard has figured it out?

Albert: Yes. Given the information Bernard has now stated, I would say I also know Cheryl's birthday now.

Re: When Is Cheryl's Birthday?

#57
post #21

Earlier quoted context omitted.

>since it is relatively simple to solve You are overestimating how simple it is.There are more than 1200 comments on the solution on the NYTimes[1] almost all of them arguing that other dates are correct. [1] http://www.nytimes.com/2015/04/15/science/answer-to-the-sing...

I have to admit, it took me more than 5 minutes to figure this one out, so if this was a test problem, I probably failed. Maybe I am not as smart as I think, but it's probably not as simple as people, including other comments to this post, make it out to be. The trick to the problem is pretty obvious right away, but what tripped me is improper perspective. Reading the comments on NY Times, I think this is the same th…

It wouldn't have taken you so long if you had've just been doing logic in a classroom. This isn't a puzzle that was sprung on the students by surprise; it was part of their course.

Re: When Is Cheryl's Birthday?

#58
post #47

Earlier quoted context omitted.

The trick is to take it at face value and not question how they know, but what the answer has to be assuming they do know.

Assuming that the problem is posed and understood as an artificial puzzle (rather than a real scenario with real people), what reason would there be to question how they know? Of course you're supposed to assume they know. It's a puzzle, and someone is telling you precisely what you're to assume.

On the contrary, there are many unspoken things one must assume to solve this puzzle "correctly"; that Albert and Bernard are rational, honest, cooperating, and have a certain penchant for communicating novel inferences they make instead of just blurting out "we don't know" out of boredom, laziness, or frustration.

Re: When Is Cheryl's Birthday?

#59

Earlier quoted context omitted.

Let's consider the question: 1. "Why did Albert speak first?" Before we answer this, we need to develop a set of assumptions to operate under. Given the synthetic nature of the problem, we might assume that both Albert and Bernard are of equal ability, and able to make logical inferences based on reasonable assumptions. We'll also assume that both Albert and Bernard are only going to announce the binary state of each…

Albert speaks first because he's Albert! They're obviously just going alphabetically. Maybe my other comment was right and they should have been called Alice, Bob, and Carol. The way I read the question, it's as though a moderator said: "Albert, tell me what's on your mind." "Bernard?" "Albert?" I will add that #4 should certainly be in the past tense ("at first I didn't know") because this way Albert and Bernard are…

I believe assuming they are "just going alphabetically" and/or that there is some sort of implicit moderator managing the conversation qualify as non-obvious assumptions.

Re: When Is Cheryl's Birthday?

#60

Unfortunately, there are a number of rather curious, and culturally specific, assumptions one must make about the problem. The real puzzles are: 1. "Why did Albert speak first?" 2. "Why did he speak in such cryptic language?"

Maybe I'm missing something, but we know exactly what Bernard would have said first from statement 2.

He says, "At first I didn't know", so all he could have said if he had spoken first would have been "I don't know when the birthday is". Then Albert would have said, "I don't know when the birthday is, and I knew that Bernard couldn't have".

So the problem is unchanged regardless of who speaks first.

It also doesn't seem that cryptic to me... It doesn't take that much reading between the lines to understand the statement "at first I didn't know, but I know now" to mean "the information that Albert just provided gives me enough information to determine the birthday"...

Post reply on HN