Can you solve the hardest logic problem?

  • Thread starter Willelm
  • Start date
  • Tags
    Logic
In summary: Random god is the one who knows the answer to the question. In summary, the Hardest Logic Puzzle Ever is a three question problem with two possible answers in which only one of the answers is correct. The Random answer is the one who knows the answer to the question without being told.
  • #1
Willelm
24
0
Maybe you know that that problem was about 3 gods. 1 tells the truth, other always lie, and the last god gives a random answer. The gods can only answer a yes/no question.
Can you tell what god lies, tell the truth or give a random answer with only 2 And ONLY 2 questions? Harder than it was, of course. In aprox 5 days I'll tell you the answer.
Clue: a question here equals a question with the answer of the god.
 
Physics news on Phys.org
  • #2
What happens with questions where both "yes" and "no" are incorrect (for the truth-god) or correct (for the liar-god)?

Without abusing those questions (this option depends on the answer to my question), there are at most 4 different answers, but you have to distinguish 6 different cases, which is not possible in general.
You can always identify at least one god, however.
 
  • #5
Willelm said:
Hey, in that puzzle you have 3 questions. In this puzzle you have only 2
Then that would have to take it from "hardest" to "impossible", wouldn't you think? It could depend what constraints you modify.
 
Last edited:
  • #6
jerromyjon said:
Then that would have to take it from "hardest" to "impossible", wouldn't you think? It could depend what constraints you modify.
Is not true. What if we ask a god "what would the random God will answer to the question Q in this moment? We'll know what god/s are not random.
 
  • #7
Willelm said:
Is not true. What if we ask a god "what would the random God will answer to the question Q in this moment? We'll know what god/s are not random.
You are allowed to only made 2 Yes-No questions.
My question for all 3 gods: Are you god ?
You have 2 cases [(Truth god+Random god ) vs (Random god+Liar god)] (e.g To such a question, Truth god always says Yes, you don't know about random god, Liar god always says No and you don't know about random god)
Because you didn't mention how many times I can repeat the same question, I will make the question "Is this guy random God ?" 1000 times to each case.
Liar god knows but he will always lies, so he would always say No while the random god will switch repeatedly between yes and no :biggrin:, so I can find out the random god in case 2. and so can the similar explanation be done for the first case.
 
  • #8
Silicon Waffle said:
My question for all 3 gods: Are you god ?
I think that counts as three questions.
Silicon Waffle said:
Because you didn't mention how many times I can repeat the same question, I will make the question "Is this guy random God ?" 1000 times to each case.
And that as 3000.
 
  • Like
Likes Silicon Waffle
  • #9
Willelm said:
Can you tell what god lies, tell the truth or give a random answer with only 2 And ONLY 2 questions?

No. Provably no.

You are asking to determine the identities of all 3 gods. There are six possibilities - LTR, LRT, RLT, RTL, TLR, TRL. Two questions have four and only four possible answers: YY, YN, NY, NN. You cannot map the four answers to the six possibilities. QED.
 
  • Like
Likes Silicon Waffle
  • #10
A more interesting question a) better defines the Random answer and b) involves a puzzle like "Which door leads to the lady, and which to the tiger". I would argue that a Random answer involves a) flipping coins in advance on whether to tell the truth or lie, b) letting the other gods see the coin, and c) providing the same answer to the same question and not re-flipping. There are other definitions one could use - one could have a supply of Liars and Truth-Tellers and randomly pick one for the third god. This actually makes things easier than the previous definition.

Suppose you had N gods on the island, one Liar, one Truth-Teller, and N-2 Randoms. How many questions would you need? You need to identify either the Liar or Truth-Teller, and get the answer to one question. The second part is one bit of information. The first part can be represented as the number in some list of the god in question, and so needs log2(N) bits to represent that. So our answer is log2(N)+1 or log2(2N). That doesn't mean that this can be solved in that many questions - it means it cannot be solved in fewer than that many questions.

