Jump to content
BrainDen.com - Brain Teasers
  • 0

“THE ROBOTS ENIGMA”


koren
 Share

Question

“THE ROBOTS ENIGMA” puzzle

The basis of this puzzle is Raymond’s Smullyan “Three gods puzzle” but with smaller amount of base data, making it more difficult – more difficult than “The hardest logic puzzle ever…”   As you can see, there is an incentive – good luck!

 

Three robots A, B, and C are called, in some order, True - (T), False (F) and Random ®.  (T) is programmed to speaks truly, (F) – falsely, but whether ® speaks truly or falsely is a completely random matter.                                                                    

The robots can answer only YES or NO. Each robot is equipped with two small lamps - red and white.  When robot responds – the red light lights up, but you do not know he said YES or NO.  When there is no answer – lights up the white light.

Your task is to determine the identities of A, B, and C by asking no more than three questions; each question must be put to exactly one robot. 

Link to comment
Share on other sites

Recommended Posts

  • 0

 

I understand that this is the solution of araver. Then the Q1 is: If I ask two your neighbors-robots  question "Does 1+1=2?" would I get a Yes answer from both of them?

let's see:

 

 

OK I think I see what you want.At first it seemed you were saying it wasn't a solution.

ABC are TLR in some order, to be found. Here's the method, step by step. Q1 identifies R. Q2 identifies T.Ask A Q1. If Red    then ask B Q1. If Red     If I take a combination: A is R, B-T and C-L (RTL) I will get 2 Reds at this point but C will remain a liar.                                                                                              The same story is with LTR combination and white respond. 

     

      then C is R. Ask A Q2. If Red         then TLR. 3 questions.         else LTR. 3 questions.      else B is R. Ask A Q2. If Red         then TRL. 3 questions.         else LRT. 3 questions.   else A is R. Ask B Q2. If Red      then RTL. 2 questions.      else RLT. 2 questions.

Actually not. Re-read my posts.

Only Q2 is araver's. Q1 is different.

The solution works because it identifies R and T. L is the other.

 

 

Sorry, but I got lost. 

Is the  Q1 in your solution  "will your second answer to this question be the same as your first answer?"?  

If so:

Your assumption was for T/L/R answers R/R/W, meaning R will not respond. Why?

Here is actually two possible states T/L/L - R is in L mode and T/L/T - R=T. In any case (according to you!) you will get Red.

Link to comment
Share on other sites

  • 0

It was clarified that when R is asked a question he determines the truth of the matter then flips a coin to answer truthfully or not. If the second question has not been asked, therefore, how could R know his answer?

That's the model for R's behavior on which the solution is predicated.

If the model differs, then of course the solution will be different. This type of puzzle has a hundred nuances. We solved one of them that to our satisfaction fits the OP.

There is a knack to stating a problem in a way that permits an unambiguous solution. That's the task of a puzzle writer. Not all puzzles are well posed.

So you've read our solution. If you post yours, I'd be glad to read it.

Link to comment
Share on other sites

  • 0

It was clarified that when R is asked a question he determines the truth of the matter then flips a coin to answer truthfully or not. =these are two unconnected events= If the second question has not been asked, therefore, how could R know his answer? = Following this logic how can any robot know his answer? - R can be in two different modes and if, for example, he stands in L mode he will act exactly as L=

 

That's the model for R's behavior on which the solution is predicated.

If the model differs, then of course the solution will be different. This type of puzzle has a hundred nuances. We solved one of them that to our satisfaction fits the OP.

There is a knack to stating a problem in a way that permits an unambiguous solution. That's the task of a puzzle writer. Not all puzzles are well posed. 

= Look, these remark is not to me. This part of the puzzle I borrowed from such a serious  guys as Boolos and Smullyan and I don't remember that there were complaints in this regard..=

So you've read our solution. If you post yours, I'd be glad to read it.

= I'll wait for a while - just curiosity.= 

Edited by koren
Link to comment
Share on other sites

  • 0

koren,

 

This solution uses the deterministic nature of truth tellers and liars and non-deterministic nature of a random answerer. For any question that has a definitive yes/no answer (e.g. "Is 1+1=2?") both truth tellers and liars can know ahead of time what their answer will be and they can either tell the truth or lie about it. However, a random answerer cannot predict his future behavior, so he cannot answer a question about his next response. Again, as bonanova said, that's based on the assumption that random first determines the true answer to the question and then decides whether to tell the truth or lie. So, if R is asked "will your second answer to this question be the same as your first answer?" he will fail to determine the truth value and show a white light.

 

