# Knight, Knave and Joker puzzle

Here is an excellent puzzle with 3 types of characters:

You are lost in a town and meet 3 men. You somehow (God told you) know that they are Knight, Knave and Joker. Knight always tells truth, Knave always tells the opposite to the truth, Joker randomly decides whether to tell truth or lie.
You need to find at least one person who can give you some information, but the problem is that you do not know who is who. Luckily the three knew amongst themselves who they are. So you need to find someone who is not a Joker. How do you do it asking one yes-or-no-question to one person only if you are not allowed to ask a man something he doesn't know or any question he cannot answer either "yes" or "no" to.

Since the problem seems to be impossible for a lot people (at least at the beginning) I am adding a lot of explanations to let you be sure that there is no trick:

1. You cannot ask something like "How many friends do you have?". This is not a yes-or-no question.
2. You cannot ask questions like "Will it rain tomorrow?". He doesn't know.
3. You cannot ask arbitrary man "What would you answer if I ask you blablabla?", if it is the Joker he doesn't know this about his own answers.
4. You cannot ask something like "Will you answer No to this question?". Truth-teller can't answer this question.
5. You do not get any additional information (like by looking at behaviour, by lack of answer, or whatever is on your mind) and must decide who is not a Joker based on the answer ("yes" or "no") itself only.
6. You cannot force them to do stuff. Even implicitly. So you cannot ask "Will your friend scream if you hit him next second?" and expect to get an answer. The answer is unknown at the moment you ask the question therefore you are asking a forbidden question.
7. This puzzle is not about "how to find a way around the rules".
• The "correct solutions" assumed that the three knew amongst themselves who they are. – d'alar'cop Oct 5 '14 at 5:32

Actually this IS doable. As quite a few other answers have argued, it's clear from common sense that no question you ask somebody rule out the person you ask being the Joker. No matter what you ask, you always have to worry about the Joker screwing up your logic.

But, the aim is to identify one person who is NOT the Joker. Note we don't have to identify whether they're Knight or Knave. So how about we always pick somebody who we don't question? Now if we question the joker, it doesn't matter what he says because we'll just pick one of the other two! That means we just have to worry about asking a question informative enough that it'll allow us to identify the joker if we're talking to either the knight or the knave.

So say the people are A, B and C. You ask A:

"Is exactly one of these statements true:

1. You are the knight
2. B is the joker"

If you get back the answer yes, then the possibilities are:

• A is the knight and B is the knave (1. true, 2. false, so one statement true, so answer is yes which knight truthfully gives)
• A is the joker
• A is the knave and B is the knight (both statements false so answer is no which knave lies about)

In all three cases, B is safe

If you get back the answer no, then the possibilities are:

• A is the knight and B is the joker (both statements true, so answer is no which knight truthfully gives)
• A is the joker
• A is the knave and B is the joker (1. false, 2. true so one statement true so answer is yes which knave lies about)

In all three cases, C is safe

• Finally. Actually you can make the question quite simpler if you number them with numbers) – klm123 Oct 4 '14 at 22:31
• What the heck... But my solution works and was posted much earlier than his D: – warspyking Oct 5 '14 at 0:11
• @warspyking But your answer relies on speculation about the character's psychologies with the " Note; As you can tell, the liar assumes random might lie, and the truth teller assumes random may tell truth, this is because that's what they are like, they tend to lean that way like anybody else." bit – Ben Aaronson Oct 5 '14 at 0:13
• @Ben Most people would... – warspyking Oct 5 '14 at 0:15
• @warspyking But why would a knight regard somebody who answers randomly as trustworthy, and a knave regard somebody who answers randomly as not trustworthy? That's making up extra information that's not in the question. You might as well say "Pick the one in bright armour, he'll be the knight" – Ben Aaronson Oct 5 '14 at 0:24

There are already correct answers, but they are quite bulky. Hire is the most simplest and beautiful answer I know:

You should ask 1-st "Does 2-nd lie more often than 3-rd?". If "yes" - chose 2-nd, if "no" - chose 3-rd.
If 1-st is Joker you succeed immediately. If 1-st is Knight, then you'd chose the biggest liar and this is Knave. If 1-st is Knave, then you'd chose the smallest liar and this is Knight.

I'm going to number the men #1, #2 and #3.

I'm going to ask man #1:
Is at least one of these two statements correct:
#2 is the Knight, #3 is the Knave.

If the answer is Yes, then I'm going to seek to get my information from #3.
If the answer is No, then I'm going to seek to get my information from #2.

Because I don't know what the Joker is going to tell me, I can't seek information from the person I'm asking the question to. Therefore, I must ask a question that points me away from the Joker when asking either the Knight or the Knave.

