The Hardest Logic Puzzle Ever

Besides working on Prometheus, I like to distract myself from time to time trying to solve riddles and logic puzzles procured by philosophers. Raymond Smullyan, a prominent logician, has a number of logic puzzles available online for people to solve. I’m proud to say that I solved a fair number of them but there’s this one particular puzzle by Smullyan that’s been coined by many philosophers to be “The hardest logic puzzle ever.”  I found this early on in September 2008 and I’ve contemplated and quarreled with myself trying to solve this puzzle.  Here’s how it goes:

“Three gods A, B, and C are called, in some order, True, False, and Random. True always speaks truly, False always speaks falsely, but whether Random speaks truly or falsely is a completely random matter. Your task is to determine the identities of A, B, and C by asking three yes-no questions; each question must be put to exactly one god. The gods understand English, but will answer all questions in their own language, in which the words for yes and no are ‘da’ and ‘ja’, in some order. You do not know which word means which.”

Here’s a few clarifications about the puzzle.

1. It could be that some god gets asked more than one question (and hence that some god is not asked any question at all).

2. What the second question is, and to which god it is put, may depend on the answer to the first question. (And of course similarly for the third question.)

3. Whether Random speaks truly or not should be thought of as depending on the flip of a coin hidden in his brain: if the coin comes down heads, he speaks truly; if tails, falsely.

4. Random will answer ‘da’ or ‘ja’ when asked any yes-no question.

So after five months of on-and-off work on the problem, I think I’ve finally solved it.  But it wouldn’t be fun just to tell you my answer and how I solved it.  In all honestly, I’m more interested IF YOU can solve it and, if so, how quickly.

I’m positive there’s someone out there who can solve it faster than I.  If you think you have an answer to the puzzle, feel free to post in the comments section your solution.  At the release of the next issue, I’ll put up my solution to the puzzle and compare it to the solution given by philosopher George Boolos.

Is there a prize?  Of course, you win the honor of solving the hardest logic puzzle ever with your own wit! I encourage everyone to join in on the fun and definitely look forward to your solutions.

NOTEI know there are solutions online but, please, don’t ruin the fun for yourself and everyone else by looking up the answer.  You can do it by yourself.  Trust your own abilities!

[ UPDATE: You can find my solution and other solutions to the puzzle here. ]

Cuong Q. Nguyen

.

Cover image: “introspection” by ~final-testament