Now, in your last post, you're suggesting that R assumes either T or L before a question is even asked and then answers the question as T or L would. That's a different behavior and will require a different solution, but R acting as T or L can still produce different answers than T or L would.

 

So, can you clarify the behavior of Random?

Link to comment
Share on other sites

  • 0

Random answerers can be of two types.

  1. Randomly answer yes or no.
  2. Randomly tell the truth or lie.

These are very different behaviors, giving rise to different solutions.

In this puzzle there could be a third type as well: (3) randomly showing Red or White light.

OP describes R's of the second type.

 

For a type two R to reply, s/he must know the correct answer, else s/he does not know whether or not s/he's lying.

Therefore, determining the correct answer is not a separate action. It's a necessary part of replying.

Therefore, if the answer is unknown, then it's not enough simply to know whether or not s/he has chosen to lie.

 

Q1 uniquely identifies R.

The correct answer is unknown. Both Yes and No responses are precluded. A White light must be shown.

T and L know their answers are Yes. They show a Red light.

 

Smullyan may well have another solution.

It will be interesting to read; it probably will also shed light on R's intended behavior.

Link to comment
Share on other sites

  • 0


 

 

Then Random will always reply with a red light. So our task is to come up with a question where Truth and Liar will respond with a white light. Such a question could be: "If I were to ask Random: 'Does 1+1=2?' then how would it respond?" Neither the Truth or Liar robots would know how to answer and they would have to give a White light, but the Random answerer would give a Red light because it always gives a Red light.


 
So you could ask
Robot 1: "If I were to ask Random: 'Does 1+1=2?' then how would it respond?"
If Robot 1 answers Red then he's Random. If White, then ask
Robot 2: "If I were to ask Random: 'Does 1+1=2?' then how would it respond?"
If Robot 2 answers Red then he's Random. Otherwise Robot 3 is random.
 
And then you could ask one of the non-random robots
"What's the opposite of the answer you're about to give?"
Liar would answer with Red, Truth would answer with White.

Then I think Bonanova's answer works.

Then you have to change strategies. You could phrase the first question in such a way that either Truth or Liar would tell you which of the other two robots is the other one of Truth or Liar, so you can be sure that you're asking the next two questions to a non-Random robot.


 
Ask Robot #1: "How would Robot #2 answer the question: 'Does 1+1=2'?"
Truth or Liar would respond with a White light if Robot #2 is Random, or a Red light if Robot #2 is Not Random. So ask your next two questions to Robot #2 if the answer was Red, and to Robot #3 if the answer was White. You can be sure that you're not talking to Random with the next question.
If you asked that first question to the Random robot then it doesn't matter how he answered: since your next questions will not be directed to the robot you were initially talking to anyway, you will still be sure that you're not talking to the Random robot.
 
Second question: "How would you respond to this question?"
Truth would answer with Red, and Liar would answer with White.
 
Third question (to the same robot you asked the second question to): "How would Robot #1 answer the question: 'Does 1+1=2'?"
If the answer is White, then the first robot was Random. If the answer is Red, then the first robot is the other of Truth and Liar.

 

Edit: But I believe that last solution would work no matter how Random behaves.

Edited by plasmid
Link to comment
Share on other sites

  • 0

koren,

 

This solution uses the deterministic nature of truth tellers and liars and non-deterministic nature of a random answerer. For any question that has a definitive yes/no answer (e.g. "Is 1+1=2?") both truth tellers and liars can know ahead of time what their answer will be and they can either tell the truth or lie about it. However, a random answerer cannot predict his future behavior, so he cannot answer a question about his next response. Again, as bonanova said, that's based on the assumption that random first determines the true answer to the question and then decides whether to tell the truth or lie. So, if R is asked "will your second answer to this question be the same as your first answer?" he will fail to determine the truth value and show a white light.

 

Now, in your last post, you're suggesting that R assumes either T or L before a question is even asked and then answers the question as T or L would. That's a different behavior and will require a different solution, but R acting as T or L can still produce different answers than T or L would.

 

So, can you clarify the behavior of Random?

I actually explained it in my post to bonanova:

... if, for example, he stands in L mode he will act exactly as L=

may be should be added "including self-identification as L"

Link to comment
Share on other sites

  • 0

 Random answerers can be of two types.

  1. Randomly answer yes or no.
  2. Randomly tell the truth or lie.                                                                                                                                                                 if we're discussing a puzzle that I proposed Random answerers can be of one type - Randomly telling the truth or lie, using YES or NO=.
     

These are very different behaviors, giving rise to different solutions.

In this puzzle there could be a third type as well: (3) randomly showing Red or White light. =???=

OP describes R's of the second type.

 

For a type two R to reply, s/he must know the correct answer, else s/he does not know whether or not s/he's lying.