If the Knight answers Yes to my question, then I know that #3 is the Knave.
If the Knave answers Yes to my question, then I know that #3 is the Knight.

If the Knight answers No to my question, then I know that #2 is the Knave.
If the Knave answers No to my question, then I know that #2 is the Knight.

If the Joker answers my question, then I know that I can pick either of the other 2 without worrying about which one I pick.

I won't know if the person I have picked is the Knight or the Knave. I will be certain that it isn't the Joker.

• This is correct, buy I accept the answer of Ben Aaronson just because he was like 4 sec faster. – klm123 Oct 4 '14 at 22:35
• As you should. I can't believe that it went this long without a correct answer and I was beaten by 4 seconds. Bravo to Ben. – Joel Rondeau Oct 4 '14 at 22:36
• Heh, I was rather lucky there! – Ben Aaronson Oct 4 '14 at 22:38
• Lucky unless you were involved in the ringing of my doorbell while I was answering. Hmm... – Joel Rondeau Oct 4 '14 at 22:38

I think I got it this time! If you need any clarifications comment!

Take 2 and seperate them. Ask them 1 of them (<- key word!) "Can I trust the other?"

They'll talk together and the response will be "No" if the seperated one is random, because truth will say "no" because he assumes you mean the liar, and is honest. Lies say no because he assumes you mean the other in their group. Which he lies because the other is honest.

If the group contains the random, then lies will say you SHOULD trust the other in their group, lieing. Therefore if the response does not come out "no" then you know you can talk to the other group to get info!

Edit:

Incase that was unclear...

Name the men A, B and C.

Split A and B up in a group. Ask A, "Can you trust the other person in your group." They will discuss it.

Here are the possibilities:

1. A:True, B:Lie;
2. A:True, B:Random;
3. A:Lie, B:Random

Or vice versa for each.

Case 1:

A returns no, because you cannot trust a liar, B says no because you can trust a truth teller. Returns No

Case 2:

A returns yes, because you may be able to trust random, depending on the result, B returns random (yes/no)

Case 3:

A returns yes, because you may not be able to trust random, depending on the result, B returns random (yes/no)

So if it returns absolute no, you CANNOT trust C, else, you CAN trust C.

Note; As you can tell, the liar assumes random might lie, and the truth teller assumes random may tell truth, this is because that's what they are like, they tend to lean that way like anybody else.

Note 2; The other 3 cases are simply the same result;

1. A:Lie, B:True;
2. A:Random, B:True;
3. A:Random, B:Lie

The turn the same result.

If they happen to disagree, they respond with both answers. So if just "no" is returned, it can be either guy in the small group. Otherwise it's the single guy, (C)

• @klm Do in other words, in case 1 it's gonna be either A or B, in case 2 or 3, it'll be C (the non-joker will be) – warspyking Oct 4 '14 at 19:38
• @warspyking, oh, it is SOOOO confusing.. And what do they answer when they are disagree?? And what happens in other 3 cases (vice versa), which you didn't considered? – klm123 Oct 4 '14 at 19:58
• Can you simply 1) consider ALL 6 cases, 2) say what exactly A would answer in them, 3) Say who EXACTLY is called to be NotJoker in case if the answer No and who if answer Yes? – klm123 Oct 4 '14 at 20:01
• Comments are not for extended discussion; this conversation has been moved to chat. Thank you for understanding! (cc @klm123) – Aza Oct 4 '14 at 20:18
• As far as I'm concerned this is the best answer. – warspyking Oct 4 '14 at 21:10

Let's call the people: A, B and C. Ask the following question to A:

"Is B a knave or C a knight?"

If A says yes, B is not a joker. If A says no, C is not a joker.

If A is a knight and says yes, we have A=knight, B=knave, C=joker.
If A is a knave and says yes, we have A=knave , B=knight, C=joker.
If A is a knight and says no, we have A=knight, B=joker, C=knave.
If A is a knave and says no, we have A=knave , B=joker, C=knight .
If A is a joker, neither B nor C is a joker.

