So I wanted to ask something about the Three Gods Puzzle which you can read more about from here: https://en.wikipedia.org/wiki/The_Hardest_Logic_Puzzle_Ever

Basically, the question of the puzzle is: "Three gods 1, 2, and 3 are called, in no particular 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 1, 2, and 3 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."

I've been trying to solve this puzzle without the help of any hints or guides and recently I came up with a solution, but I'm not sure if this solution is allowed.

So basically, one of my questions use XOR to combine two statements. I even have a question that have 2 XORs to combine three statements (The first two are XOR'ed first, then whatever the result is XOR'ed to the third one). It's still a Yes/No question and the Gods can answer it with just X or Y (I'm using X and Y as the two possible answers of the Gods).

So yeah, am I allowed to combine two or more statements? If so, can I use the XOR logic gate to combine them? I don't think it breaks the rules since the rule just states it must be a Yes/No question, and mine IS a Yes/No question. It's Yes if exactly one of the two statements is True, and No otherwise. I still want some confirmation, however.

Thank you!

Oh and please no spoilers!


1 Answer 1


TL; DR: Yes, however, there is a way to do it without them.

Any yes or no question is allowed; so all you have to do is word your question something like this:

Is exactly one of these statements true: you lie, you answer randomly?

(Obviously, that’s a terrible question to ask; it’s just an example.)

You can make questions as convoluted as you want; this isn’t the obligatory xkcd

I won’t spoil the solution without XOR, but good luck at finding it if you try.

  • $\begingroup$ Thank you! Also, are you saying that I can solve it without using XORs AND without phrasing my questions like your example? Or are you saying that I can just convert my XOR questions to something similar like your example? $\endgroup$ Jan 6, 2019 at 12:20
  • 3
    $\begingroup$ +1 for the xkcd :D $\endgroup$
    – mathwhiz20
    Jan 6, 2019 at 12:21
  • $\begingroup$ @homosexual-advocate you can solve it without either XOR or questions formatted like my example. $\endgroup$ Jan 6, 2019 at 12:23
  • $\begingroup$ @ExcitedRaichu okay then, thank you! this puzzle is extremely hard lol. $\endgroup$ Jan 6, 2019 at 12:25
  • $\begingroup$ @homosexual-advocate If you know what XOR is, then you show know how the logic gate is defined. Use a truth table if you want to avoid using XOR. Write it in terms of the component logic gates instead. $\endgroup$
    – mbomb007
    Jan 6, 2019 at 17:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.