Therefore, determining the correct answer is not a separate action. It's a necessary part of replying.

Therefore, if the answer is unknown, then it's not enough simply to know whether or not s/he has chosen to lie.

 

Q1 uniquely identifies R.

The correct answer is unknown. Both Yes and No responses are precluded. A White light must be shown.

T and L know their answers are Yes. They show a Red light.

 

Smullyan may well have another solution.

It will be interesting to read; it probably will also shed light on R's intended behavior.

 

= Smullyans puzzle  is a modification of the ancient enigmas of this type. George Boolos modified his variant, making it more difficult. My puzzle is the next step. =

 

Link to comment
Share on other sites

  • 0

Then Random will always reply with a red light. So our task is to come up with a question where Truth and Liar will respond with a white light. Such a question could be: "If I were to ask Random: 'Does 1+1=2?' then how would it respond?" Neither the Truth or Liar robots would know how to answer and they would have to give a White light, but the Random answerer would give a Red light because it always gives a Red light.

 

So you could ask

Robot 1: "If I were to ask Random: 'Does 1+1=2?' then how would it respond?"

If Robot 1 answers Red then he's Random. If White, then ask

Robot 2: "If I were to ask Random: 'Does 1+1=2?' then how would it respond?"

If Robot 2 answers Red then he's Random. Otherwise Robot 3 is random.

 

And then you could ask one of the non-random robots

"What's the opposite of the answer you're about to give?"

Liar would answer with Red, Truth would answer with White.

 

Then I think Bonanova's answer works.

 

Then you have to change strategies. You could phrase the first question in such a way that either Truth or Liar would tell you which of the other two robots is the other one of Truth or Liar, so you can be sure that you're asking the next two questions to a non-Random robot.

 

Ask Robot #1: "How would Robot #2 answer the question: 'Does 1+1=2'?"

Truth or Liar would respond with a White light if Robot #2 is Random, or a Red light if Robot #2 is Not Random. So ask your next two questions to Robot #2 if the answer was Red, and to Robot #3 if the answer was White. You can be sure that you're not talking to Random with the next question.

If you asked that first question to the Random robot then it doesn't matter how he answered: since your next questions will not be directed to the robot you were initially talking to anyway, you will still be sure that you're not talking to the Random robot.

 

Second question: "How would you respond to this question?"

Truth would answer with Red, and Liar would answer with White.

 

Third question (to the same robot you asked the second question to): "How would Robot #1 answer the question: 'Does 1+1=2'?"

If the answer is White, then the first robot was Random. If the answer is Red, then the first robot is the other of Truth and Liar.

 

Edit: But I believe that last solution would work no matter how Random behaves.

 

Please read the clarification I gave recently to k-man

Link to comment
Share on other sites

  • 0

My last solution will work no matter how Random behaves as long as the other robots can't predict what he'll do.

 

 

Then Random will always reply with a red light. So our task is to come up with a question where Truth and Liar will respond with a white light. Such a question could be: "If I were to ask Random: 'Does 1+1=2?' then how would it respond?" Neither the Truth or Liar robots would know how to answer and they would have to give a White light, but the Random answerer would give a Red light because it always gives a Red light.

 

So you could ask

Robot 1: "If I were to ask Random: 'Does 1+1=2?' then how would it respond?"

If Robot 1 answers Red then he's Random. If White, then ask

Robot 2: "If I were to ask Random: 'Does 1+1=2?' then how would it respond?"

If Robot 2 answers Red then he's Random. Otherwise Robot 3 is random.

 

And then you could ask one of the non-random robots

"What's the opposite of the answer you're about to give?"

Liar would answer with Red, Truth would answer with White.

 

Then I think Bonanova's answer works.

 

Then you have to change strategies. You could phrase the first question in such a way that either Truth or Liar would tell you which of the other two robots is the other one of Truth or Liar, so you can be sure that you're asking the next two questions to a non-Random robot.

 

Ask Robot #1: "How would Robot #2 answer the question: 'Does 1+1=2'?"

Truth or Liar would respond with a White light if Robot #2 is Random, or a Red light if Robot #2 is Not Random. So ask your next two questions to Robot #2 if the answer was Red, and to Robot #3 if the answer was White. You can be sure that you're not talking to Random with the next question.

If you asked that first question to the Random robot then it doesn't matter how he answered: since your next questions will not be directed to the robot you were initially talking to anyway, you will still be sure that you're not talking to the Random robot.

 

Second question: "How would you respond to this question?"

Truth would answer with Red, and Liar would answer with White.

 

