Logic Puzzles. “3 ROBOTS” - harder than "Hardest Ever"

A forum for good logic/math puzzles.

Moderators: jestingrabbit, Moderators General, Prelates

benkoren
Posts: 11
Joined: Wed Jun 26, 2019 3:10 pm UTC

Logic Puzzles. “3 ROBOTS” - harder than "Hardest Ever"

Postby benkoren » Wed Jun 26, 2019 3:40 pm UTC

Оriginal Difficulty level: Hardest Ever. (see Wikipedia -The Hardest Logic Puzzle Ever)
Ben's modification Difficulty level: harder than "Hardest Ever".

1. In front of you are three ROBOTS - 1, 2, 3 who know everything and are ready to answer your questions.
2. Answering, ROBOT-1 will always tell the truth, ROBOT-2 will always lie, and ROBOT-3 can either lie or tell the truth in unpredictable way.
3. ROBOTS answers can be given only with the words “YES” or “NO”.
4. Conditions 2. and 3. are mandatory and if they cannot be complied with - no answer will follow.
5. With any of these answers a light bulb on the head of the robot lights up :idea: - indication that the answer was given.
6. You do not know whether ROBOT said “YES” or “NO” when the light comes on. The only thing you know is that he answered.
7. Your task is with help of three questions to identify ROBOTS, however, each question is addressed to only one ROBOT (in any order).

GOOD LUCK! :D

User avatar
phlip
Restorer of Worlds
Posts: 7573
Joined: Sat Sep 23, 2006 3:56 am UTC
Location: Australia
Contact:

Re: Logic Puzzles. “3 ROBOTS” - harder than "Hardest Ever"

Postby phlip » Thu Jun 27, 2019 2:09 pm UTC

Spoiler:
It seems to me that this puzzle is easier than the original "Hardest Puzzle"... because it doesn't actually matter which robot you ask your question to... because that only changes the answer they give that you don't see. Either your question has a true/false value, in which case the light turns on, or it doesn't, and the light stays off... and it's the same, no matter which robot you talk to.

Now, maybe you end up achieving that "it doesn't have a true/false value" status with self-reference to that robot's output you don't see, in which case suddenly it does matter which robot you're talking to... but it's pretty simple to not have to do this. Just ask for the truth value of "P or this statement is false" and the light will light up iff P is true. So now you can ask whatever 3 arbitrary boolean questions you want, and get the right answers back, which is plenty enough to figure out the order.

Code: Select all

enum ಠ_ಠ {°□°╰=1, °Д°╰, ಠ益ಠ╰};
void ┻━┻︵​╰(ಠ_ಠ ⚠) {exit((int)⚠);}
[he/him/his]

Yat
Posts: 136
Joined: Tue Feb 03, 2009 2:05 pm UTC

Re: Logic Puzzles. “3 ROBOTS” - harder than "Hardest Ever"

Postby Yat » Thu Jun 27, 2019 2:22 pm UTC

Spoiler:
My first step would be to find a meta question that allows to map true or false to the light bulb lighting up or not.

The meta sentence applied to a true proposition can have an answer, but when applied to a false proposition, it must be paradoxical. For that, the sentence can refer to its own truthiness, and equate it with the proposition. This sentence is true if and only if X is true. If X is true, then the sentence can be true or false, so the robot can give an answer. If X is false, then the sentence is paradoxical.

So, the questions I would ask the robots would be in the form of "This sentence is true if and only if X. Was the previous sentence true?". By the way, we don't care if they lie, tell the truth or flip a coin, the only important thing is whether they answer or not.

Then, I would label the robots A, B and C, and ask whichever one of them the questions above, with X having the following values :
"A is robot 1"
If the light twitches on, then "B is robot 2"
If not, then "A is robot 2" and "B is robot 1"

on on means 1 2 3
on off means 1 3 2
off on on means 2 1 3
off on off means 2 3 1
off off on means 3 1 2
off off off means 3 2 1

benkoren
Posts: 11
Joined: Wed Jun 26, 2019 3:10 pm UTC

Re: Logic Puzzles. “3 ROBOTS” - harder than "Hardest Ever"

Postby benkoren » Fri Jun 28, 2019 9:41 am UTC