10 thoughts on “The Hardest Logic Puzzle Ever

  1. After looking at the problem a second time, I think I might have misinterpreted it. I assumed that Random gave “da” and “ja” answers randomly rather than giving answers that were randomly true or false. On that note, I feel much less guilty about posting my solution:

    Ask A, “Would the meaning of True’s answer to this question be “No”?”
    If A responds, ask B the same question. (We now know that A isn’t True.)
    If B responds, and A’s answer doesn’t equal B’s answer, ask C, “Does one plus one equal two?” (We now know that B isn’t True, which leaves C.) Based on C’s answer, we now know what “da” and “ja” mean, information we can use to figure out which of A and B is False based on their previous answers.
    On the other hand, if A’s answer equals B’s answer, we know that their answers meant “Yes”.So, ask C, “Is A False?” If C gives the same answer as A and B, then A is indeed False. Otherwise, B is False.

    Now to backtrack, assume B never responded to the first question (in which case, B is True). Then, ask A, “Would the meaning of False’s answer to this question be “Yes”?” If A answers, A is not False, so A is Random. If A doesn’t answer, it’s because A is False and therefore cannot answer, leaving C to be Random.

    To backtrack further, assume that A never responded to the first question (in which case A is True). Ask A, “Does one plus one equal two?” (or whatever). (From this we know the meaning of “da” and “ja”.) Then, ask A, “Is B False?” We now know which of B and C is False and which is Random.

  2. Hey Julian. I had some similar types of questions, though I haven’t quite figured it out yet, so I think you may be on the right track. However, the questions must lead to “yes-no” answers, so I think your first question doesn’t work, because in the conditions you mention later on you list “if A responds”. Perhaps you meant to say “if A responds yes (no)” then…

  3. there r 6 cases possible. my covention (true god->1, false god->0, random god->-1.
    so six cases are
    A B C
    1 0 -1 possibility->1
    1 -1 0 ” ->2
    0 1 -1 ” ->3
    0 -1 1 ” ->4
    -1 0 1 ” ->5
    -1 1 0. ” ->6
    now every question will divide my possibilities in to two sets one giving da as answer and others ja as answer. so for final question i should have atmost two possibilities each giving differnt answer which would let me know which will be true after knowing the answer.which implies for second question i have atmost four possiblities.
    les say i ask the first question to A. then 5th and 6th possiblities can give both the answers. my qustion will be “what will be da of ja of da of the statement ‘is the possibilty 1 or 4 right'”.
    answers
    possibilty->1——ja
    possibilty->2——da
    possibility->3—–ja
    possibility->4—–da
    possibility->5—–ja or da
    possibility->6—–ja or da
    if answer is ja
    then i have 1 3 5 and 6 as possible cases or 2 4 5 and 6
    taking 1 3 5 6
    let me ask B “what will be da of ja of da of the statement ‘is the possibilty 1 or 6 right'”
    1-> da
    3-> da
    5-> ja
    6-> ja
    so now i have either 1, 3 or 5 ,6 depending on the answer.now my third qustion will be again to b and it will be “what is ja of da of da?”
    1->da
    3->ja so according to answer i get i can decide whetder its 1 or 3.
    as 1 3 5 6 is symmetrical to 2 4 5 6 so i am not discussing other cases. simmilarly i am not discussing 5 6 as it is symmetrical to 1 3 . please post ur queries.

    coolgenius

  4. 1st Question: Ask any god “If I asked you ‘does 1 + 1 = 2?’ would your answer be the same as Random’s answer to the same question?”

    If the god answers at all, that god is Random. The other two gods would be unable to answer, due to their commitment to answering only truthfully or only falsely, since they cannot know what Random’s answer would be, and thus do not know which answer to give in order to be truthful or false.

    Let’s say you asked god A, and he could not answer. We now know he is not Random.

    2nd Question: Now ask god A “If I asked god B if YOUR (god A’s) name is True, would he say “ja”?

    If god A is unable to answer, god B is Random, and neither of the other two are revealed.

    If god A says “da”, he is True, god B is False, and god C is Random.

    If god A says “ja”, he is False, god B is True, and god C is Random.

    3rd Question: Assuming the 2nd question only revealed that god B is random, the identity of the other two gods remains unknown. Repeat question 2, now referring to god C: Ask god A “If I asked god C if YOUR (god A’s) name is True, would he say “ja”?

    If god A says “da”, he is True, god B is Random, and god C is False.

    If god A says “ja”, he is False, god B is Random, and god C is True.

    Why This Works: Once you identify which god is Random, you are only working with the standard always lies /always tells the truth logic problem, except you don’t understand the language being spoken. This can be overcome using the following example:

    Assume A is True, B is False

    If Ja is yes, Da is no:

    Ask A : “If I were to ask B if YOUR (god A’s) name is True, would he say ja?”

    A answers: “da”

    Ask B: “If I were to ask A if YOUR (god B’s) name is True, would he say ja?”

    B answers: “ja”

    If: Da is yes, Ja is no

    Ask A: “If I were to ask B if YOUR name is True, would he say ja?”

    A answers: “da”

    Ask B: “If I were to ask A if YOUR name is True, would he say ja?”

    B answers: “ja”

    In both cases, False repeats “ja”, regardless of whether it means yes or no. In both cases, True says “da”, regardless of whether it means yes or no.

  5. It took me three days to get an answer. Here goes:

    Ask god A, “Will you answer ‘yes’ to this question?” Since an answer of “yes” will be true and an answer of “no” will also be true, if the god answers at all he must be either True or Random.

    Remember, the problem does not stipulate that the god MUST answer; it only stipulates that True always speaks truly, False always speaks falsely, and Random speaks truly or falsely at random. Thus, if False ALWAYS speaks falsely, and the question does not permit a false answer, then he must remain silent when asked.

    So, if god A replies, then god A is either True or Random. Then, ask god B, “Will you answer ‘yes’ to this question?” If god B replies, then god B is either True or Random, and god C is thus False.

    Now, for the third question ask god A, “Will you answer ‘no’ to this question?” Any answer to this question will be false, so if god A answers, then god A is Random and god B is True.

    This solution works whether or not any particular god answers any particular question. You just have to alter the order of the questions and who you ask, depending on whether or not the god answers.

    Concerning the god Random: You are not affecting his freedom to answer “da” or “ja”–he still may answer either one, no matter which means yes or no. However, you are ensuring that whether he answers da or ja, you know he’s either not False (if you ask the ‘yes’ question) or not True (if you ask the ‘no’ question).

  6. @ Moosh,

    You assume that True and False cannot know how Random will answer. But they are gods, and as far as we know their only limitations are that True always speaks truthfully and False always speaks falsely. So it is at least possible that True and False can know beforehand how Random will answer.

    The fact of their knowing beforehand how Random will answer does not affect the randomness of whether his answers are true or false. Randomness only indicates that there is no pattern in his answers from which it would be possible to calculate the probability of his answer to any particular question being true or false.

Leave a Reply

Your email address will not be published. Required fields are marked *