7 ms·
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
by gkoberger 12y ago
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.
- jrpt 12y agoThe 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.
- logicallee 12y agoI don't know, can code like this reason about knowledge-about-knowledge in general? For example, can a version of the code be used to solve the 'hardest puzzle' - https://xkcd.com/blue_eyes.html https://xkcd.com/blue_eyes.html (solution: https://xkcd.com/solution.html https://xkcd.com/solution.html) ?
- vacri 12y agoI find the problems with puzzles like these is not the rules, but the ridiculously contrived situations. Why do these entities that function like inert logic gates have to be human? It means that the question has to have silly rule placed on silly rule in order to keep the contrived situation afloat. It means I end up thinking of ways for the mute, inert people to free themselves from the island (who is feeding them? Are there trees to build a raft? etc), rather than 'play by the rules'.
- anon4 12y agoSentient immortal mute beings of pure logic that do not possess the capability of traversing the ocean are people too! I get your point. Still, it's hard to define the puzzle in terms of not-people. Maybe you could call them intelligent robots -- people might find it easier to picture mute robots with hats.
- malisper 12y agoIt can. If you know someone else doesn't know, that just gives you more knowledge you yourself can use. For the "hardest puzzle", on each day everyone learns that no one was able to figure out the solution the day before. Because of this, a person knows that for a possible number of blue-eyed people to be valid, a person who sees one less blue eyed person than that, must have been unable to figure it out on the previous day. An Arc/Common Lisp solution I just wrote up: https://gist.github.com/malisper/80625bcda75c66780f81 https://gist.github.com/malisper/80625bcda75c66780f81
- logicallee 12y agoI don't have Lisp, can you link to a pastebin e.g. at https://ideone.com/ https://ideone.com/ that runs it?
- brownbat 12y agoNot to be confused with the "Hardest Logic Puzzle Ever," about identifying a truth telling god, a lying god, and a random oracle, none of whom even speak your language. http://en.wikipedia.org/wiki/The_Hardest_Logic_Puzzle_Ever http://en.wikipedia.org/wiki/The_Hardest_Logic_Puzzle_Ever
- baddox 12y agoWhich part is the trick? It all seems very straightforward to me.
- codeulike 12y agoIts 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.
- baddox 12y agoWhy do you say that is cryptic? I can't think of a clearer or plainer way to express that fact.
- codeulike 12y agoTrust me, its cryptic to most people, and that's why this puzzle has gone viral round the world in an omg-singapore-schoolkids-can-do-this-insane-puzzle kind of way.
- baddox 12y agoWhy do you suspect the crypticness of the puzzle's language is the problem, rather than the fact that a large portion of people haven't studied basic logic and are thus unable to complete basic logic puzzles?
- codeulike 12y agoFirstly, someone reading the puzzle needs to grok that some of the day-numbers are unique across the months (e.g 18) and some are not (14). Then they need to grasp the basic dynamic on the situation, e.g. that if Cheryl's birthday had been May 19 then Bernard would have known straight away. If you dont initially grasp the above then Albert's initial declaration "I don't know when Cheryl's birthday is" just seems to be a redundant statement that doesn't offer any information. And thats just the first hurdle of the puzzle. A lot of people hate maths-questions-stated-as-stories, even simple ones ("There are several chickens and rabbits in a cage (with no other types of animals). There are 72 heads and 200 feet inside the cage. How many chickens are there, and how many rabbits?" etc etc) so to people like that, this Cheryl-birthday problem initialy presents as hopelessly cryptic.
- userbinator 12y agoThe "hard" part of any programming problem is to figure out what the program has to do. The machine can't tell you the correct answer without you giving it the correct instructions.