I would like to discuss your meta question
“This sentence is true if and only if X is true” or “ This sentence is true if and only if A is robot 1”.
First of all, robots answer questions - your suggestion is an invitation to a discussion.
Nevertheless, let's try to formulate question from this statement: “Assuming that this question is true only if A-1 is it true - is it true?”
You will get an answer to this question but in essence you just asked “is A is robot 1?”.
Further. “If the light switches on, then … If not, then…”.
There is no option that the question will not be answered - 1 will answer YES or NO in accordance with the truth, 2 will answer NO or YES in accordance with lie, and 3, respectively.
I do not see a situation here where 2 cannot answer without lying.

Yat
Posts: 136
Joined: Tue Feb 03, 2009 2:05 pm UTC

Re: Logic Puzzles. “3 ROBOTS” - harder than "Hardest Ever"

Postby Yat » Sat Jun 29, 2019 7:17 am UTC

benkoren wrote:First of all, robots answer questions - your suggestion is an invitation to a discussion.
You may want to read my post again, especially the actual meta question, which is made of two sentences.
benkoren wrote:You will get an answer to this question but in essence you just asked “is A is robot 1?”.
No, I will get an answer if the statement is true, and no answer if the statement is false. Because if the statement is false, then both answers to the question are self contradictory. The confusions in the rest of your post all come from the same misunderstanding, so just test it with sample situations, it will become more clear.

benkoren
Posts: 11
Joined: Wed Jun 26, 2019 3:10 pm UTC

Re: Logic Puzzles. “3 ROBOTS” - harder than "Hardest Ever"

Postby benkoren » Sat Jun 29, 2019 3:41 pm UTC

I understand that you wanted to use the Liar Paradox - “This sentence is false.” and so on. I can't see you did it.
Your question is "This sentence is true if and only if X. Was the previous sentence true?" You state further that "If X is false, then the sentence is paradoxical." Why? The sentence can either be true or a lie there is no third option and robots have no reason not to respond.
By the way how you explain "If X is true, then the sentence can be true or false?"

Yat
Posts: 136
Joined: Tue Feb 03, 2009 2:05 pm UTC

Re: Logic Puzzles. “3 ROBOTS” - harder than "Hardest Ever"

Postby Yat » Sat Jun 29, 2019 7:47 pm UTC

benkoren wrote:You state further that "If X is false, then the sentence is paradoxical." Why? The sentence can either be true or a lie there is no third option and robots have no reason not to respond.
No, it is neither true nor false: as you pointed out yourself, if X is false, then the statement "This sentence is true if and only if X" sums up to "this sentence is false". The sentence being false would mean it's true, which is contradictory. The sentence being true would mean it is false, which also is contradictory. So, there is no correct answer, the robots can't respond.
benkoren wrote:By the way how you explain "If X is true, then the sentence can be true or false?"
When X is true, "This sentence is true if and only if X" can be rephrased as "this sentence is true". This time it's not paradoxical at all, because if the sentence is true, it just means it's true, but if it's false it also means it is false. So Both options are consistent, the robots can answer either way, and we couldn't care less about what they chose, because we won't even know what they chose. If you somehow consider this to be something that prevents the robots from answering, then phlip's proposition "P or this statement is false" gets rid of the indetermination, so that the robots can't answer when P is false, but have a unique answer when P is true.

benkoren
Posts: 11
Joined: Wed Jun 26, 2019 3:10 pm UTC

Re: Logic Puzzles. “3 ROBOTS” - harder than "Hardest Ever"

Postby benkoren » Sun Jun 30, 2019 12:27 am UTC

You not payng attention to the fact that your sentence does not claim that it is true. It claims that it is a conditional truth. If there is a condition - it is true, if not - it is not true (meaning lie).
So, if the robots know the condition, and they know it, they have no difficulty (contradiction) to determine whether it is true or false. (I spoke with robots they confirm it :) )
I am sorry, but your proposal is not a solution. There is a solution that uses simple classical logic.

Yat
Posts: 136
Joined: Tue Feb 03, 2009 2:05 pm UTC

Re: Logic Puzzles. “3 ROBOTS” - harder than "Hardest Ever"

Postby Yat » Sun Jun 30, 2019 12:15 pm UTC