So, for three gods and one door, you need no fewer than three questions to determine which door to open. You also need no more than three - you can ask each god the following question: "If I were to ask the non-Random member of the other two gods which door had the tiger behind it, what would he say?' Now, either two or three gods point at the same door. That one has the lady behind it.
 
  • Like
Likes Greg Bernhardt
  • #11
Vanadium 50 said:
I would argue that a Random answer involves a) flipping coins in advance on whether to tell the truth or lie, b) letting the other gods see the coin, and c) providing the same answer to the same question and not re-flipping.
The easiest definition is a god that simply flips a coin each time it has to answer. For meta-questions (e.g. ask the truth god "what would A answer" with A=random), the god will insert a random answer which is then processed as usual.
Vanadium 50 said:
Suppose you had N gods on the island, one Liar, one Truth-Teller, and N-2 Randoms. How many questions would you need?
At least N-1. Even if you ask a different god each time, the first N-2 gods can be random, which means you cannot use the answers reliably to get certainty about anything. I expect the true number to be much higher. A nondeterministic approach is probably much better in terms of expectation value: "Are you the truth god"? => every "no" means the god is random, as expectation value you need ~ 2 N questions.

Vanadium 50 said:
So, for three gods and one door, you need no fewer than three questions to determine which door to open.
For one door? ;) For three doors, you can guarantee to find the door with three questions, in 1/3 of the cases you actually know it after the second question.
If the random god is either "always truth" or "always lie", then two questions are sufficient.
 
  • #12
Working it out now, but the questions need to be the stripe of asking one about the others. Either it's "is the guy next to you a god" or "would the guy next to you tell me you're not a god?"

How about asking 1 if 2 would tell me that 1 and 3 aren't gods, and then asking 2 if 1 would tell me that 2 and 3 are gods?
 
Last edited by a moderator:
  • #13
mfb said:
For one door?

I guess that for one door, it's zero questions. :smile:

I was thinking two doors. For three doors, you need only an extra half-bit, so I believe you that you cam solve that one in three questions as well.
 
  • #14
For three gods and two doors, two questions are sufficient.
The first question gives you one god that is not random, the second one gives you the door.
 
  • #15
There are 3 gods: god 1, god 2, god 3.
Look this algorithm:

Ask god 1 "What would the random God will answer to the question Q (you can choose the correct answer to question Q) in this moment?":
if god 1 don't answer (becouse don't know the answer, so isn't the random god, and this question hasn't got a value):
-god 1 can't be the true god.
-ask god 1 question Q:
if god 1 tells the truth, god 1 is the True God:
-ask god 1 if god 2 or god 3... you know the next(if not, post me).

Can you see that its posible with 2 questions?
 
  • #16
Willelm said:
if god 1 don't answer
.. then it violates the condition that the gods give an answer. That's what I was asking about in post 2 - what happens if neither "yes" nor "no" is a valid answer? If you can get a third possible reaction from the god, things are different.
Willelm said:
if god 1 don't answer (becouse don't know the answer, so isn't the random god, and this question hasn't got a value):
-god 1 can't be the true god.
Why not? It cannot be random, but it could lie.
 
  • #17
