Home > Riddles > The most difficult logic puzzle in the world

The most difficult logic puzzle in the world

Pure logicLevel 5 · Expert · ●●●●●

Three gods A, B and C are called Truth, Falsehood and Random, in some order. Truth always tells the truth, False always lies, and Random answers randomly true or false.

Your goal is to determine the identities of A, B, and C by asking three yes/no questions. Each question is asked of only one god.

The gods understand Spanish but will respond 'da' or 'ja', and you do NOT know which means 'yes' and which means 'no'. A Random question will be answered randomly.

You can ask more than one question to the same god.

Hints

Show hints
  1. Central idea (control motto)
  2. Define: if Q1 = ja, take X=C.
  3. Yes, there is a complete strategy with 3 questions.

Solution

Show full solution

Answer: Yes, there is a complete strategy with 3 questions.
Central idea (control motto)
For any $P$ proposition, use the question:

"If I asked you '$P$', would you answer 'ha'?"

If the interrogated god is not Random, this form has two advantages at the same time:

  • neutralizes the lie (Truth/Falsehood are aligned),
  • neutralizes the unknown translation of ja/da.

Result: the god answers ja if and only if $P$ is true.
Step 1: Make a non-random god
Q1 to $A$:

"If I asked you 'Is $B$ Random?', would you answer 'ha'?"

Defines:

  • if Q1 = ja, take $X=C$;
  • if Q1 = da, take $X=B$.

Why does it work?

  • If $A$ is not Random, Q1 correctly reports "$B$ is Random" and you choose the other one, which is not Random.
  • If $A$ is Random, then $B$ and $C$ are not Random; Whichever one you choose ($B$ or $C$), $X$ remains non-random.

Conclusion of step 1: $X$ is guaranteed True or False.
Step 2: Decide if $A$ is Random
Q2 to $X$:> "If I asked you 'Is $A$ Random?', would you answer 'ha'?"

  • If Q2 = ja, then $A$ is Random.
  • If Q2 = da, then $A$ is not Random.

Step 3: separate Truth and Falsehood

  • If Q2 = ja ($A$ already identified as Random):

Q3 question to $X$:

"If I asked you 'Are you True?', would you answer 'ha'?"

With this you distinguish whether $X$ is True or False, and the third is determined.

  • If Q2 = da ($A$ is not Random):

Q3 question to $X$:

"If I asked you '$A$ is True?', would you answer 'ha'?"

That determines whether $A$ is True or False and, by discarding it along with Q1, determines the three gods.
Methodological conclusion
The strategy separates the problem into three tasks: (i) find a non-random, (ii) locate Random, (iii) label True/Falsehood. With 3 answers you obtain unique identification.


Related riddles

Keep practicing

If you enjoyed this one, try more pure-logic riddles, explore this theme, browse the full archive, or read the riddle-solving guide.

← Previous: The three blind wise men · Next: The Bus Wizard (Conway) →