[quote="benkoren"] You not payng attention[/quote] Well, look who's talking! My solution (and phlip's one, as it is virtually the same) is perfectly valid, but as you seem to be purposefully refusing to understand it, I won't explain it over and over again. Fine by me.

benkoren
Posts: 11
Joined: Wed Jun 26, 2019 3:10 pm UTC

Re: Logic Puzzles. “3 ROBOTS” - harder than "Hardest Ever"

Postby benkoren » Sun Jun 30, 2019 1:55 pm UTC

Sorry. You tried as much as you could.

User avatar
phlip
Restorer of Worlds
Posts: 7573
Joined: Sat Sep 23, 2006 3:56 am UTC
Location: Australia
Contact:

Re: Logic Puzzles. “3 ROBOTS” - harder than "Hardest Ever"

Postby phlip » Wed Jul 03, 2019 3:27 am UTC

benkoren wrote:
your sentence does not claim that it is true. It claims that it is a conditional truth.

This is not the case, however it is a common misconception with people who are relatively new to mathematical logic, due to the imprecision of the English words used to describe it.

When a logician says "if X, then Y" in a context like this, they're not saying that one is "conditional" on the other, and they're not necessarily asserting any sort of causation between the two propositions. All they're saying is that, in the case where X happens to be true, then they're asserting that Y is also true. That is, it's equivalent to a statement that "It is not the case that X is true but Y is false".

Note that this statement is true or false in some situation based entirely on whether X or Y are true or false in that situation, and it has no bearing whether X and Y are in some way related, whether there's some deeper connection between the two that enforces the conditional. That's not what the statement is saying. Even if that's how it might read at first if you haven't come across that specific language before.

If you wanted to assert that a particular "conditional truth" as you put it held, you would have to generalise it, and say it happened in all cases. A statement like: "For all situations, if X is true in this situation, then Y is true in the same situation". But that's a very different statement, that "for all" changes it from talking about some single case, to instead generalising over all the cases. But that's not what we're doing in the solutions above, they're just talking about the single case.

Code: Select all

enum ಠ_ಠ {°□°╰=1, °Д°╰, ಠ益ಠ╰};
void ┻━┻︵​╰(ಠ_ಠ ⚠) {exit((int)⚠);}
[he/him/his]

benkoren
Posts: 11
Joined: Wed Jun 26, 2019 3:10 pm UTC

Re: Logic Puzzles. “3 ROBOTS” - harder than "Hardest Ever"

Postby benkoren » Sat Jul 06, 2019 4:00 am UTC

Greetings to all who are interested in this puzzle. I see many visits, but, unfortunately, not many attempts to find solution.
The solution that was proposed in my opinion is not successful - the “lie paradox” is essentially an effective tool, but it depends entirely on the art of constructing a situation.

Therefore, I want to give a hint.
It is clear that since you are unable to distinguish between the answers and all that you have is an indication if was or was not the answer, pay attention to the fact that “ROBOT-3 can either lie or tell the truth in unpredictable way” which means - neither ROBOT-1 nor ROBOT-2 can tell what he will answer to the next question.
Use it and have fun.

elasto
Posts: 3778
Joined: Mon May 10, 2010 1:53 am UTC

Re: Logic Puzzles. “3 ROBOTS” - harder than "Hardest Ever"

Postby elasto » Sat Jul 06, 2019 6:47 pm UTC

Spoiler:
Here's my attempt:

For my own sense of clarity I am going to rename Robot-1 (the truthteller) as T, Robot-2 (the liar) as L, and Robot-3 (the unpredictable) as U.

The three robots in front of me I am going to label left to right as A, B and C.

--------------------

First we want to find U:

-> I start by asking A: "If I were to ask B 'does 2+2=4?', would he say 'yes'?"

- If B is L or T, then A knows what answer B would give, so A can answer this question, so A lights up.
- If B is U, then A doesn't know what answer B would give, so A cannot answer this question, so A does not light up.

So, using our first question, we have worked out if B is U.

-------------------

Let's assume B was not U, so we need to ask another question to find out who is:

-> I ask B: "If I were to ask C 'does 2+2=4?', would he say 'yes'?"

- By the same logic above, if B does not light up, C is U; If he does then A must be U.

So, using our first two questions, we have found U.

-------------------

