# Knights and knaves again on an island

In an island there are 3 inhabitants, one of which is a knight (who always tells the truth) and the other two are Jokers who randomly decide whether to tell truth or lie. The 3 men have the numbers 1, 2 and 3 on their t-shirt. 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. You can ask use one question to one of them, which must have a number as an answer, in order to determine the knight. What question will you ask?

I have never dealt with any such type of problem. Obviously the question must be something related to the numbers they have on their t-shirt.

Any help will be appreciated :)

(this is not homework - I wish I were 17, even if I had to bear with tons of homework!! Unfortunately I am 64!)

• puzzling.stackexchange.com has a lot of questions about knights/jokers/knaves. You could try there. – Arturo Magidin Apr 21 at 20:45
• Are you allowed one question in total, or one question per person? – Alex R. Apr 23 at 17:50

## 2 Answers

How about this question:

If you have decided to tell the truth for this question, please answer with the number of the knight, and if you have decided to lie, please answer with the number of one of the jokers.

Truth tellers will respond to the first clause truthfully, giving you the number of the knight, and liars will respond to the second clause falsely, giving you the number of a someone who is not a joker.

As far as I can tell, this is a "legal" question. The question certainly needs to refer to the joker's decision to be truthful; otherwise, the Joker's two possible states would give different answers, meaning you cannot determine the truthfulness of their answer.

• In the end, whether a strategy like this works out depends on what a "lie" is. Is a lie just ignoring the question and answering whatever comes into the mind, e.g. a random number in $\{1,2,3\}$? If you give two options in your question like "please answer A or B", does he have to anwer with A or B, or can he still say C. Does this count as a lie if you cannot recognize that this is neither A nor B?. – M. Winter Apr 24 at 7:28
• @M.Winter Lie means “incorrect answer,” not “random answer”. Otherwise the puzzle would have no solution, as random answers convey no knowledge. – Mike Earnest Apr 24 at 14:04
• This does not address my point. The joker could answer "cheese" to your question, which is as incorrect as you can get, and you would get no information out of it. – M. Winter Apr 24 at 14:14
• @M.Winter If such answers are possible, then the puzzle has no solution, so I think it is implicit that Jokers only answer in the range $\{1,2,3\}$. Rigorously, the question is a function $Q$ whose inputs are the identity of the knight, $k$, and the decision of the speaker to lie or not, $d$, and whose output is a subset of $\{1,2,3\}$ containing one or two elements. When you give a person a question, they compute the function, then if they are truthful they respond with an element of $Q(k,d)$, and if they are lying they give an element of $\{1,2,3\}\setminus Q(k,d)$. – Mike Earnest Apr 24 at 15:31
• I think this is the only reasonable interpretation of the question, namely the only one for which the puzzle is soluble (and which avoids paradoxes and self-referential questions). – Mike Earnest Apr 24 at 15:32

Assuming even Jokers answer in the way we can consistently assign truth values to their answers, we can ask, for example,

Let $$u$$ be the number of Knight. Let $$v$$ be the number you will answer to my question with. Let $$x$$ be defined as $$x = \begin{cases} u, & \text{if your answer to this question will be true}\\ v, & \text{if your answer to this question will be false} \end{cases}$$ What is $$x$$?

Assume person we ask will decide to provide true answer (they are Knight or Joker who answers true). Then $$x$$ is number of knight. As answer is true, the answer will be $$x$$ - ie number of knight.

Assume person we ask will decide to provide false answer, and their answer will be $$v$$. Then $$x = v$$, and their answer will be true, not false! So they can't consistently provide false answer.

So both Knight and Joker will answer to this question with number of Knight.

• mihaild can you please explain your answer? I don't understand it. Or maybe to give an example? Thank you! – Raahithya Vemulakonda Apr 22 at 5:06
• Added a bit of explanation. If it's still too unclear - can you please point to the first unclear part? (is it what the question means? what happens if answer is true? what happens if answer is false?) – mihaild Apr 22 at 12:42
• Apologies but your answer doesn't make any sense. Either give a clear example with justification, or consider rephrasing it. – Sal.Cognato Apr 23 at 12:15
• @Sal.Cognato I believe that it should be possible to at least point to the first part / sentence of the answer that "doesn't make sense". Is it question itself? Is it what happens if answer is true? Is it what happens if answer is false? – mihaild Apr 23 at 12:30
• What does "and the number you will answer to more question otherwise" mean??? Please consider writing some examples. – Marius Stephant Apr 23 at 17:10