# yes/no logic problem

There is a truth teller (always tells the truth), a liar (always lies), and one that sometimes answers truthfully and sometimes lies. Each person knows who is who. You may ask three yes or no questions to determine who is who. Each time you ask a question, it must only be directed to one of the persons (of your choice). You may ask the same question more than once, but of course it will count towards your total. What are your questions and to whom will you ask them? ?

In all honestly I don't know where to start with this type of question. And really not looking for an answers but guidance on how to approach a problem like this.

The condtion that

Each person knows who is who Seem to me to be the important part of this, and this to me means I should start with trying to find the random person out, but what I cant figure is the starting question I should ask.

So I then tried to ask each person if there a liar, which has cause me confusion beacuse, if I ask A if he the lair, and he says yes,then he not the lair as the liar would say no therefore he telling the truth.

But if he says no then he could be telling the truth or a lie and doing this for the same concludes the same results, which confused me even more.

Is there a possibility someone could break this down a little, it would be much appreciated.

Also I am new here and not sure what tags I should tag, so sorry for the wrong input.

Here's a bit of guidance:

The person who answers randomly is a big problem, because you don't get any useful information from them. You may want to consider using your first question to single out one who does not speak randomly. After that, ask them about the identities of the other two, but make sure that you figure out if they tell the truth or not!

My solution (as OP requested in comments):

Question 1:

Pick one person at random and ask "If I were to ask the person who answered randomly if 2+2=4, what would they say?" The truth teller and the liar have no way to answer this, so will say something along the lines of "I don't know" or just not answer. The person who speaks randomly will give a random yes or no answer. If you don't get an answer, you are talking to someone who is NOT random, if you do get an answer, you are talking to someone who IS random.

Question 2:

Ask someone who is NOT random "Is 2+2 equal to 4?" On a yes, you are talking to a truth teller. If the answer is no, you are talking to the liar. If you already know the identity of the random person from question 1, you're done. Otherwise, go to Question 3...

Question 3:

Ask the person you've identified as a liar or truth teller, "Is the person to the left (or right) of you (the other one of truth teller or liar)? Then, based on the response, you'll know all 3 of their identities!

• Thank you, I think I am nearly there hopefully. Oct 27, 2018 at 15:55
• Could you ask the random guy if he random as the only answer to give would be 'No' as he cant ans 'Yes' Oct 28, 2018 at 16:22
• @james2018 the only problem with that is you don’t know who is random to start. In addition, (s)he could answer “yes” because (s)he answers randomly- (s)he is as likely to answer no as (s)he is to answer yes Oct 28, 2018 at 18:52
• Yes I suddenly realised, which is now causing an issue. So I feel like I am back to square one, I know what I need is somthing a question for T, L to give the same ans, but this is what troubling me, I cant see how. Oct 28, 2018 at 19:36
• @james2018 not knowing the answer can also contain information... Oct 28, 2018 at 22:00

Assume you have them standing in front of you, with 1 to 2’s left and 2 to 3’s left. You can

First ask 1 if Sometimes stands to the right of the Liar. If YES, then 1 truth teller => order is TLS. 1 liar => order is LTS. 1 sometimes => order is either SLT or STL. Note that if YES, then person 2 is never the sometimes. If NO, then 1 truthteller => order is TSL. 1 list => order is LST. 1 sometimes => order is either SLT or STL. Note that person 3 is never the sometimes.

Then for the second question,

Ask 2 if answer 1 was YES, or ask 3 if answer 1 was NO. Ask: is there a truthteller in the lineup? Then obviously a YES means truthteller and a NO means liar. So: YES YES => order is LTS or STL. YES NO => order is TLS or SLT. NO YES => SLT or LST. NO NO => order is STL or TSL.

We then can lock down each combination.

YES YES => ask #2 (truthteller) if 1 is a liar. YES = LTS, NO = STL. YES NO => ask 2 (liar) if 1 is a truthteller. YES = SLT, NO = TLS. NO YES => ask 3 (truthteller) if 1 is a liar. YES = LST, NO = SLT. NO NO => ask 3 (liar) if 1 is a truthteller. YES = STL, NO = TSL.

• "And really not looking for an answers but guidance on how to approach a problem like this." I like the answer (it's a lot simpler than the one I was thinking of) but I don't think it's what the OP is asking for... Oct 27, 2018 at 13:50
• That I was asking for guidance?? Oct 27, 2018 at 14:03