WOO logo

Second Hardest Logic Puzzle Ever

The following logic puzzle is a simplified version of the so-called “Hardest Logic Puzzle Ever”, which I plan to ask next week. I highly recommend before trying to solve that one, you solve this one first.

Question

You are among three gods, which are labeled A, B and C. One always speaks the truth, one always lies and one answers yes/no randomly without even listening to the question. The gods know the identity of each other. You may ask three yes/no questions directed to any particular god one at a time. Questions must have clear yes/no answers, so no paradoxical questions. Your goal is to determine which god is which.

What should be your line of questioning, which you may adapt according to previous responses.

Hints

It’s important to realize that it does no good to ask the random god a question. Thus, you want to waste no more than the first question being addressed to the random god.

You want to carefully frame the first question so that after the response you can narrow down one of the other two gods as either being true or false. If you asked the random god the first question, then at least you’ll know the other two gods are either true or false.

However, finding such a first question is easier said than done. My final hint is you have to involve more than one god in the question.

Answer

The following shows my three questions and who they are addressed, to according to the previous responses. I’m sure there are many other possible solutions, the following is just mine.

Question 1

Ask A, “Consider the following three statements:

  1. A is true
  2. B is false
  3. C is random
 

Is exactly one statement true?”

The following is how it will be answered according to the six possibilities.

A True True False False Random Random
B False Random True Random True False
C Random False Random True False True
Answer No Yes No Yes Yes or no Yes or no
 

Note that if we get a “yes” answer, then C must be either the true or false god. Likewise, if we get a “no” answer then B must be either the true or false god. We wish to not waste any more questions on the random god.

Question 2 – After Yes Answer.

If the answer to question 1 was yes, then ask C, “Would a god of the opposite truthfulness as you say A is random?”

Here is how that question would be answered in each of the four possibilities left.

A True False Random Random
B Random Random True False
C False True False True
Answer Yes Yes No No
 

As you can see, whether we get a yes or no answer, we narrow down the possibilities from four to two.

Question 2 – After No Answer.

If the answer to question 1 was no, then ask B, “Would a god of the opposite truthfulness as you say A is random?”

Here is how that question would be answered in each of the four possibilities left.

A True False Random Random
B False True True False
C Random Random False True
Answer Yes Yes No No
 

As you can see, whether we get a yes or no answer, we narrow down the possibilities from four to two.

Question 3 – After yes to question 1 and yes to question 2.

Ask C, “Does 1+1=2?” The following table shows the answer according to the two possibilities left, leaving us with just one possibility.

A True False
B Random Random
C False True
Answer No Yes
 

Question 3 – After yes to question 1 and no to question 2.

Ask C, “Does 1+1=2?” The following table shows the answer according to the two possibilities left, leaving us with just one possibility.

A Random Random
B True False
C False True
Answer No Yes
 

Question 3 – After no to question 1 and yes to question 2.

Ask B, “Does 1+1=2?” The following table shows the answer according to the two possibilities left, leaving us with just one possibility.

A True False
B False True
C Random Random
Answer No Yes
 

Question 3 – After no to question 1 and no to question 2.

Ask B, “Does 1+1=2?” The following table shows the answer according to the two possibilities left, leaving us with just one possibility.

A Random Random
B True False
C False True
Answer Yes No
 

Hardest Logic Puzzle Ever

Next week I will ask and solve the “hardest logic puzzle ever.” That is the same question as the one just asked, except the gods speak a foreign language and you don’t know their words for “yes” and “no.”