You meet 4 persons you haven't seen before, and must ask questions to determine who is who.
They know each other, and their friends' behaviour.
You may ask each as many times as you want but only yes/no questions.

  • Yessayer will always answer yes.
  • Nosayer will always answer no.
  • Truther will always says the truth.
  • Liar will always lie.

How many yes/no questions do you need to ask at a minimum, to be sure to determine which of the persons is who? (Each time you ask something it counts as a question, even if it's the same question and the same man). You may ask compound questions.

If the question is unanswerable like "if I toss a coin, will I get heads?", then Truther and Liar will not answer, but Yessayer will answer Yes, and Nosayer will answer No.

No Lateral Thinking answers, please.

  • $\begingroup$ Are head-exploding questions allowed? $\endgroup$
    – boboquack
    Commented Nov 11, 2017 at 7:49
  • $\begingroup$ @boboquack: No lateral thinking answer please. It is ok as long as still answerable. $\endgroup$ Commented Nov 11, 2017 at 7:54
  • $\begingroup$ The framework of this logical deduction test is about as old as the hills. $\endgroup$
    – Dr t
    Commented Nov 11, 2017 at 18:13
  • $\begingroup$ Seems three questions are enough to make out who is who. I may post an answer later. Time to bed. $\endgroup$ Commented Nov 11, 2017 at 18:26
  • $\begingroup$ @MeaCulpaNay If you have a workable answer with three, please do post it! There are problems with mine which I haven't been able to resolve yet :-/ $\endgroup$ Commented Nov 15, 2017 at 0:38

6 Answers 6


Four questions

It's easy to get all the information with at most four questions:

  • Ask everyone in turn an unanswerable question like "if I toss a coin, will I get heads?" The only people whose answers are indistinguishable will be Truther and Liar. So asking just three people this question will be enough to identify Yessayer and Nosayer for sure.

  • Pick one of the two remaining people (you know these are Truther and Liar) and ask them a question like "is the sky blue?" Their answer will tell you which one they are, and the problem is solved.

Three questions

I think a question of the following form may be useful.

For some two people A and B, ask A, "if I ask B a question, will he say yes?"

This enables us to distinguish several different cases, as follows.

  • If A and B are Truther and Liar (in either order), no answer.

  • If A is Yessayer, yes.

  • If A is Nosayer, no.

  • If A is Truther and B is Yessayer, or if A is Liar and B is Nosayer, yes.

  • If A is Truther and B is Nosayer, or if A is Liar and B is Yessayer, no.

This enables us to cut the maximum required number of questions from four down to three. Let's label the four people A, B, C, D and try this:

ask the above question three times: to A about B, to B about C, and to C about A.

  • If any of the three questions (by symmetry, say asking A about B) gets no answer, then we know A and B are Truther and Liar in some order. C's answer tells us whether he's Yessayer or Nosayer, which also tells us D's identity. Then B's answer about C determines whether he's Truther or Liar.
  • If all three questions get answers, then D must be Truther or Liar, so both Yessayer and Nosayer are among A, B, C. Thus our three answers must be either {yes, yes, no} or {yes, no, no}. In each case, the odd one out (by symmetry, say A) must be Nosayer/Yessayer respectively, so C's response about A tells us that C is Yessayer/Nosayer respectively. Then B's response about C tells us whether B is Truther or Liar, and we know D by elimination.
  • $\begingroup$ Your second bullet point has 4 possibilities: LNTY, LNYT, TYLN, YTLN. You can't distinguish those with one question if your questions can have at most 3 answers (yes, no, no answer). $\endgroup$
    – ffao
    Commented Nov 12, 2017 at 5:38
  • $\begingroup$ @ffao Good point. I've overhauled my answer to try a different question set instead (based on the same underlying idea). $\endgroup$ Commented Nov 12, 2017 at 15:29
  • $\begingroup$ "so C's response about A tells us that C is Yessayer/Nosayer respectively." Why can't C be Liar? $\endgroup$
    – ffao
    Commented Nov 12, 2017 at 15:42
  • $\begingroup$ Nice work. I have a query about the last case (all 3 get answers) - how do you distinguish between (ABC)=(YNT) and (ABC)=(LNY)? Won't both these cases have the same response pattern A=Y, B=N, C=Y? $\endgroup$
    – Lawrence
    Commented Nov 13, 2017 at 13:07
  • 1
    $\begingroup$ Your 3 question solution doesn't work. There are 4! = 24 different combinations of people, but you can only get 20 different combinations of answers. There's simply not enough information to determine it. It might still be possible with 3 questions, since that allows for a potential of 3^3 = 27 different answers, which is barely enough. But it probably requires same really complex questions. $\endgroup$
    – Kruga
    Commented Nov 14, 2017 at 11:34

Firstly, the minimum number of questions is:

3, since we have to sort between 24 possible orders and 33 is the lowest integral power of three at least as big as 24.

We can actually attain that, though the method used here is rather cheap:

"Consider the following table: (verbally recite the table given in the next spoiler block), find the 4-digit permutation which corresponds to your arrangement where 1 is yessayer, 2 is nosayer, 3 is truther and 4 is liar, and take the nth (replace nth with first, second or third depending of which question it is) digit of the 3-digit code which follows - is one of the following true: you are telling the truth and the digit is 1; you are lying and the digit is 2; or, the digit is 0 and if I flip a coin, it will come up heads?"

How to reverse-engineer:

Convert a yes to 1, a no to 2 and no response to 0. Then reverse-index back into the list and find out which permutation the people are in.

This works, since:

The codes are given such that whenever the yessayer and nosayer speaks, it will be the correct number in the code

Examples for truther and liar:
Truther, 1 - they are telling the truth and the digit is 1, so they say yes
Truther, 2 - the digit is not 1, they are not lying and the digit is not 0, so they say no
Truther/Liar, 0 - the digit is not 1 or 2, but the digit is 0 so the yes/no comes down to the coin-flip, so they don't respond
Liar, 1 - they are not telling the truth and the digit is not 2 or 0, so the correct answer would be no, but they say yes
Liar, 2 - they are lying and the digit is 2, so the correct answer would be yes, but they say no

Supplemental information:

1234 - 120
1243 - 122
1324 - 102
1342 - 100
1423 - 112
1432 - 101
2134 - 210
2143 - 211
2314 - 201
2341 - 200
2413 - 221
2431 - 220
3124 - 012
3142 - 111
3214 - 021
3241 - 222
3412 - 001
3421 - 002
4123 - 212
4132 - 010
4213 - 121
4231 - 020
4312 - 011
4321 - 022

In the question, you don't need to recite this, but for the curious, here are the unused 3-digit codes

XXXX - 000
XXXX - 110
XXXX - 202

  • 1
    $\begingroup$ Uuuuurgh. This does work, but ... isn't there a more elegant solution? $\endgroup$ Commented Nov 15, 2017 at 10:28
  • $\begingroup$ @Randal'Thor yeah, thinking about that. I didn't like it myself, but it proves existence. $\endgroup$
    – boboquack
    Commented Nov 15, 2017 at 22:24

Here's a method with three questions that is less artificial than boboquack's solution. I'll assume there are four people in a line, (left)ABCD(right).

First, tell everyone "I'm thinking of a question which is either 'is 4 square?' or 'is 4 prime?'." (This is just so that in what follows, everyone knows the correct answer to "the question" doesn't depend on who you ask.)

Ask A "If I ask B and C the question, will I get the same answer?"

  1. If A says "yes", then either A is yessayer or A is liar and D is truther. (8 possibilities)
  2. If A says "no", then either A is nosayer or A is truther and D is liar. (8 possibilities)
  3. If A says nothing then A is truther or liar and D is yessayer or nosayer. (8 possibilities)

Case 1

Ask B "If I ask D the question, will he lie?"

If B says "yes", possibilities (left-to-right) are YTNL, YLNT, LYNT. We can distinguish between these with one more question, e.g. by asking D if A and C would give the same answer.

If B says "no", possibilities are YNTL, YNLT, LNYT, and these can be distinguished by a similar question.

If B says nothing, the possibilities are YTLN, YLTN which are easy to distinguish.

Case 2

Ask B "If I ask D the question, will he tell the truth?"

This is now exactly the same as Case 1, with truther and liar swapped.

Case 3

Ask B "If I ask the person immediately left of the nosayer the question, will he say yes?"

Note that there always is such a person, since the first question established that A is not the nosayer.

If B says "yes", possibilities are LTYN, TYLN, LYTN. These can be distinguished e.g. by asking A if B would say "yes".

If B says "no", possibilities are TLYN, TNLY, LNTY. The same question distinguishes these.

If B doesn't answer, possibilities are TLNY, LTNY, which are easy to cope with.


Although this question is marked as done, I'm giving it a try.

Firstly, you ask a random person an unanswerable question such as 'if I go to the casino, will I win 1 million dollars?' The Yessayer will say yes, the Nosayer will say no, and the Truther/ Liar will not answer you.
If you asked the Yessayer/ Nosayer, ask another person. Ask him 'is the first person I asked a Yessayer/ Nosayer (depends on who you asked in the first question) ?' If this guy you asked is a Truther/ Yessayer, he will say yes. If this guy is a Nosayer/ Liar, he will say no. Finally ask this guy 'are you a yessayer/ nosayer?' If he is a Yessayer/ Liar, he will say yes. If he is a Nosayer/ Truther, he will say no.

Hope this works!
(for the 'if the first guy is a truther/ liar' part I haven't figured out yet)



See if this logic works

Ask all 4 (T,L,Y and N) to face in same direction standing side by side and then ask

Is there a Liar in front of you?

Since there is no one in front of them

T and N will answer NO

L and Y will answer YES

Let us call L and Y group A and T and N group B

Make the Group A face Group B. There are 4 possibilities

L faces N, Y faces T

L faces T, Y faces N

Y faces N, L faces T

Y faces T, L faces N

Ask them the second question

Are you directly facing either a Yesman, Noman or a Liar?

The answers are below

[1]: https://i.sstatic.net/27WWf.jpg

As you can see in the first possibilty if one of the answer from GROUP B is YES then he must be the Truth man and the person opposite to him must be the Liar (since the liar answered Y). The other guy in GROUP B is the NO man

Same logic for the second possibility.

For the third possibility if one of the answer from GROUP A is No then he must be the Liar (other guy is YES man and always answers YES). The person opposite to the Liar must be the NO man since the question asked was "are you directly facing a Y or N or L?"

Since the OP did not talk about any standing restrictions, I thought this is possible

  • 6
    $\begingroup$ The way I understand the puzzle is that each question is directed at only one person, so your answer actually contains 8 questions. $\endgroup$ Commented Nov 12, 2017 at 15:53

Well, though an answer is marked as correct, I am giving a try:

It should be possible to decide who is who with a minimum of THREE questions

As it goes like this:

First question to ask all the four is Are two and two sum up to four?

For which, expected answers from those people are:

Yessayer answers yes.
Nosayer answers no.
Truthsayer says the truth - They(2 and 2) do.
Liar lies - They( 2 and 3) do NOT

This leaves a possibility of having the same answers from Yessayer and Truthsayer ( say the answer is YES for the above asked question) and then we should pose the following (2nd)question to both of them -

"Are you a Yessayer?" for which, answer from Yessayer would be yes but the answer from Truthsayer differs (thereby we can distinguish who is who)

A similar exercise can be conducted for Liar and Nosayer to determine who is who by asking one more question (The (3rd)question being -

"Is the sum of 2 and 2 greater than 5?" -

for which Liar answers as "YES" and Nosayer answers as "No" thereby we can decide who is who.

These are just my views (based on my understanding of the question) and any comments/corrections are most welcome!

  • 2
    $\begingroup$ So you ask 12 questions in total. $\endgroup$ Commented Nov 15, 2017 at 7:49
  • $\begingroup$ Oh... I answered a different question then....oops! $\endgroup$ Commented Nov 15, 2017 at 8:23

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.