3
$\begingroup$

3 men are guarding 3 doors. 1 door leads to a pot of gold, while the other 2 lead to hungry lions. 1 guard always tells the truth, and the other 2 always lie. You are allowed to ask 2 questions in total (whether with the same or different guards).

  1. What should you ask?
  2. Is 100% certainty possible? (I'm pretty sure it isn't if you could only ask 1 question, as in the original 1 knight 1 knave problem).
  3. If not, what is the smallest number of questions for which 100% certainty is possible?
  4. How would the answer change if you were not allowed to ask a guard more than one question?
$\endgroup$
5
  • $\begingroup$ Does this answer your question? Two doors with two guards - one lies, one tells the truth The idea is highly similar and I do not think this is worthy as a new question $\endgroup$ Commented Jun 18 at 7:54
  • 1
    $\begingroup$ No because there is 1 more door and q more knave here. $\endgroup$
    – Josh
    Commented Jun 18 at 7:55
  • 1
    $\begingroup$ If the guards themselves do not know who will lie or tell the truth .. it changes the problem entirely .... (however, I'm not sure if there's a solution in that case ... O.o ) $\endgroup$
    – Ditto
    Commented Jun 18 at 15:40
  • $\begingroup$ "Are you lying?" $\endgroup$
    – Seggan
    Commented Jun 18 at 21:14
  • $\begingroup$ @Josh Welcome to PSE (Puzzling Stack Exchange)! Thanks for an interesting question! $\endgroup$ Commented Jun 19 at 2:30

6 Answers 6

3
$\begingroup$

It is not possible to do it in 1 question, but can easily be done in 2. @hexomino proposes a solution with 1 question, but it does not work because:

The question is not well defined. If we ask a knave to point at the door with the pot of gold, he has more than one option. So if we ask a knight or knave what the knave would have done, he can't know for sure, so he can't answer the question. Even if we somehow assume that they know which wrong answer the knave would have given, the knave still has the choice to give the other wrong option.

More generally, we cannot do it in 1 question because:

Every question can only give us (at best) binary information, unless we know we are talking to a knight. If we ask a question with more than 2 possible answers, a knave could pick 2 options in advance, and answer the first wrong one. So if you are talking to a knave, you can get binary information at best. Since you cannot know whether you are talking to a knave, you can't do better than that.

A more general solution to the problem of arbitrarily many knights and knaves (even without knowing the number of knights and knaves) is the following one:

It is always possible in log2(number of doors) questions.

The questions can be of the form:

"If the roles of knights and knaves were inverted, what would you tell me if I asked..." With a simply binary decomposition, we can then get the information we want.

The only situation with a faster solution is:

If it is faster to find a knight than to find the answer, we can find a knight, then ask him the question directly. For example if there are 10 knights and 1 knave, with 11 doors, 1 question is enough to find a group with the knave, and a second question to find the door, where as the normal approach would need 4 questions.

Edit: after further reflections and a comment from @hexomino, I came up with a 1 question solution that might work (if we admit it):