Third question (to the same robot you asked the second question to): "How would Robot #1 answer the question: 'Does 1+1=2'?"

If the answer is White, then the first robot was Random. If the answer is Red, then the first robot is the other of Truth and Liar.

 

Edit: But I believe that last solution would work no matter how Random behaves.

 

Please read the clarification I gave recently to k-man

 

 

 

Then Random will always reply with a red light. So our task is to come up with a question where Truth and Liar will respond with a white light. Such a question could be: "If I were to ask Random: 'Does 1+1=2?' then how would it respond?" Neither the Truth or Liar robots would know how to answer and they would have to give a White light, but the Random answerer would give a Red light because it always gives a Red light.

 

So you could ask

Robot 1: "If I were to ask Random: 'Does 1+1=2?' then how would it respond?"

If Robot 1 answers Red then he's Random. If White, then ask

Robot 2: "If I were to ask Random: 'Does 1+1=2?' then how would it respond?"

If Robot 2 answers Red then he's Random. Otherwise Robot 3 is random.

 

And then you could ask one of the non-random robots

"What's the opposite of the answer you're about to give?"

Liar would answer with Red, Truth would answer with White.

 

Then I think Bonanova's answer works.

 

Then you have to change strategies. You could phrase the first question in such a way that either Truth or Liar would tell you which of the other two robots is the other one of Truth or Liar, so you can be sure that you're asking the next two questions to a non-Random robot.

 

Ask Robot #1: "How would Robot #2 answer the question: 'Does 1+1=2'?"

Truth or Liar would respond with a White light if Robot #2 is Random, or a Red light if Robot #2 is Not Random. So ask your next two questions to Robot #2 if the answer was Red, and to Robot #3 if the answer was White. You can be sure that you're not talking to Random with the next question.

If you asked that first question to the Random robot then it doesn't matter how he answered: since your next questions will not be directed to the robot you were initially talking to anyway, you will still be sure that you're not talking to the Random robot.

 

Second question: "How would you respond to this question?"

Truth would answer with Red, and Liar would answer with White.

 

Third question (to the same robot you asked the second question to): "How would Robot #1 answer the question: 'Does 1+1=2'?"

If the answer is White, then the first robot was Random. If the answer is Red, then the first robot is the other of Truth and Liar.

 

Edit: But I believe that last solution would work no matter how Random behaves.

 

Then Random will always reply with a red light. So our task is to come up with a question where Truth and Liar will respond with a white light. Such a question could be: "If I were to ask Random: 'Does 1+1=2?' then how would it respond?" Neither the Truth or Liar robots would know how to answer and they would have to give a White light, but the Random answerer would give a Red light because it always gives a Red light.

 

So you could ask

Robot 1: "If I were to ask Random: 'Does 1+1=2?' then how would it respond?"

If Robot 1 answers Red then he's Random. If White, then ask

Robot 2: "If I were to ask Random: 'Does 1+1=2?' then how would it respond?"

If Robot 2 answers Red then he's Random. Otherwise Robot 3 is random.

 

And then you could ask one of the non-random robots

"What's the opposite of the answer you're about to give?"

Liar would answer with Red, Truth would answer with White.

 

Then I think Bonanova's answer works.

 

Then you have to change strategies. You could phrase the first question in such a way that either Truth or Liar would tell you which of the other two robots is the other one of Truth or Liar, so you can be sure that you're asking the next two questions to a non-Random robot.

 

Ask Robot #1: "How would Robot #2 answer the question: 'Does 1+1=2'?"

Truth or Liar would respond with a White light if Robot #2 is Random, or a Red light if Robot #2 is Not Random. So ask your next two questions to Robot #2 if the answer was Red, and to Robot #3 if the answer was White. You can be sure that you're not talking to Random with the next question.

If you asked that first question to the Random robot then it doesn't matter how he answered: since your next questions will not be directed to the robot you were initially talking to anyway, you will still be sure that you're not talking to the Random robot.

 

Second question: "How would you respond to this question?"

Truth would answer with Red, and Liar would answer with White.

 

Third question (to the same robot you asked the second question to): "How would Robot #1 answer the question: 'Does 1+1=2'?"

If the answer is White, then the first robot was Random. If the answer is Red, then the first robot is the other of Truth and Liar.

 

Edit: But I believe that last solution would work no matter how Random behaves.

 

OK, let's see your last solution.

 

The first question is OK and you find one robot that is not R.

With the second question there is a problem.

The robots are programmed to respond to yes-no question, which means to confirm the content of the question (expected event, statement, circumstances - whatsoever) by YES, or to deny it by NO.

Your question has no content, which can be confirmed or denied.  

In fact it is one of those cases where the robots (including R!) are not responding.

 