mfb said:
.. then it violates the condition that the gods give an answer. That's what I was asking about in post 2 - what happens if neither "yes" nor "no" is a valid answer? If you can get a third possible reaction from the god, things are different.
Why not? It cannot be random, but it could lie.
It can't because the random answer Yes/No is asked to be answer by the random god in a certain time ("this moment"), so when I ask to god 1 "What would the random God will answer to the question Q in this moment?" If god 1 wasn't the random god, he never could answer, becouse the random god never answer in that time("this moment", and that was the question. god 1 can't answer yes or no becouse it's imposible to know a imposible situation.

As I made the answer as an algorithm, if god 1 wasn't the random god, he would don't answer.
About what happened about question where yes and no answers are incorrect I didin't say nothing, so it doesn't violates any rules
 
  • #18
Willelm said:
if god 1 wasn't the random god, he would don't answer.
I don't follow your argument (that might be a possible interpretation, but then you have to define the behavior of the gods much more precisely - again, see post 2), but this is in conflict with your other statement that it cannot be the truth god if we don't get an answer.
 
  • #19
 
  • #20
mfb said:
I don't follow your argument (that might be a possible interpretation, but then you have to define the behavior of the gods much more precisely - again, see post 2), but this is in conflict with your other statement that it cannot be the truth god if we don't get an answer.
Mmm... I'll try to explain how the gods behave. The truth/liar gods are OBLIGATED to tell the truth or lie (that means that it know the correct answer in case of the truth god or the wrong answer in case of the liar god), but the random god can do what he whants! This is intuitive.
Of course the key of the answer is to ask YES/NO questions where yes and no are both incorrect becouse the god don't know! You had the key, and it was correct!

If god 1 don't answer, he isn't the random god becouse he can't answer the truth or the lie of something that he can't know! He can't know what random god will answer to question Q in that moment if he's not random-god. Is mathematical!
 
  • #21
Willelm said:
If god 1 don't answer, he isn't the random god becouse he can't answer the truth or the lie of something that he can't know! He can't know what random god will answer to question Q in that moment if he's not random-god. Is mathematical!
Okay, fine.
Assume god 1 does not answer. Now you have four cases left:
Truth, Random, Lie
Truth, Lie, Random
Lie, Random, Truth
Lie, Truth, Random
... and no question can distinguish between the four cases.Here is a solution with your protocol to handle random. A key question is "Do you lie?" where both Truth and Lie will reply with "no", but Random's answer is unknown to the other two:
Ask god 1: "If I ask God 2 'Do you lie?', what would be its answer?"
1) Truth, Random, Lie -> no answer
2) Truth, Lie, Random -> god 2 would answer "no", so 1 will report "no".
3) Lie, Random, Truth -> no answer
4) Lie, Truth, Random -> god 2 would answer "no", so 1 will report "yes".
5) Random, Truth, Lie -> random answer
6) Random, Lie, Truth -> random answer

If we get no answer, god 2 is random and only cases 1 and 3 are left. We can ask god 1 "are there three gods here?" or any other trivial question to see if it lies.
If we get the answer "yes", we have cases 4, 5 and 6 left. The same trick works again: Ask god 2 ""If I ask God 3 'Do you lie?', what would be its answer?"
-- case 4: Truth does not now the answer and does not reply.
-- case 5: Lie would answer "no", so Truth reports "no".
-- case 6: Truth would answer "no", so Lie reports "yes".
If we get the answer "yes", we have cases 2, 5 and 6 left. Ask the same questions as with "no", with the same analysis.
 
  • #22
mfb said:
Okay, fine.
Assume god 1 does not answer. Now you have four cases left:
Truth, Random, Lie
Truth, Lie, Random
Lie, Random, Truth
Lie, Truth, Random
... and no question can distinguish between the four cases.Here is a solution with your protocol to handle random. A key question is "Do you lie?" where both Truth and Lie will reply with "no", but Random's answer is unknown to the other two:
Ask god 1: "If I ask God 2 'Do you lie?', what would be its answer?"
1) Truth, Random, Lie -> no answer
2) Truth, Lie, Random -> god 2 would answer "no", so 1 will report "no".
3) Lie, Random, Truth -> no answer
4) Lie, Truth, Random -> god 2 would answer "no", so 1 will report "yes".
5) Random, Truth, Lie -> random answer
6) Random, Lie, Truth -> random answer

