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

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.

 

Сongrats! You got it. 

Link to comment
Share on other sites

  • 0


A->B->C ordered from left to right (not necessary, but I like to order things before I start doing something)

Assumption - to lie about something depends on previously establishing whether the answer to a question is Yes/No i.e. decidable. So, the assumption is that Random thinks about the question / tries to evaluate it before speaking, then decides to answer truthfully or not to it.

 
Q1. Ask A: If I ask B and C the question "Does 1+1=2?" would I get a Yes answer from both B and C?

 

 
The symmetry of the question means that if either of B or C are random, A cannot respond as he cannot predict what they will answer.
While if both B and C are not random, A can completely predict their answers (only one would say yes), then decide to say the truth or lie about it. Note: If one asks only about one of B and C, one cannot guarantee the random one is mentioned in the question.
 

If A1 = white then: 
- A is truthful/liar and B is random in which case A can't decide/predict what B would respond.
- A is truthful/liar and C is random in which case A can't decide/predict what C would respond.

Either way, A is not random.

If A1 = red then:
- A is random and B and C are not. A can determine which of B and C lies and since only one of them does, can answer Yes or No after he flips a coin.

Q2. Go to anyone identified as not Random e.g. A if 1=white or B if 1=red. Not C (see Q3)
Ask him: Would you answer Yes to this question?
A2=red means this guy tells the truth.
A2=white means he can't possibly answer falsely to this without creating a paradox:

- If he says Yes, then he just told the truth (that he would answer Yes to this question which he did).

- If he says No, then he told the truth (that he would not answer Yes to this question).

So, now you know whether he is a truthteller or a liar. Time to determine the other two.

Q3. Ask the same one you asked the question before: If I would ask C if you're Random would he tell me yes?
A3=red then C is not Random. He is of the opposite type of what this guy we asked is and therefore would lie/tell the truth accordingly. Either way, the answer is Yes/No, hence red.
A3=white then C is Random therefore unpredictable, therefore the correct answer is "I don't know".

After finding C with this question, the third one is uniquely determined by process of elimination.

Link to comment
Share on other sites

  • 0

@koren


For the purposes of this puzzle, let's say each robot has a Light Agent.
When a Robot hears a T/F question, he determines the correct Y/N answer, if he can.
In accord with his personality, Robot privately answers Yes or No to his Light Agent, if he can answer at all, else he is silent.
If the Light Agent hears Yes or No he lights the Red light; if there is silence the Agent lights the White light.
All that a Robot communicates to anyone else is the color of his light.

Consider three statements Si whose truth values are, respectively, True, False, and Undecidable (unknown or paradoxical):
  • 1+1=2 (T)
  • 1+1=3 (F)
  • The next word I say will be "Jabberwocky." Or, "Your reply will be false." (U)

And their corresponding questions: Qi = Is Si true?
If the colored statements above accurately describe the OP,

then I would expect all three of the robots to respond as follows:

 

Q1: Red
Q2: Red
Q3: White

 

T and L will both answer this way, and R must answer like one of them.

 


Clarifying question 1 is: Is this interpretation of OP correct?
If No, you needn't say what part of it is wrong.

I can think of at least two ways that it's not right:

  • When a robot answers Yes or No to his Agent, the other robots, but not the questioner, can hear that answer.
    If so, then Robots can be asked about how other Robots answer to their agents.
    If so, then I think araver has solved the puzzle.

     
  • The Agent for the lying robot L lights the Red light for silence and the White light for Yes or No
    That is, L lies with regard to the color of his light.
    If so, then L's responses to Q1-3 would be White, White, Red.
    If so, then L, at least, can be distinguished from the other two by his answers.


Clarifying question 2 is: Is either of these interpretations correct?
 

Link to comment
Share on other sites

  • 0

Clarification needed:

1. Does Random always answer yes/no? The robots can answer only YES or NO (puzzle text)=  Expecting a NO since he may as well not know the answer to some questions, but I might get a white light asking this question of you :lol: = white light lights up in two cases 1) the robot does not know the answer 2) he can not answer using YES or NO =

2. Also, all robots know each other's type? = naturally = Expecting a definite YES.

Link to comment
Share on other sites

  • 0

A->B->C ordered from left to right (not necessary, but I like to order things before I start doing something)

