20-CS-110-001 Introduction to Computer Science Fall 2010

Solution to Double Doors Puzzle

    "If I asked the other person, 'Does the left door lead to the riches?' what would the response be?"

To guarantee a lying response, bring both people into the question's response. This ensures that with one person always telling the truth and one always lying, the answer has to be a lie. Ask either person "If I asked the other person, 'Does the left door lead to the riches?', what would the response be?"

To guarantee a truthful response, ask "If I asked the other person, 'Does the left door lead to the riches?' would they say 'no?'"

Suppose it's the left door

  1. The truth teller says yes so the liar says no if asked (no means left).
  2. The liar says no so the truth teller says no if asked (no means left).

Suppose it's the right door

  1. The truth teller says no so the liar says yes if asked (yes means right).
  2. The liar says yes so the truth teller says yes if asked (yes means right).