Ask Simple Questions

Logic Level 3

The Labyrinth The Labyrinth

  • At the end of a labyrinth, there are three doors: Only one of them lead you to safety, the other two lead to pits of lava.
  • And guarding them are three guards: one who always tells the truth, one of them always lies and the third guard kills you if you ask a trick question, but otherwise is truthful.
  • The following questions are considered trick questions:
    • A self referential question. E.g, Is the answer to this question no?
    • A question about any of the guards. E.g, Is the guard to your left a liar?
    • A question involving a possible question. E.g, Would you say yes if I asked you whether this door is safe?

Is it possible for you to escape from the room safely? How many questions would it take?


Inspired by XKCD

2 Escaping cannot be guaranteed 1 3

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Siva Budaraju
Mar 17, 2017

The only way to get out in one question is "What would you say if I asked you which door is safe?" But guard 3 would kill you. So you ask two questions: "What's 1+1?" If they answer 2, ask "Which door is safe?" If they answer anything other than 2, ask "Which door is unsafe?" and you're out.

Yes, this is a very simple and elegant way to solve the problem.

Agnishom Chattopadhyay - 4 years, 2 months ago

If there were only two doors then your one-step question works, as long as there is no trick-hating guard. But since there are two unsafe doors, the liar, if asked "which door is safe?", may answer either unsafe1 or unsafe2. Then, the liar, if asked "what door would you point to if I asked you which door is safe?" may answer unsafe2 or safe (if he would answer unsafe1 to the referred question) or unsafe1 or safe (if he would answer unsafe2 to the referred question). Even in the case of three doors the truthteller will point out the correct door of course, but you can't be sure that's whom you're asking.

Sraman Sanyal - 4 years, 2 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...