Assumption - to lie about something depends on previously establishing whether the answer to a question is Yes/No i.e. decidable. So, the assumption is that Random thinks about the question / tries to evaluate it before speaking, then decides to answer truthfully or not to it.

 

Q1. Ask A: If I ask B and C the question "Does 1+1=2?" would I get a Yes answer from both B and C?

 

= in case of this question you get a red light at any of the 6 possible combinations of robots location, i.e. the question makes no sense =

 
The symmetry of the question means that if either of B or C are random, A cannot respond as he cannot predict what they will answer.
While if both B and C are not random, A can completely predict their answers (only one would say yes), then decide to say the truth or lie about it. Note: If one asks only about one of B and C, one cannot guarantee the random one is mentioned in the question.
 

If A1 = white then: 

- A is truthful/liar and B is random in which case A can't decide/predict what B would respond.

- A is truthful/liar and C is random in which case A can't decide/predict what C would respond.

Either way, A is not random.

If A1 = red then:

- A is random and B and C are not. A can determine which of B and C lies and since only one of them does, can answer Yes or No after he flips a coin.

Q2. Go to anyone identified as not Random e.g. A if 1=white or B if 1=red. Not C (see Q3)

Ask him: Would you answer Yes to this question?

A2=red means this guy tells the truth.

A2=white means he can't possibly answer falsely to this without creating a paradox:

- If he says Yes, then he just told the truth (that he would answer Yes to this question which he did).

- If he says No, then he told the truth (that he would not answer Yes to this question).

So, now you know whether he is a truthteller or a liar. Time to determine the other two.

Q3. Ask the same one you asked the question before: If I would ask C if you're Random would he tell me yes?

A3=red then C is not Random. He is of the opposite type of what this guy we asked is and therefore would lie/tell the truth accordingly. Either way, the answer is Yes/No, hence red.

A3=white then C is Random therefore unpredictable, therefore the correct answer is "I don't know".

After finding C with this question, the third one is uniquely determined by process of elimination.

Link to comment
Share on other sites

  • 0

@araver

Nice. But ...

The OP seems contradictory, saying both that ...

1. Robots reply Yes or No.

2. Robots reply Red or White.

 

= Red - robot reply Yes or No, White - there is no reply = 

 

If it's really 2, then we need questions that distinguish between Red and White rather than between Yes and No.

 

Link to comment
Share on other sites

  • 0

@koren

For the purposes of this puzzle, let's say each robot has a Light Agent.

When a Robot hears a T/F question, he determines the correct Y/N answer, if he can.

In accord with his personality, Robot privately answers Yes or No to his Light Agent, if he can answer at all, else he is silent.

If the Light Agent hears Yes or No he lights the Red light; if there is silence the Agent lights the White light.

All that a Robot communicates to anyone else is the color of his light.

= Absolutely cute interpretation. From this point you can proceed to the solution ...=

 

Consider three statements Si whose truth values are, respectively, True, False, and Undecidable (unknown or paradoxical):

  • 1+1=2 (T)
  • 1+1=3 (F)
  • The next word I say will be "Jabberwocky." Or, "Your reply will be false." (U)

And their corresponding questions: Qi = Is Si true?

If the colored statements above accurately describe the OP,

then I would expect all three of the robots to respond as follows:

 

Q1: Red

Q2: Red

Q3: White

Clarifying question 1 is: Is this interpretation of OP correct?

If No, you needn't say what part of it is wrong.

I can think of at least two ways that it's not right:

  • When a robot answers Yes or No to his Agent, the other robots, but not the questioner, can hear that answer.

    If so, then Robots can be asked about how other Robots answer to their agents.

    If so, then I think araver has solved the puzzle.

     

  • The Agent for the lying robot L lights the Red light for silence and the White light for Yes or No

    That is, L lies with regard to the color of his light.

    If so, then L's responses to Q1-3 would be White, White, Red.

    If so, then L, at least, can be distinguished from the other two by his answers.

Clarifying question 2 is: Is either of these interpretations correct?

 

Link to comment
Share on other sites

  • 0

@araver

Nice. But ...

The OP seems contradictory, saying both that ...

1. Robots reply Yes or No.

2. Robots reply Red or White.

If it's really 2, then we need questions that distinguish between Red and White rather than between Yes and No.

