Problem #32 MEDIUM

The Truthful and the Deceptive

Meta Apple Logic Philosophy

Problem Statement

A traveler arrives at a fork in the road. One path leads to safety; the other leads to danger. Two guards stand at the fork — one always tells the truth, the other always lies. The traveler does not know which guard is which. The traveler may ask exactly one guard exactly one question. What single yes-or-no question should the traveler ask to guarantee finding the safe path, regardless of which guard they approach?

Answer & Quick Explanation

Think you've got it? Click below to check your answer.

Ask: 'If I asked the other guard which path leads to safety, what would they say?' Both guards point to the dangerous path. Take the opposite path. This works regardless of which guard you ask.

Detailed Editorial Solution

Want to see the step-by-step breakdown? Click below to reveal the editorial.

The trick is to nest the question inside itself — ask what the other guard would say. This creates a double-layer that cancels out the lying, because both guards end up pointing to the same (wrong) path. Step 1: Scenario A — You approach the truth-teller: They would truthfully report what the liar would say. The liar would falsely point to the dangerous path. So the truth-teller says: dangerous path. Step 2: Scenario B — You approach the liar: They would lie about what the truth-teller would say. The truth-teller would correctly point to the safe path, but the liar inverts that answer. So the liar also says: dangerous path. Step 3: In both scenarios, the answer to 'What would the other guard say?' points to the dangerous path. Take the other path — that is the safe one. Step 4: Why does this work? The truth-teller tells you the liar's lie (one inversion). The liar lies about the truth-teller's truth (one inversion). One inversion either way — both cancel to the same wrong answer. Step 5: An equivalent question: 'Would the other guard say this path is safe?' Answer yes → take the other path. Answer no → take this path. Step 6: No other single yes/no question achieves this guarantee — the self-referential structure is the essential mechanism. Key Insight: The double-negation trick: truth-teller reports a lie (1 inversion), liar lies about the truth (1 inversion). Both produce 1 inversion total — identical outputs. The question weaponizes the liar's own deception against itself.