If we get no answer, god 2 is random and only cases 1 and 3 are left. We can ask god 1 "are there three gods here?" or any other trivial question to see if it lies.
If we get the answer "yes", we have cases 4, 5 and 6 left. The same trick works again: Ask god 2 ""If I ask God 3 'Do you lie?', what would be its answer?"
-- case 4: Truth does not now the answer and does not reply.
-- case 5: Lie would answer "no", so Truth reports "no".
-- case 6: Truth would answer "no", so Lie reports "yes".
If we get the answer "yes", we have cases 2, 5 and 6 left. Ask the same questions as with "no", with the same analysis.
Hey, you'd solve the problem, but with 3 questions, and this problem is about 2. You know the key of the problem, Questions where yes and no are both incorrect except for the random god.

Reading your first paragraph of your argument, you told that no question can distinguish between the four cases, but remember that a valid question was a question + answer. So, You have 2 (no 1) more questions where you can then identify the gods, becouse with my first question you know who god/s are not the random god.

The question "what random god will answer to question Q in that moment" only can be answered by the random god, but your question (Ask god 1: "If I ask God 2 'Do you lie?', what would be its answer?") can be also answered in some cases by the truth and the liar god. Can you see the point?
Thanks for your time.
 
  • #23
Willelm said:
Hey, you'd solve the problem, but with 3 questions, and this problem is about 2.
No, I just need two questions. The answer to the first question (to god 1: "If I ask God 2 'Do you lie?', what would be its answer?") determines which question to ask next.

Willelm said:
Reading your first paragraph of your argument, you told that no question can distinguish between the four cases, but remember that a valid question was a question + answer.
It is obvious that I include the answer if I say "no question can distinguish ...", because the answer is the only thing that actually gives information.
If you think your solution is valid, please show a full and specific analysis of the different cases. God 1 does not answer. What do you do now? How do you figure out which of the four cases we have?

Willelm said:
The question "what random god will answer to question Q in that moment" only can be answered by the random god, but your question (Ask god 1: "If I ask God 2 'Do you lie?', what would be its answer?") can be also answered in some cases by the truth and the liar god.
Right, in cases 2 and 4, that is an important feature that your approach is missing.
 
  • #24
Willelm, for someone who posted a logic puzzle, you are being surprisingly illogical.

1. Your "solution" requires several unspecified conditions In particular, it assumes that there are three possible answers, yes, no, and silent, but the random god is not allowed to randomly choose "silent". It also assumes that the Liar and Truth-Teller have no way to infer what Random will do. This is not true, and at least one method on this very issue has been described in this thread. Here's the simplest one: the Random guy flips two coins before this starts and tells his colleagues "Based on these coins, I am going to answer the first question No and the second one Yes, irrespective of the question." Can't get more random than that, but the other two know what he will say.

2. You have ignored the (at least) three messages that map the number of possible answers to the number of remaining combinations. That's not very logical either. Actually, maybe "ignored" is the wrong word. "Dismissed" might be a better word - "Is mathematical!" is very dismissive, and not very respectful. The rest of the forum has listened to you. Don't we deserve the same courtesy?

Related to that, it's no fun talking to someone who isn't listening and just repeats the same thing over and over.
 
  • #25
Vanadium 50 said:
Willelm, for someone who posted a logic puzzle, you are being surprisingly illogical.

1. Your "solution" requires several unspecified conditions In particular, it assumes that there are three possible answers, yes, no, and silent, but the random god is not allowed to randomly choose "silent". It also assumes that the Liar and Truth-Teller have no way to infer what Random will do. This is not true, and at least one method on this very issue has been described in this thread. Here's the simplest one: the Random guy flips two coins before this starts and tells his colleagues "Based on these coins, I am going to answer the first question No and the second one Yes, irrespective of the question." Can't get more random than that, but the other two know what he will say.

2. You have ignored the (at least) three messages that map the number of possible answers to the number of remaining combinations. That's not very logical either. Actually, maybe "ignored" is the wrong word. "Dismissed" might be a better word - "Is mathematical!" is very dismissive, and not very respectful. The rest of the forum has listened to you. Don't we deserve the same courtesy?