I had the same assumption Koren validated for you in the next post - Robots reply Yes, No, or nothing at all but all I see / hear outloud is a red or white light. The answers I get are red/white, but the robot actually responds with Yes, No in case of Red and that's a power of distinguishing that makes it easier to ask questions IMHO, if other robots can relate to and try to put themselves in a position to respond Yes, No, or nothing at all.

Link to comment
Share on other sites

  • 0

 

A->B->C ordered from left to right (not necessary, but I like to order things before I start doing something)

Assumption - to lie about something depends on previously establishing whether the answer to a question is Yes/No i.e. decidable. So, the assumption is that Random thinks about the question / tries to evaluate it before speaking, then decides to answer truthfully or not to it.

 

Q1. Ask A: If I ask B and C the question "Does 1+1=2?" would I get a Yes answer from both B and C?

 

= in case of this question you get a red light at any of the 6 possible combinations of robots location, i.e. the question makes no sense =

 

The symmetry of the question means that if either of B or C are random, A cannot respond as he cannot predict what they will answer.

While if both B and C are not random, A can completely predict their answers (only one would say yes), then decide to say the truth or lie about it. Note: If one asks only about one of B and C, one cannot guarantee the random one is mentioned in the question.

 

If A1 = white then: 

- A is truthful/liar and B is random in which case A can't decide/predict what B would respond.

- A is truthful/liar and C is random in which case A can't decide/predict what C would respond.

Either way, A is not random.

If A1 = red then:

- A is random and B and C are not. A can determine which of B and C lies and since only one of them does, can answer Yes or No after he flips a coin.

Q2. Go to anyone identified as not Random e.g. A if 1=white or B if 1=red. Not C (see Q3)

Ask him: Would you answer Yes to this question?

A2=red means this guy tells the truth.

A2=white means he can't possibly answer falsely to this without creating a paradox:

- If he says Yes, then he just told the truth (that he would answer Yes to this question which he did).

- If he says No, then he told the truth (that he would not answer Yes to this question).

So, now you know whether he is a truthteller or a liar. Time to determine the other two.

Q3. Ask the same one you asked the question before: If I would ask C if you're Random would he tell me yes?

A3=red then C is not Random. He is of the opposite type of what this guy we asked is and therefore would lie/tell the truth accordingly. Either way, the answer is Yes/No, hence red.

A3=white then C is Random therefore unpredictable, therefore the correct answer is "I don't know".

After finding C with this question, the third one is uniquely determined by process of elimination.

 

You just told me no, without actually responding to the previous assumption. If it's not valid please say so :)

If it's valid, your answer is not true.

 

Repeating the assumption:

Assumption - to lie about something depends on previously establishing whether the answer to a question is Yes/No i.e. decidable. So, the assumption is that Random thinks about the question / tries to evaluate it before speaking, then decides to answer truthfully or not to it.

 

Q1. Ask A: If I ask B and C the question "Does 1+1=2?" would I get a Yes answer from both B and C?

 

= in case of this question you get a red light at any of the 6 possible combinations of robots location, i.e. the question makes no sense =

 

If B is random then A cannot possibly answer if I would get a Yes answer from B:

- He cannot say No as B could actually say Yes at a given time

- He cannot say Yes as B could actually say No at a given time

There's no way for A to predict what a Random could say. The only way to get a red light is for A to be perfectly sure what BOTH B and C would respond i.e. both B and C are predictable/not random.

 

That's the way I see it.

 

If the wording is not correct in English, I can clarify the question. The "spirit" of the question is A's inability to predict what BOTH B and C would respond to a question put in the future.

Link to comment
Share on other sites

  • 0

 

@araver

Nice. But ...

The OP seems contradictory, saying both that ...

1. Robots reply Yes or No.

2. Robots reply Red or White.

If it's really 2, then we need questions that distinguish between Red and White rather than between Yes and No.

I had the same assumption Koren validated for you in the next post - Robots reply Yes, No, or nothing at all but all I see / hear outloud is a red or white light. The answers I get are red/white, but the robot actually responds with Yes, No in case of Red and that's a power of distinguishing that makes it easier to ask questions IMHO, if other robots can relate to and try to put themselves in a position to respond Yes, No, or nothing at all.

 

 

The red/white response changes the domain from yes/no to decidable/undecidable.