There is a problem with the third question too, but I think we can stop at this point.

Link to comment
Share on other sites

  • 0

@koren, even if these answers are not the answer you came up with, they are responsive to the puzzle you posted.

 

I'm guessing you've gotten about all the replies you're going to get; why not share yours?

 

 

 

My dear bonanova  I created  a puzzle and I want to see somebody to solve it

Link to comment
Share on other sites

  • 0

Making the robots "short-circuit", as they say in Perl:

Ask Robot #1: "How would Robot #2 answer the question: 'Does 1+1=2'?"

Truth or Liar would respond with a White light if Robot #2 is Random, or a Red light if Robot #2 is Not Random. So ask your next two questions to Robot #2 if the answer was Red, and to Robot #3 if the answer was White. You can be sure that you're not talking to Random with the next question.
If you asked that first question to the Random robot then it doesn't matter how he answered: since your next questions will not be directed to the robot you were initially talking to anyway, you will still be sure that you're not talking to the Random robot.
 
Second question (to Robot #2 if the first response was Red, or to Robot #3 if the first response was White): "How would Robot #1 answer the question: 'Does 1+1=2'?"
If the answer is White, then Robot #1 is Random. If the answer is Red, then Robot #1 is Truth or Liar and therefore the robot you haven't talked to yet is Random. Now you know who Random is, and you just need identify one of the other two robots.

 

Third question (to the same robot you asked the second question to): "Are both of the following statements true? A) You would answer 'Does 1+1=2?' with a 'Yes'. B) The Random robot would answer 'Does 1+1=2?' with a 'Yes'."

The Liar knows that A is not true, and therefore regardless of the outcome of B he knows that it's impossible for both statements to be true. So to answer the entire question, he would lie about it and reply with a "Yes" to produce a Red light.

The Truth teller would know that A is true but cannot answer B, so he cannot answer the question of whether both A and B are true. So Truth would reply with a White light.

Link to comment
Share on other sites

  • 0

Making the robots "short-circuit", as they say in Perl:

Ask Robot #1: "How would Robot #2 answer the question: 'Does 1+1=2'?"

Truth or Liar would respond with a White light if Robot #2 is Random, or a Red light if Robot #2 is Not Random. So ask your next two questions to Robot #2 if the answer was Red, and to Robot #3 if the answer was White. You can be sure that you're not talking to Random with the next question.

If you asked that first question to the Random robot then it doesn't matter how he answered: since your next questions will not be directed to the robot you were initially talking to anyway, you will still be sure that you're not talking to the Random robot.

 

Second question (to Robot #2 if the first response was Red, or to Robot #3 if the first response was White): "How would Robot #1 answer the question: 'Does 1+1=2'?"

If the answer is White, then Robot #1 is Random. If the answer is Red, then Robot #1 is Truth or Liar and therefore the robot you haven't talked to yet is Random. Now you know who Random is, and you just need identify one of the other two robots.

 

Third question (to the same robot you asked the second question to): "Are both of the following statements true? A) You would answer 'Does 1+1=2?' with a 'Yes'. B) The Random robot would answer 'Does 1+1=2?' with a 'Yes'."

The Liar knows that A is not true, and therefore regardless of the outcome of B he knows that it's impossible for both statements to be true. So to answer the entire question, he would lie about it and reply with a "Yes" to produce a Red light.

The Truth teller would know that A is true but cannot answer B, so he cannot answer the question of whether both A and B are true. So Truth would reply with a White light.

 

I do not know if I violate some kind of procedure, but I would like to ask one more question.

How do you handle the situation - the combination is robot 1-T, 2-R, 3-L.

According to you:

 

"Second question (to Robot #2 if the first response was Red, or to Robot #3 if the first response was White): "How would Robot #1 answer the question: 'Does 1+1=2'?"

If the answer is White, then Robot #1 is Random. If the answer is Red, then Robot #1 is Truth or Liar and therefore the robot you haven't talked to yet is Random. "

 

We talked with a third robot got red, but he was not R?

Link to comment
Share on other sites

  • 0

In that scenario (#1 = Truth, #2 = Random, #3 = Liar):

 

Question 1: Robot #1 (Truth) gives you a White light because he can't tell how Robot #2 (Random) will answer. So you know that Robot #3 is not Random and you ask #3 the next question.

 

Question 2: Robot #3 (Liar) gives you a Red light... it knows that Robot #1 (Truth) would answer with a "Yes" so it lies and answers "No" to produce a Red light. So you know that Robot #1 is either Truth or Liar but can't be Random, and you conclude that #2 (the Robot you haven't talked to yet) must be Random.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...