Related to that, it's no fun talking to someone who isn't listening and just repeats the same thing over and over.
I always read and understand your replies, I don't ignore, I promise. But you are always angry with me, and I told you that I'm not a English native.
About the adjectives I use, I never try to be unrespectfull, only that I'm not native and I don't have a full vocabulary, but even that, I think that I have a good level.
There are not 3 different options to answer, are mainly 2, but if a god can't answer, he can't answer. If the random god would need to be silent, he could be silent. But that's improbable, we, humans, can't find a question that the random god can't answer, but this doesn't mean that he isn't allowed to be silent! I remember that a valid question is a question + answer.

Also, just to remember the 3 gods can answer yes or no, but they also could can't answer! That's not illogical.
In a few I'll post my answer. Please, remember I never want anyone to be angry with me.
 
  • #26
Ok, my answer:

6 different cases:
: god 1, god 2, god 3
1- Truth, Lie, Random
2- Truth, Random, Lie
3- Lie, Random, Truth
4- Lie, Truth, Random
5- Random, Truth, Lie
6- Random, Lie, Truth

Ask god 1 "What random god will answer to question Q in this moment?":
If god 1 answer, god 1 is Random god (case 5 and 6).
Question 2 : Ask god 2 a trivial question like "Is true that 1+1=2?" (in this case of answer "yes"):
If god 2 tells the truth ("yes"), god 2 is Truth god and the case is case 5.
If god 2 lies ("no"), god 2 is Liar god and the case is case 6.
If god 1 don't answer, this question is not a valid question, and god 1 isn't Random god (case 1, 2, 3, and 4)
Question 1: Ask god 1 a trivial question like "Is true that 1+1=2?" (in this case of answer "yes"):
If god 1 tells the truth ("yes"), god 1 is Truth god (case 1 and 2).
Question 2: Ask god 1 if god 2 is Random god:
If god 1 answer "yes" the case is case 2.
If god 1 answer "no" the case is case 1.
If god 1 lies ("no"), god 1 is the Liar god (case 3 and 4)
Question 2: Ask god 1 if god 2 is Random god:
If god 1 answer "yes" the case is case 4.
If god 1 answer "no" the case is case 3.

Here is my solution with 2 questions!
 
  • #27
Time to close this down.
 

Related to Can you solve the hardest logic problem?

1. What is the hardest logic problem?

The hardest logic problem is subjective and can vary depending on the individual's skills and knowledge. However, some popular contenders for the hardest logic problem include the P versus NP problem, the Goldbach conjecture, and the Collatz conjecture.

2. Can anyone solve the hardest logic problem?

While there are many talented and dedicated individuals working on solving the hardest logic problem, it is not guaranteed that anyone will be able to solve it. Some problems have remained unsolved for decades or even centuries.

3. How do scientists approach solving the hardest logic problem?

Scientists approach solving the hardest logic problem by breaking it down into smaller, more manageable parts. They use critical thinking, deductive reasoning, and advanced mathematical techniques to analyze and solve these problems.

4. Is there a specific method or strategy for solving the hardest logic problem?

There is no one specific method or strategy for solving the hardest logic problem. Different scientists may use different approaches depending on their expertise and the nature of the problem. However, some common techniques include trial-and-error, mathematical proofs, and computer simulations.

5. Why is it important to solve the hardest logic problem?

Solving the hardest logic problem can lead to a better understanding of the world and can have practical applications in various fields such as computer science, mathematics, and philosophy. It also allows for the advancement of human knowledge and can inspire further research and discoveries.

Similar threads

Replies
2
Views
1K
  • General Discussion
3
Replies
102
Views
7K
Replies
4
Views
250
  • General Discussion
Replies
11
Views
4K
  • Set Theory, Logic, Probability, Statistics
Replies
9
Views
598
  • Precalculus Mathematics Homework Help
Replies
2
Views
2K
  • General Discussion
2
Replies
49
Views
41K
  • General Discussion
Replies
22
Views
2K
  • General Discussion
Replies
1
Views
808
Back
Top