General Question

LostInParadise's avatar

Can you solve this logic puzzle?

Asked by LostInParadise (32218points) May 5th, 2012

There is a whole genre of puzzles about truth tellers and liars. I just came across this one and found it kind of interesting.

There are three people, who we will label as A, B and C. They all respond only to yes/no questions. One of them always tells the truth. Another one always lies. The third answers yes or no completely at random, in effect flipping a mental coin for each question. Each of the people is aware of the behavior of the others.

How can you determine who A, B and C are by asking 3 questions, each directed at one person at a time?

Observing members: 0 Composing members: 0

25 Answers

ragingloli's avatar

Just ask them any question while they are in an MRI device.
(3 questions each, or 3 questions altogether?)

josie's avatar

Ask each one
1. If I ask you to tell me the truth, will you?
2. If I ask (second person) to tell the truth will they?
3 if I ask ( third person) to tell the truth will they?

Only C will answer three times. A and B will only be able to answer twice, since neither yes nor no will apply in one of their questions cases
A ‘s two answers will be Yes, No in that order, (does not have to be consecutive)
B’s two answers will be No, Yes in that order (does not have to be consecutive)

LostInParadise's avatar

@josie , I should have been clearer. The total number of questions must be 3.

digitalimpression's avatar

No. No I can’t.

LostInParadise's avatar

Sure you can. It just takes a little strategic thinking.
For those wanting a hint, let me start you off on how to think about this. First, let’s do a global numeric analysis. There are 3! = 6 possibilities for assignment of A, B and C. The number of possible sequences of answers is 2 * 2 * 2 =8, which covers the number of possible arrangements, If this were not the case then no answer would be possible. After the first question there must be no more than 4 possibilities and for the last question there must be no more than 2.

Let T, L and R stand respectively for truth teller, liar and random truth teller.

Asking questions of the random truth teller is pointless, so we devise a strategy to avoid R. We can’t do this for the first question, but we can framing a question to A so as to avoid R for the other two questions. We can do this by having a yes answer to the question mean that B is either L or T and a no answer mean that C is L or T. Note firstly that if A = R, the condition is true, irrespective of R’s answer, and secondly these conditions would allow for only 4 possibilities after the first question
.

whitenoise's avatar

Why so quick with hints? I just woke up.

Trillian's avatar

@LostInParadise, @josie is correct. He asked three questions of each person, but the two who only lie or only tell the truth can only answer two of them, since the random person requires an answer other than yes or no.
The truth teller will answer; yes, no and not answer the third Q. The liar will answer; no, yes, and not answer the third. The random person will answer all three randomly.
The total number of questions must be three, the number of answers are something else altogether.

whitenoise's avatar

@Trillian it’s @LostInParadise‘s puzzle. We cannot change the rules. A question may onl be asked to one at a time.

@LostInParadise
I have trouble understanding your logic. If you ask A a framing question to make sure either B or C is always either always True [T] or always Lying [L] then that will fail.

The reason:
If A is random [R] then A’s answer is irrelevant.
If A is either T or L, then neither B nor C can be regarded as a choice between T or L, since either T or L has then been taken by A.

Trillian's avatar

Ah, read that wrong. Twice.

digitalimpression's avatar

@LostInParadise I actually looked up the solution and it was more confusing than the question itself. I could figure it out.. but it reminds me too much of college math class.

LostInParadise's avatar

@whitenoise , I am having trouble understanding your objection. Here is what I am saying. Suppose that a question can be asked of A so that if A=L or A=T, a yes answer means that B is L or T and a no answer means that C is L or T. If A=R, then both B and C are L or T, so the pattern still holds true.

More specifically, a yes answer reduces the possibilities for
ABC to be:
RTL
LTR
RLT
TLR

These are all the ways that B can be L or T.

A no answer gives these possibilities:
LRT
RLT
RTL
TRL

Those are all the ways that C can be L or T.

PhiNotPi's avatar

(to first person) Will you answer “no” to this question? The liar can say either yes or no, the random guy can say either, but the honest guy cannot respond.

If there is no response: The first guy is the honest one! Just ask him whether the second guy is the liar, and the puzzle will be solved with one question to spare!

If there is a response:

(To second person) Will you answer “no” to this question? The liar can say either yes or no, the random guy can say either, but the honest guy cannot respond.

If there is a response: The third guy is the honest guy. Ask him whether the first guy is the liar.
If there is no response: The second guy is the honest guy. Ask him whether the first guy is the liar.

whitenoise's avatar