"Please point to a door B could have pointed to, if I had asked him to point at a door C could have pointed to if I had asked him to point at the door with the pot of gold." This works assuming knaves have to point at a door, and we count this as a question (it's more of an order than a question). My proof fails, because here there is more than 1 correct answer at some point, so a knave cannot pick 2 answers, and answer the first wrong one among the 2. Open questions like this make it unclear what "lying" means (for example a knave could point at himself instead of pointing at a door). I would say this is the reason the problem is generally formulated as asking yes/no questions, with knights giving the correct answer, and knaves the other one, makes the problem a lot better defined.

$\endgroup$
3
  • $\begingroup$ Thanks for the insight. I actually just posted a general formulation of the problem Q(n,s,k,x) - # of doors, # of successful doors, # of knights, and # of questions - in which I actually handled the case you described by having the knave point to all the doors with lions. (Also the 1-question solution attempt is by Ahmed, not hexomino.) $\endgroup$
    – Josh
    Commented Jun 18 at 17:00
  • $\begingroup$ "So if we ask a knight or knave what the knave would have done, he can't know for sure," - okay, but a knave could know what a knight or knave will not do (with certainty) and so can still lie with only that partial knowledge. $\endgroup$
    – hexomino
    Commented Jun 18 at 17:16
  • 1
    $\begingroup$ @hexomino The knave might lie with certainty, but what about the knight? The thing is, either they somehow have absolute knowledge, and then the knaves have two options for lying, or they do not have absolute knowledge, and the knight has no way of knowing what the knave would have said. But I think I came up with alternative phrasing that might work, I will edit my answer to include it. $\endgroup$
    – oak
    Commented Jun 18 at 17:36
5
$\begingroup$

Without further restrictions on the types of questions that may be asked or further knowledge the guards have about each other, it is open to being achieved in one question as follows.

Ask to Guard #1

"If I were to ask Guard #2 'behind which door would Guard #3 say is the pot of gold?', to which door would Guard #2 point?"

Then, the door which Guard #1 indicates leads to the pot of gold.

Analysis

If Guard #1 is the truthteller then Guard #3 is a liar and would point to a door leading to a hungry lion. However, Guard #2, being also a liar, would indicate a door that Guard #3 would not pick and would have to choose the door leading to the pot of gold to guarantee their lie. This would also be assumed by Guard #1

Alternatively, if Guard #2 or #3 is the truthteller, then Guard #2 would indicate that Guard #3 would point to a door, behind which is a hungry lion. Guard #1, not knowing which of the hungry lion doors Guard #2 would indicate must point to the door leading to the pot of gold to guarantee their status as a liar.

Thanks to justhalf and Brendan Mitchell for helpful comments on the wording of the question.

$\endgroup$
22
  • $\begingroup$ Wouldn't Guard #2 only required to lie about Guard #3 answer and not needed to "guarantee their lie"? $\endgroup$
    – justhalf
    Commented Jun 18 at 14:21
  • 1
    $\begingroup$ @justhalf I think that depends on whether guard 2 is being asked to predict the answer of guard 3 without actually asking him, or guard 2 is being asked to actually ask guard 3 and report back. I think the former makes more sense, but the answer as written implies the latter. $\endgroup$ Commented Jun 18 at 15:22
  • 1
    $\begingroup$ This can be defeated in the last instance if the guard's door-indicating preferences are known by the guards; e.g. if Guard 2 will always choose the lowest-numbered lion door when they have a choice, Guard 1 may safely indicate the highest lion door. $\endgroup$ Commented Jun 18 at 16:54
  • 1
    $\begingroup$ In logic puzzles with liars it is normally clear what the liar must say in response to any question, e.g. they are true/false questions with only one right answer and the liar knows what the right answer is. The assumption you are making is not one I've ever seen in another logic puzzle. $\endgroup$
    – causative
    Commented Jun 19 at 8:57
  • 1
    $\begingroup$ @hexomino Yes, a truthteller would tell a falsehood if they believe it to be true. Hasn't come up in this puzzle though. $\endgroup$
    – causative
    Commented Jun 19 at 11:05
1
$\begingroup$

From your question it doesn't seem to be the case that you are only allowed to ask yes/no questions. So simply ask

Which doors have gold behind them?

Then

If the answer tells us two doors it's the third door because it must be a knave answering. If the answer tells us a single door it must be the knight

$\endgroup$
1
  • $\begingroup$ A knave could point to the door with the gold and another door. That's a lie, so the knave did not break any rule, and you don't know which door has the gold. He could also only point to one door whitout gold, still a lie, same result. $\endgroup$ Commented Jun 19 at 13:32
1
$\begingroup$

Ask a question you know the answer to and knight/knave will also know just by looking at you. It should be clearly yes/no. "Are my eyes blue?" If you have very blue eyes. Something more abstract is "Is this a question?" Or "does 1+1 equal 2?". Something in the spirit of the game is "Are there two doors with lions behind them?" (Here I assume that this is known to the guards)

If knave ask "Behind which door is a lion?". He cannot point at the lion doors so will point at the one gold door. If knight ask "Behind which door is the gold?" He will point at the gold.

If the guards are not aware of each other, but are implied to be separated and only know what is behind their own door, this should be clarified when introducing the puzzle.

$\endgroup$
1
  • $\begingroup$ The guards know everything about the situation. $\endgroup$
    – Josh
    Commented Jun 19 at 11:47
0
$\begingroup$

You can ask one question to determine which guard is telling the truth. The question would be:

"Point to the guard who is telling the truth among your companions."

If you ask the guard who tells the truth, he will refrain from pointing because the other two guards are liars. If you ask one of the lying guards, he will point to the other liar because he is lying and would not point to the guard who is telling the truth. This way, you can identify the guard who tells the truth.

$\endgroup$
6
  • 2
    $\begingroup$ Why couldn't they all just point to themselves? Also, this isn't actually a question; it's a directive. That makes it impossible for them to lie or tell the truth, because they aren't answering anything; they're simply being given a directive. There is nothing to indicate whether knights/knaves follow directives or not. $\endgroup$ Commented Jun 18 at 15:30
  • $\begingroup$ You might be able to say something like, "If any guard other than yourself is a truth teller, which guard is it?", but I still think that if it's valid for the truthteller to give a non-answer, it should be valid for the liars as well. They should be able to imitate any answer that the truthteller gives. $\endgroup$ Commented Jun 18 at 15:33
  • $\begingroup$ @GentlePurpleRain "among your companions". A clearer way of wording that question could be: "If either of the other two guards is telling the truth, point to him (otherwise don't point to anything)". If the guard you asked is truthful, he won't point to anything (other 2 are liars). If the guard you asked is lying, he'll point to the other liar (1 is truthful and the other is the other liar). $\endgroup$
    – Josh
    Commented Jun 18 at 16:01
  • $\begingroup$ @josh "Yes, I think the question is clearer this way" $\endgroup$
    – Ahmed
    Commented Jun 18 at 16:53
  • 2
    $\begingroup$ That gives you which guard is telling the truth. But I guess you have to ask a second question to find the pot of gold, right? $\endgroup$
    – hexomino
    Commented Jun 18 at 17:07
0
$\begingroup$

Ask guard 1, "If I asked you 'Does your door lead to a pot of gold?', would you answer in the affirmative?". If the answer is yes, then go through door 1. Otherwise ask guard 2 the same question, and go through door 2 if the answer is yes and through door 3 if the answer is no.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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