Two Doors with Two Guards - One Lies, One Tells the Truth
You are faced with two doors. One leads to safety (or freedom), the other to danger. Each door has a guard:
-
One guard always tells the truth.
-
One guard always lies.
You do not know which guard is which, nor which door is safe. You may ask one yes-or-no question to one guard to determine the safe door.
The Solution
Ask either guard the following question:
"If I were to ask the other guard which door leads to safety, which door would they point to?"
Then, choose the opposite door of the one indicated.
Why Does This Work?
-
If you ask the truth-teller, they will truthfully tell you what the liar would say (which is the wrong door).
-
If you ask the liar, they will lie about what the truth-teller would say (again, pointing to the wrong door).
-
In both cases, the indicated door is the dangerous one, so you should choose the other door.
Example Dialogue
Suppose:
-
Door A is safe, Door B is dangerous.
-
Guard 1 is the truth-teller, Guard 2 is the liar.
You ask Guard 1:
"If I were to ask Guard 2 which door leads to safety, which would he say?"
-
Guard 1 knows Guard 2 would lie and say "Door B." So Guard 1 answers "Door B."
-
You then choose Door A (the opposite).
If you ask Guard 2 the same question:
-
Guard 2 knows Guard 1 would say "Door A" (the truth), but lies and says "Door B."
-
Again, you choose Door A.