re:(to first person) Will you answer “no” to this question? The liar can say either yes or no, the random guy can say either, but the honest guy cannot respond.

I don’t see the question. “The liar can say either yes or no, the random guy can say either, but the honest guy cannot respond.” is a statement.

or is your question: “Will you say no to this question?”

PhiNotPi's avatar

Well then…

whitenoise's avatar

If the question is “Will you say no to this question?”, then the consistent liar cannot answer with no either.

As soon as he is planning to say no, he’d have to answer with “yes”, in order to lie.

I do think you solved it though.

whitenoise's avatar

It was fun… GQ

LostInParadise's avatar

The liar can’t answer the question either. He can’t “dishonestly” answer the question. Just like the truth teller he does not know what he will say, so he can’t give the negation.

MilkyWay's avatar

I’ve got a headache. :/

whitenoise's avatar

The liar can say yes.

If he intended to say no, he would have to lie and say yes. Even then the answer would be a lie in contradicion to the question.

What was your intended solution? I cannot find a suitable framing question.

PhiNotPi's avatar

I think that the constraint of “all questions must be always answerable by anyone” might make it impossible.

I am going to prove this by making the random guy malevolent. This is possible because some series of random flips can exactly match any particular behavior.

Imagine a random guy who will try his best to “clone” either the honest or lying guy. The clone will pick either the liar or honest guy and pretend that he is that person and that the person he is cloning is the actual clone.

How do you tell who is the clone?

First, it is possible to tell who he is cloning. EX: If two people answer yes to “is 2+2=4”, then the clone is trying to clone the honest guy.

If he tries to clone the honest guy, then it is impossible to ask the honest guy any question that could to tell who is the clone. You must extract the information from the lying guy, who knows the answer.

If he tries to clone the dishonest guy, then it is impossible to ask the dishonest guy any question that could to tell who is the clone. You must extract the information by asking the honest guy, who knows the answer.

The problem is that I think the worst case scenario is that it will take all three questions to even identify who the clone is cloning, which is a prerequisite of figuring out who is the clone.

If you ask a question to the first guy, it can tell you if he is truthful or not, but not whether or not he is the clone. Any other information gained isn’t quite useful yet.

Then you ask the second guy something. In the worst case, this guy will be of opposite type: if the first guy appeared to be honest, this guy will appear to be dishonest.

Now, since there is no way to tell who the clone is cloning yet, you must ask the last guy. This uses up the third and final question, and since you do not yet know which of the two are the clone, you failed to solve the riddle.

At first thought, there might be a possible way around this: obtaining more information from each question than just whether the person being asked was a truth-teller of liar. But any question of the form “is 2+2=4 and the second person a liar” fails to definitively tell both whether the person is truthful and whether the second person is a liar. So, I do not think that it is possible.

LostInParadise's avatar

Suppose you know that you are speaking to T. You could ask, Does B=L?. A yes satisfies condition of B being L or T.

If you knew you were speaking to L you could ask Does B=R? A yes answer would mean that B=T, again satisfying B = L or T.

Now the trick is to combine the two questions. You ask, Is it the case that either you are T and B=L or that you are L and B=R.

T will say yes only if B=L
L will say yes only if B=T.

T will say no only if B=R and C=L
L will say no only if B=R and C=T.
In either case C = L or T.

If A = R, both B and C satisfy being L or R.

That was the hard part. The rest is easy. If you get a yes answer, you know that B= T or L. Ask B any question with an obvious answer, like does 1 + 1= 2? This will tell you if you are speaking to T or L. It also cuts the number of possibilities to 2. For the last question, you can ask B, Does A=R?, and based on the answer you know A, B and C.

The same procedure works if the answer to the first question is no, only now you ask the two other questions to C.

If you want to be more diplomatic and not directly imply that A might be a liar, a question equivalent to the first question is, Is it the case that either B=L and C=R or B=R and C=T?

PhiNotPi's avatar

I’m depressed: I just wasted my time making a big fancy proof that doesn’t work.

LostInParadise's avatar

Been there. What else is there other than mathematics that can be so rewarding at times and so frustrating at other times?

Hypocrisy_Central's avatar

I don’t know of the puzzle got answered but to be clear, do the asker know which of the three always lies, always tell the truth or lies at random, and if not, I cannot see how one can determine who is speaking the truth because it has to be taken they all can lie so there is no standard to go off of.

Answer this question

Login

or

Join

to answer.

This question is in the General Section. Responses must be helpful and on-topic.

Your answer will be saved while you login or join.

Have a question? Ask Fluther!

What do you know more about?
or
Knowledge Networking @ Fluther