Live data from Hacker News

When Is Cheryl's Birthday?

nbviewer.ipython.org

11–20 of 136 posts

Re: When Is Cheryl's Birthday?

#11
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 comment is, in itself, a description of the issue it raises. Simple is an ambiguous term, and you are using it to describe a different aspect of the problem to the parent (you are both right).

Re: When Is Cheryl's Birthday?

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

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

Re: When Is Cheryl's Birthday?

#13
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?"

Re: When Is Cheryl's Birthday?

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

Bike shedding, layman version.

Re: When Is Cheryl's Birthday?

#15
1. HN comment about some aspect of fizzbuzz or whatever. Not how to solve fizzbuzz or whatever; rather, some insight into how people solve problems, which is the interesting part of the question. 2. Two dozen oblivious nerds tell u how to do it in 20 characters of perl

Re: When Is Cheryl's Birthday?

#16
post #10

still looking for solution using RDF/OWL logical reasoning... the python solution is neat, but i have a feeling that there are tools that are more native to these kind of problems than general purpose programming language.

Epistemic logic would probably be the appropriate tool; at least that's what I thought when I first saw the problem. Epistemic logic is the logic of knowledge and belief: you use a modal operator to express the knowledge of an agent about a certain statement. The statement could be expressed in propositional or first-order logic depending on the expressiveness required (but of course there is a complexity trade-off).

Translating roughly from the problem statement (x being the variable holding Cheryl's birthday):

Not(Know_Albert(x)) and Know_Albert(Not(Know_Bernard(x) etc.

Semantically, the possible birthdays correspond to the possible worlds. A reasoner would be able to solve this by process of elimination, somewhat similarly to a constraint-solver.

Resources:

Wikipedia entry on Epistemic Logic: http://en.wikipedia.org/wiki/Epistemic_modal_logic

Fagin, Ronald; Halpern, Joseph; Moses, Yoram; Vardi, Moshe (2003). Reasoning about Knowledge: http://www.amazon.com/Reasoning-About-Knowledge-Ronald-Fagin...

I haven't read the entire book, but the first couple of chapters give you an idea and some great examples not too different from this puzzle.

Re: When Is Cheryl's Birthday?

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

Re: When Is Cheryl's Birthday?

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

It is a simple logic problem, simpler than the vast majority of logic puzzles. The fact that an enormous number of people in the developed world have poor logical reasoning skills is an entirely separate issue.
Post reply on HN