It is impossible with one question (unless there's a detail that you omitted - such as a way to make one silent).

For any question you ask, the possible answers that any of the 3 men can give (or talk about) are the following 8:

yes yes yes
yes yes no
yes no yes
yes no no
no yes yes
no yes no
no no yes
no no no


In 2 cases they all answer the same -> useless. In remaining 6 cases they answer 2:1 split -> useless (nothing can be distinguished). You said you are looking for someone who isn't the Joker so - either you're looking for the Knight and the Joker can always answer the same, or you're looking for the Knave but again, the Joker can always answer the same. You may be looking for both at once (in one clever question), but even then the Joker can mess it up.

• I do not say that you must know which one (Knight or Knave) you are looking for. – klm123 Oct 4 '14 at 15:26
• It still doesn't matter. Nothing can be discerned. – d'alar'cop Oct 4 '14 at 15:28
• It looks to be impossible, because it is a good puzzle. But it is possible, and not because of missing conditions. Fill free to ask what is unclear. (I will add to PS that you do not get any information to decide except of one answer (yes or no).) – klm123 Oct 4 '14 at 15:32
• " you do not get any information to decide except of one answer (yes or no)" AND "ask one question to one person" : If it just so happens that you asked the Joker, then the answer means nothing. – d'alar'cop Oct 4 '14 at 15:34
• this is correct:) – klm123 Oct 4 '14 at 15:35

You ask all 3 the question:

Are you the Joker?

So if you got "N Y Y": Whoever answered "No" is the Knight.

If you got "N Y N": Whoever answered "Yes" is the Knave. You ask him: "Is this person the Knight?". To whoever he answers "No", that is the Knight.

• Am I wrong? Is the logic flawed? – bolov Jan 12 '15 at 10:23
• "How do you do it asking one yes-or-no-question to one person only" (c) 1 is not equal 3. – klm123 Jan 23 '18 at 6:00

I will ask this very simple question:

"Will they (pointing to the other two persons) tell me the SAME EXACT answer if I ask them if you are the Knave or not?"

Case1:

If I asked the Knight, then he will not be able to give an answer because he does not know what the Joker will reply (only Joker knows if his mood is to tell a lie or truth).

Case2:

If I asked the Knave, then he also will not be able to give an answer. Same reason as above.

Case3:

If I asked the Joker, then he will give me an answer. It could be Yes or No depending on his mood, but the important thing is that he is the only one who will give back an answer to my question.

In short,

if the guy I asked cannot answer my question then I know that he is either a Knight or a Knave (no need to decipher which). But if he gave me an answer (any answer of Yes or No), then I know that he is the Joker.

• Welcome to Puzzling.SE! In the future, consider adding spoiler formatting to your posts - you can do it by adding >! before each line you want to hide, and it makes sure you're not giving away the answer if someone wants to solve it themselves :) – puzzledPig Jan 23 '18 at 4:40
• "you are not allowed to ask a man something he doesn't know" (c) – klm123 Jan 23 '18 at 5:57
• @puzzledPig adding spoilers is a strange thing to ask a newcomer when ppl with 5k+ rank doesn't use them. Basically all answers on this SE are spoilers, so people who doesn't want to see them should simply avoid scrolling down, imo. – klm123 Jan 23 '18 at 5:59
• @klm123 yes, it's definitely a matter of personal preference. I like using spoiler tags though - as do a number of other people on the site - and I know it took me a while to figure out how they worked! :) – puzzledPig Jan 23 '18 at 15:43

"Are you about to say neither no nor yes?"

Truth: ...

He cannot speak without lieing.

Lie: ...

He cannot speak without lieing

Random: Yes/No

Speaks freely as he has no restrictions since he speaks randomly.

So in other words, if he's silent, bingo!

• "The consequence of the condition is that you can not ask arbitrary man what would he answered, the Joker doesn't know this about his own answers." – klm123 Oct 4 '14 at 15:37

Can I ask you 2 questions?

Truth: ...

Don't know, can only say yes/no

Lies: ...

Don't know, can only say yes/no

Random: Yes/No

??

• Well, Knave either knows the answer and will answer something or doesn't know then you are braking the rules. – klm123 Oct 4 '14 at 15:44

It is impossible.

Since the joker can answer at random, he can imitate both the knight and the knave.

• If you ask a question that both knight and knave agree on, the joker can imitate them and both answer the same.
• If you ask a question that knight and knave disagree on, he can imitate either of them and you will still be none the wiser.

Now if you are allowed to ask each man a question, there is a way.
Ask a question that knight and knave disagree on. The one with a unique answer will not be the joker (since the joker imitated either knight or knave, the two who have the same answer will be a kn... and a joker.

• "If you ask a question that knight and knave disagree on, he can imitate either of them and you will still be none the wiser.". If you would not analise the result, you sure will not be wiser;) – klm123 Oct 4 '14 at 22:10
• Analyse all you want. If you get the answer the knight would give, you've asked either the knight or the joker. So you know one of the others is the knave, but you don't know which one, since you may have asked the actual knight and one of the others is still the joker. So you can't go with either one of them. But you may have asked the joker who just imitated the knight, so you can't go with the answerer either. – SQB Oct 4 '14 at 22:24
• It seems that I stand corrected. – SQB Oct 4 '14 at 22:40