For simplicity, let's assume C turned out to be U, so we need to work out which of A and B are L and T.

-> I ask A: "Is your answer to this question 'no'?"

- If A is T, he can't answer, because to say either 'yes' or 'no' would be a lie, so he doesn't light up
- If A is L, he can give either answer, because either one would be a lie, so he lights up

So, using our third question, we have worked out if A is T or L, and therefore we also know the identity of B

--------------------

Have I missed something? It's still a 'liar's paradox' type approach though, and you claim you have a more 'classical' solution...?

benkoren
Posts: 11
Joined: Wed Jun 26, 2019 3:10 pm UTC

Re: Logic Puzzles. “3 ROBOTS” - harder than "Hardest Ever"

Postby benkoren » Tue Jul 09, 2019 3:28 pm UTC

You did it. Congrats.
Sorry I did not answer before - just was busy.

elasto
Posts: 3778
Joined: Mon May 10, 2010 1:53 am UTC

Re: Logic Puzzles. “3 ROBOTS” - harder than "Hardest Ever"

Postby elasto » Tue Jul 09, 2019 10:00 pm UTC

To be fair, you gave a pretty big hint in your last post :D

benkoren
Posts: 11
Joined: Wed Jun 26, 2019 3:10 pm UTC

Re: Logic Puzzles. “3 ROBOTS” - harder than "Hardest Ever"

Postby benkoren » Wed Jul 10, 2019 11:55 am UTC

Smart and modest...

evergreennightmare
Posts: 4
Joined: Tue Jul 09, 2019 4:05 pm UTC

Re: Logic Puzzles. “3 ROBOTS” - harder than "Hardest Ever"

Postby evergreennightmare » Sat Jul 13, 2019 11:02 pm UTC

this solution only works if each robot knows which of the other two robots is which. is there still a solution if they don't?

elasto
Posts: 3778
Joined: Mon May 10, 2010 1:53 am UTC

Re: Logic Puzzles. “3 ROBOTS” - harder than "Hardest Ever"

Postby elasto » Mon Jul 15, 2019 12:55 am UTC

evergreennightmare wrote:this solution only works if each robot knows which of the other two robots is which. is there still a solution if they don't?


Spoiler:
I think you can if you assume that U will always answer if an answer is possible. In that case we use the first two questions to find T, and the last question to find L:

-> You first ask A: "Is your answer to this question 'no'?"

If A doesn't light up, then A is T (answering 'yes' or 'no' would both be lies which only T cannot do)

-> If A does light up, ask B: "Is your answer to this question 'no'?"

If B doesn't light up, B is T, else C is T

Let's assume C turned out to be T (the other cases are symmetrical)

-> You ask A: "Is your answer to this question 'yes'?"

If A doesn't light up, then A is L (answering 'yes' or 'no' would both be truthful which only L cannot do)
If A does light up then A is U

If U is unpredictable via, say, mentally flipping a coin to decide whether to answer with a truth or a lie, then I don't think there is a solution here since you can't distinguish, say, T from U endlessly ending up telling the truth

MakingProgress
Posts: 18
Joined: Wed Jan 02, 2013 7:41 pm UTC

Re: Logic Puzzles. “3 ROBOTS” - harder than "Hardest Ever"

Postby MakingProgress » Sat Aug 03, 2019 7:47 pm UTC

benkoren wrote:Therefore, I want to give a hint.
It is clear that since you are unable to distinguish between the answers and all that you have is an indication if was or was not the answer, pay attention to the fact that “ROBOT-3 can either lie or tell the truth in unpredictable way” which means - neither ROBOT-1 nor ROBOT-2 can tell what he will answer to the next question.
Use it and have fun.



But you said that the robots know EVERYTHING ?
How can a robot that knows everything not know what another robot will answer ? :evil:

benkoren
Posts: 11
Joined: Wed Jun 26, 2019 3:10 pm UTC

Re: Logic Puzzles. “3 ROBOTS” - harder than "Hardest Ever"

Postby benkoren » Sun Aug 04, 2019 12:49 pm UTC

ROBOT-3 can either lie or tell the truth in unpredictable way.

UNPREDICTABLE means something that no one can predict regardless of his knowledge level.


Return to “Logic Puzzles”

Who is online

Users browsing this forum: No registered users and 4 guests