We have to get beyond that somehow, cuz all three robots respond the same on that point.

Your way of getting to the yes/no domain seems as good as any.

Link to comment
Share on other sites

  • 0

OK let's assume that all I see is Red/White, but that Robots know their own Yes/No answers:


We need a conditional S1 for which R and only R will show a White light.

Then we need a conditional S2 for which T and F will respond predictably with different lights.

 

We use S1 on A and if necessary on B, after which R is identified.

Then we use S2 on one of the others, after which all three are identified.

 

I have S1, but S2 is trickier.

 

[spoiler=S1]

"Will your second answer to this question be the same as your first answer?"

R, at the outset, does not know his second answer so cannot light his Red light. He lights his White light.

T and L know their answers will not change, will answer Yes, and will light their Red lights.

 

Candidates:

"Will you reply to this question in a way that lights your White light?"

T can answer No, truthfully, and his Red light will light.

L can't answer No, because his Red light will mean No was a truthful answer.

But L can reply Yes, because that Red light will make his Yes a lie.

 

So that question does not work.

 

Still thinking on this one. Others are welcome to find one that works. ;)

 

Link to comment
Share on other sites

  • 0

So the araver/bonanova/plasmid solution is...

Q1: will your second answer to this question be the same as your first answer? T/L/R answer R/R/W

Q2: will you answer Yes to this question? T/L answer R/W

Ask Q1 of A. If answer is Red, ask Q1 of B. This identifies Random.

Ask Q2 of one one the others. This identifies Truth and Liar.

Link to comment
Share on other sites

  • 0

So the araver/bonanova/plasmid solution is...

Q1: will your second answer to this question be the same as your first answer? T/L/R answer R/R/W

Q2: will you answer Yes to this question? T/L answer R/W

Ask Q1 of A. If answer is Red, ask Q1 of B. This identifies Random.

Ask Q2 of one one the others. This identifies Truth and Liar.

= Without going into the question-answer logic I should note that there is a basic misunderstanding (maybe my fault) - you can ask only three times and ​​no matter it's the same question or different questions = 

Link to comment
Share on other sites

  • 0

Three God's Puzzle says: questions are permitted to depend on the answers to earlier questions

 

To clarify your last post, are you saying all three questions must be asked before any answers are received?

It is not a condition - completely your choice. The only condition is no more than three questions, each of which is addresses only one robot and not a group.

Link to comment
Share on other sites

  • 0

So the araver/bonanova/plasmid solution is...

Q1: will your second answer to this question be the same as your first answer? T/L/R answer R/R/W

Q2: will you answer Yes to this question? T/L answer R/W

Ask Q1 of A. If answer is Red, ask Q1 of B. This identifies Random.

Ask Q2 of one one the others. This identifies Truth and Liar.

= Without going into the question-answer logic I should note that there is a basic misunderstanding (maybe my fault) - you can ask only three times and ​​no matter it's the same question or different questions =
There is (actually) no misunderstanding.

You actually did not take into consideration questions regarding future potential questions. And therefore are unable to imagine this kind of questions as valid. They actually use up only 1 question at a time to a single person so they are valid under what you have written as the OP.

However, if you wish to impose a restriction on the syntax or the semantics of the questions, please make it a part of the OP.

Link to comment
Share on other sites

  • 0

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
      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.

Link to comment
Share on other sites

  • 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.

Link to comment
Share on other sites

  • 0

let  p1=(you are true), p2=(red means yes),p3=(any certain assertion), &&=and,||=or, !=not,

F(p3) = (p1 && ((p2 && p3) || (!p2 && !p3))) || (!p1 && ! ((p2 && p3) || (!p2 && !p3)))

if we want to know weather p3 is true from a not random robot, we can ask it like this:

F(p3)  is true?

if red, then p3 is true, else p3 is false.

now the solution is easy.

1.ask A:

F(B is not random) is true?

if red,then B is not random,else C is not random.(if A is random, this is also true)

2.we ask the not random robot found in 1, here just let B is the not random robot found in 1:

F(you are true robot) is true?

if red, B is true robot,else, B is false robot.

3.if B is true, ask B:

F(A is false robot) is true?

if B is false, ask B:

F(A is true robot) is true?

Link to comment
Share on other sites

  • 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.

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...