The Hardest Logic Puzzle Ever

Lecture



«The Hardest Logic Puzzle Ever» (Italian: L'indovinello più difficile del mondo) is the name of a logic problem proposed by the American philosopher and logician George Boolos in the Italian newspaper La Repubblica in 1992:

There are three gods: A, B, and C, who are the gods of truth, lies, and chance, in some order. The god of truth always speaks truly, the god of lies always lies, and the god of chance either tells the truth or lies, which is determined by chance. It is required to determine the gods by asking 3 questions that can be answered «yes» or «no». Each question is put to only one god, but more than one question may be put to the same god. The gods understand the language but answer in their own language, in which there are 2 words, «da» and «ja», and it is not known which word means «yes» and which means «no».

Boolos also clarifies some points of the problem:

Boolos also clarifies some points of the problem:

  • It is permitted to ask a single god more than one question (and consequently possible that other gods are not asked any questions at all).
  • What the next question is, and to which god it is put, may depend on the answer to the previous question.
  • The god of chance answers randomly, depending on a coin flip hidden in his mind: if it comes up heads, he answers truthfully, if tails, he lies.
  • The god of chance answers «da» or «ja» to any question that can be answered «yes» or «no».

Other comments:

  • You cannot ask «paradoxical» questions, for which the answer could be either «da» and «ja» at the same time, or which cannot be answered at all.
The Hardest Logic Puzzle Ever

History

Boolos credits the logician Raymond Smullyan as the originator of the puzzle, and John McCarthy with adding to its difficulty by introducing the ambiguity of «da» and «ja». Similar puzzles appear in Smullyan's books; for example, he describes an island where half the inhabitants are zombies (who always lie) and the other half are humans (who always tell the truth). The situation is complicated by the fact that the islanders understand us perfectly well, but an ancient taboo forbids them from using foreign words. So they use the answers «bal» or «da», which mean «yes» and «no», though it is unclear which means what. There are a number of similar puzzles in the book «The Riddle of Scheherazade». All of these are variations of Smullyan's widely known knights-and-knaves puzzles.

One such puzzle was featured in the film «Labyrinth»: there are 2 doors and 2 guards, one of whom always tells the truth and the other always lies. One door leads to the castle, the other to death. The point of the puzzle is to find out which door leads to the castle by asking a single question to a single guard. In the film, Sarah asked: «Would he [the other guard] tell me that this door leads to the castle?»

Solution to the puzzle

Boolos proposed a solution to the puzzle in the same article in which he published the puzzle itself. He stated that with the first question we must find a god who is not the god of chance, that is, who is either the god of truth or the god of lies. There are many questions that could be asked to achieve this goal. One strategy is to use complex logical connectives within the question itself.

Boolos's question: «Does „da“ mean „yes“ if and only if you are the god of truth, and god B is the god of chance?». Another version of the question: «Is the number of true statements in the following list odd: you are the god of lies, „ja“ means „yes“, B is the god of chance?»

The solution to the puzzle can be simplified by using counterfactual conditionals . The idea behind this solution is that for any yes-or-no question Q put to the god of truth or the god of lies:

  • If I asked you Q, would you answer «ja»?

The answer will be «ja» if the correct answer to question Q is «yes», and «da» if the correct answer is «no». To prove this, one can consider the eight possible cases proposed by Boolos himself.

  • Suppose that «ja» means «yes» and «da» means «no»:
    • We asked the god of truth, and he answered «ja». Since he tells the truth and the correct answer to question Q is «ja», it means «yes».
    • We asked the god of truth, and he answered «da». Since he tells the truth and the correct answer to question Q is «da», it means «no».
    • We asked the god of lies, and he answered «ja». Since he always lies, to question Q he would answer «da». That is, the correct answer to the question is «ja», which means «yes».
    • We asked the god of lies, and he answered «da». Since he always lies, to question Q he would answer «ja». That is, the correct answer to the question is «da», which means «no».
  • Suppose that «ja» means «no» and «da» means «yes», we get:
    • We asked the god of truth, and he answered «ja». Since he tells the truth and the correct answer to question Q is «da», it means «yes».
    • We asked the god of truth, and he answered «da». Since he tells the truth and the correct answer to question Q is «ja», it means «no».
    • We asked the god of lies, and he answered «ja». Since he always lies, to question Q he answers «ja». But, since he lies, the correct answer to question Q is «da», which means «yes».
    • We asked the god of lies, and he answered «da». Since he always lies, to question Q he answers «da». But, since he lies, the correct answer to question Q is «ja», which means «no».

Using this fact, we can ask the following questions:

  • Ask god B: «If I asked you „Is god A the god of chance?“, would you answer „ja“?». If god B answers «ja», then either he is the god of chance (and is answering randomly), or he is not the god of chance, and in that case god A really is the god of chance. Either way, god C is not the god of chance. If instead B answers «da», then either he is the god of chance (and is answering randomly), or B is not the god of chance, which means that god A is also not the god of chance. Either way, god A is not the god of chance.
  • Ask the god who is not the god of chance (according to the previous question, either A or C): «If I asked you: „are you the god of lies?“, would you answer „ja“?». Since he is not the god of chance, the answer «da» means that he is the god of truth, and the answer «ja» means that he is the god of lies.
  • Ask this same god: «If I asked you: „Is god B the god of chance?“, would you answer „ja“?». If the answer is «ja», then god B is the god of chance; if the answer is «da», then the god who has not yet been questioned is the god of chance.

The remaining god is determined by elimination.

Comments

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "Logics"

Terms: Logics