Two doors with two guards - one lies, one tells the truth

  • You are a prisoner in a room with 2 doors and 2 guards. One of the doors will guide you to freedom and behind the other is a hangman --you don't know which is which.

    One of the guards always tells the truth and the other always lies. You don't know which one is the truth-teller or the liar either.

    You have to choose and open one of these doors, but you can only ask a single question to one of the guards.

    What do you ask so you can pick the door to freedom?

    Links to Wikipedia and TVTropes pages for this classic old puzzle.

    Why not just ask them something you know the answer to, like are you a guard? and then just listen to the one who says yes.

    @XGreen Because then you've used your one question and don't have any information about which door to take.

    " but you can only ask a single question" @XGreen so if you asked this, you cannot be able to ask for the right door. >.<

    This reminded me an old episode of Yu-Gi-Oh!, with Yûgi and Joey against the Paradox twin brothers !

    This can be solved without asking any questions :-) Just wait for the shift change and the guards will leave by the freedom door. To speed things up state "My friends are giving away free beer in the pub. If you go now you will still be in time." The guards then all leave by the freedom door on their way to the pub.

    ask one guard - `Is 2+2 = 4 ?`

    @Duke79 to what purpose? his way your journey will end knowing which guard is liar and the other is honest, because you have only ONE question to ask.

    My bad! I assumed there are two questions. That's how it was asked when I came across this question before.

  • Correct answer

    6 years ago

    If I asked what door would lead to freedom, what door would the other guard point to?

    If you asked the truth-guard, the truth-guard would tell you that the liar-guard would point to the door that leads to death.

    If you asked the liar-guard, the liar-guard would tell you that the truth-guard would point to the door that leads to death.

    Therefore, no matter who you ask, the guards tell you which door leads to death, and therefore you can pick the other door.

    This assumes that the liar guard will only tell a lie. (As opposed to trying to deceive you.) There is more to lying than words - there is body language.

    @Mayo It's a logic puzzle, though, not one of human interaction.

    Yes. I forgot my :-) I've been thinking about questions like this along the line of a prisoner's dilemma and not only as a matter of a logic puzzle.

    @Mayo That makes sense! No worries :]

    Note to self - if this answer is confusing, focus only on the latter clause which is simple to understand and the only key to the problem, i.e. `What door would the other guard point to?` (if you asked him where the treasure is). The reason this works is because the answer reveals the integrity of BOTH guards.

    @Emrakul I have seen this solved in one of my childhood horror shows.

    What would happen if the guard pointed to the door you came from?

    @WeckarE. "If I asked which door would lead to freedom, and there was no door behind me, which door would the other guard point to"?

    @ Sridhar-Sarnobat: This question reveals the identity of both guards. Exactly. Which makes me wonder if the question is not cheating basically. It's two questions, only embedded. The reason why people don't notice is because the two questions are not separated by an 'and', the second one is a subordinate clause. This puzzle could therefore be examined in the linguistic or philosophy stackexchange site as well.

    You assume that each guard knows whether the other is a liar or a truth teller. The question doesn't state that the guards each know that one of the guards always tells the truth and the other always lies (though presumably each guard knows that he does one of these). If the assumption is false for both guards, the truth teller would truthfully answer, "I don't know", and the liar would be at something of a loss to give a sensible answer.

    Of course most answers assume that the guards know what kind of door they're guarding.

    What if the guards don't know which door is which?

    This is not the correct answer. This answer requires that the person asks two questions.

    @Karl Ask it once but pick the guard at random. It works in either case.

    Haha sorry man, I totally missed the part that the guard you ask will actually point somewhere, my bad!

License under CC-BY-SA with attribution


Content dated before 6/26/2020 9:53 AM