Live data from Hacker News

When Is Cheryl's Birthday?

nbviewer.ipython.org

21–30 of 136 posts

Re: When Is Cheryl's Birthday?

#21
post #2

I thought this was a great puzzle when I first saw it. IMHO, it is more satisfying to "think through it" without paper and pencil, since it is relatively simple to resolve. The Python solution proposed is really great, in that it captures both the expressive and functional spirit of the language.

>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 thing that trips up most people as well.

After eliminating May and June because they have unique days, which is obvious, I got stuck trying to figure out how Albert would be able to figure out the date after knowing that Bernard now knows the date. So I got stuck on July 16, Aug. 15 and Aug. 17 for a while, because I could not figure out how Albert would know the date if he was told August as the month. It took me a few minutes (ok, like 5 or so, more then I care to admit to my self I suppose :) ) to figure out that my job wasn't to figure out how Albert new, but rather to figure out what the answer was IF Albert now knew the answer.

From that it's pretty easy, but it's the perspective that trips most people up.

Re: When Is Cheryl's Birthday?

#23

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.

The problem isn't difficult without programming. It's the programming that's elegant because it's an interesting way to solve the program, by expressing their statements as functions and using the know and tell functions. It's actually really great how the logic was translated in code, almost like a direct translation from English to Python. Now that I know how to write the program, if the puzzle were to get rapidly more complex, say with 20 different statements of moderate complexity, I feel confident I could solve it with a program whereas I might struggle with pencil and paper.

Re: When Is Cheryl's Birthday?

#24
Could one use Julia instead of Python?

"iPython" already supports Haskell and Julia kernels too. A iPython Javascript kernel would also make sense given its popularity and its functional inspired syntax.

Re: When Is Cheryl's Birthday?

#25
post #12

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...

There are some great examples among the comments of people vehemently defending their provably false beliefs.

There are great examples of that in every comment thread ever.

Re: When Is Cheryl's Birthday?

#26
post #2

I thought this was a great puzzle when I first saw it. IMHO, it is more satisfying to "think through it" without paper and pencil, since it is relatively simple to resolve. The Python solution proposed is really great, in that it captures both the expressive and functional spirit of the language.

>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...

This reminds me of the Blue/Brown eyed villager puzzle.

The trick is in figuring out what additional information is actually being added by whatever subsequent statements are being made.

It's weird. I usually have a lot of trouble with mathematical word puzzles. Particularly probability. But logic puzzles almost always seem to be pretty easy for me.

Now if you want a really fucking hard one, try your hand at this: http://en.wikipedia.org/wiki/The_Hardest_Logic_Puzzle_Ever

Re: When Is Cheryl's Birthday?

#27
post #2

I thought this was a great puzzle when I first saw it. IMHO, it is more satisfying to "think through it" without paper and pencil, since it is relatively simple to resolve. The Python solution proposed is really great, in that it captures both the expressive and functional spirit of the language.

>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...

[deleted]

Re: When Is Cheryl's Birthday?

#28
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…

[deleted]
Post reply on HN