7
$\begingroup$

This is a variation of the riddle of 2 guards and 2 doors:

You are stuck in a room with 3 doors. Each of the doors have a guard posted. One guard always tells the truth, one always lies, and the third sometimes tells truths and sometimes tells lies, but stabs you if you ask him more than 2 questions.

What is a reliable way to solve this?

$\endgroup$
  • 9
    $\begingroup$ Are we to assume one of the doors is a "good" door, the other two are "bad", and all of the guards know which are good and bad? $\endgroup$ – Quark Jan 8 '15 at 4:26
  • 4
    $\begingroup$ I think it is impossible if the liar can lie in multiple ways - so he just doesn't have to say the truth. So if I ask him "Is this the right door" he can just answer "I don't know" and this gives me zero information from him... $\endgroup$ – Falco Jan 8 '15 at 12:32
  • 6
    $\begingroup$ Is this in any way inspired by XKCD? "One always lies, one always tells the truth, and one stabs people who ask tricky questions." $\endgroup$ – KSmarts Jan 8 '15 at 15:41
  • 1
    $\begingroup$ Ask them all 3 questions, to find out which guard has a knife. Take the knife from that guard, stab all three of them with it, then walk through the now-unguarded door. $\endgroup$ – neminem Jan 8 '15 at 18:36
  • 4
    $\begingroup$ Wait for their shift to end, and then follow them out. $\endgroup$ – user2023861 Jan 8 '15 at 21:27
15
$\begingroup$

It seems that it is trivial to solve this. As long as we identify either the liar or the truth-teller, we can obtain 100% correct statements.

First, ask "Is 1+1 == 2" to all 3 guards. The liar will always say "no", while the truth-teller will always say "yes".

You will get 1 of 2 outcomes:

1 of them says yes while the other 2 say no. Since there must be at least one liar and one truth-teller, the merciless guard is lying in this case. Ask the guard who says yes which door is the true door by exhaustion.

1 of them says no while the other 2 say yes. The merciless guard is telling the truth, and we can perform the same operation with the liar, just with answers reversed.

We can therefore ignore the knave guard.

$\endgroup$
  • 3
    $\begingroup$ And you ask the liar 3 times "is this the right door?" And he lies by saying "I don't know" all three times :-X $\endgroup$ – Falco Jan 9 '15 at 9:58
7
$\begingroup$

Ask all of the guards, "Are you the merciless guard?". If two of them respond "no" and one "yes", then you know that the one that said "yes" is the liar (and that the merciless one said "no") - and you can ask them "Will I escape through this door? How about this one?" - whichever one they say you won't escape through is the proper door to open. If, to your initial round of questions, you get two responses of "yes" and one "no", then you know that the one who said "no" is the truth-teller (and the merciless one said "yes"), and you can ask that guard which door is the escape.

This uses the fact that we know we will get one response of "yes" and one of "no" to the first question - from the liar and the truth-teller respectively. So, if we only have one "yes" or one "no", we can identify who said it, meaning that we can assuredly avoid asking the merciless one two questions and, moreover, that we will know exactly who we're talking to. Since there's only three guards and two possible answers, we are assured that this will always be the case.

$\endgroup$
  • $\begingroup$ It is unclear to whom you ask "Will I escape through this door?" and "How about this one?". $\endgroup$ – Florian F Jan 8 '15 at 9:19
  • $\begingroup$ Do you use "them" as a gender-neutral pronoun? If so, then your answer looks correct. $\endgroup$ – Florian F Jan 8 '15 at 10:15
  • $\begingroup$ @Florian Yes, "them" is meant to refer to "the guard that said "yes"" $\endgroup$ – Milo Brandt Jan 8 '15 at 23:11
2
$\begingroup$

In response to Taemyr It is most likely impossible, if the Guards can answer with other words than yes/no:

The liar can just answer "I don't know" to any question he knows, so we cannot get any information out of him, While the stabber can always answer exactly like the truth-teller, except for the final answer we need.

This means, whatever we do we can never decide between the Knave and the truth teller - that only leaves us with the liar. And he can just answer "I don't know" to any question we ask, If we ask him recursive questions, he can just replace it with anything "What would you answer if...." and he just says JELLYFISH!

As far as I can see - unsolvable.

Or the default method (If the liar always lies with opposites so yes->no):

Ask the first one: "If I would ask you if Guard 2 is merciful, what would you say?" The thruth-teller will answer thruthfull, the Liar will lie about his lie and also say the truth, the killer will say anything.

We then choose Guard2 if he is merciful, otherwise Guard3. If the first one was the Knave, we have a safe one, otherwise we got a thruthful answer and will also have a safe one.

Then we can just ask one or two question to the truthteller/liar:

If I would ask the other merciful guard (the one who doesn't stab people) is the first door safe, what would he say?

If he says no, take the door otherwise ask the same for the 2nd door, if no take it, otherwise take door 3.

So 3 Questions overall.

$\endgroup$
  • $\begingroup$ +1, however I am not completely happy with the second question. The liar could answer "He would say that both doors are equally dangerous.", an obvious lie - but then he is the liar. The questions can be asked as pure yes/no answers which removes this ambiguity. $\endgroup$ – Taemyr Jan 8 '15 at 12:17
  • $\begingroup$ @Taemyr But then the Liar could also answer any question with "I don't know" And there would not be any surefire way to ever get a reliable answer :-o $\endgroup$ – Falco Jan 8 '15 at 12:25
  • $\begingroup$ @Taemyr I changed my solution, so the last one are two yes/no question. I don't think it's possible to get one of 3 Doors with one yes/no question, if a lie is involved... $\endgroup$ – Falco Jan 8 '15 at 13:00
  • $\begingroup$ OP doesn't really specify what the three doors are, if there is 2 safe doors and 1 lethal then 2 questions should be possible. If there is only 1 safe door we would need to get more than 1 bit of information to distinguish between the doors. This is impossible with a single yes/no question so we would either need a way to get information about the doors as part of the package when asking about the guards or ask a question that is not yes/no. I suspect both approaches is impossible. However I can't prove this. $\endgroup$ – Taemyr Jan 8 '15 at 13:21
  • 1
    $\begingroup$ One needs to know a guard that is not merciful and the correct door. Guessing this from no information would have a 2/3*1/3=2/9 chance. This is less than 1/4, so two yes/no questions can not provide the needed information. $\endgroup$ – Taemyr Jan 8 '15 at 13:24
1
$\begingroup$

Assuming that each guard can only answer yes or no questions, ask the left guard: - Will the middle guard say you are the merciless guard? - Will the right guard say you are the merciless guard?

The middle guard: - Will the left guard say you are the merciless guard? - Will the right guard say you are the merciless guard?

And to the right guard: - Will the left guard say you are the merciless guard? - Will the right guard say you are the merciless?

Since both the truth teller and the lier cannot predict the merciless guard's answer, they must answer "I don't know" when asked about the merciless guard since doing otherwise might cause them to lie or tell the truth, which is impossible.

The merciless guard knows which of the others is the truth teller and which is the lier so he is free to answer "yes", "no", or lie and say "I don't know".

Choose the door behind the guard which received two 'I don't know" answers. Even if the merciless guard replied "I don't know" twice he'll be alone in pointing to that guard.

So 6 questions if we allow the merciless guard yo answer I don't know and don't use Falco's double negative "If I were to ask you, what would you say?"

If the merciless guard can't lie and say I don't know then you only need to ask the questions to one person and choose the door behind the person that received the single "I don't know" answer or didn't give it.

If on the other hand the lier can also reply "I don't know" then I don't think you can solve it without a benchmark question like "1+1=2?"

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.