3 min read

The hardest riddle ever

The hardest riddle ever

Three gods A, B, and C 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 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. 


This is indeed a tricky puzzle known as "The Hardest Logic Puzzle Ever." Here's the solution with three questions you can ask to identify the three gods:


**Question 1:** Ask god B: "If I asked you 'Is A Random?', would you say ja?"


**Explanation:** 


* Regardless of whether B is True, False, or Random, and regardless of what "ja" and "da" mean, we can analyze two scenarios:


1. **B is True or False:** 

    * If B is True, they would answer "ja" if their own answer to "Is A Random?" would be the same as the truth about A. This means "ja" must represent the opposite of their own answer.

    * If B is False, they would answer "da" if their own answer to "Is A Random?" would be the same as the truth about A. This again means "ja" represents the opposite of their own answer.

2. **B is Random:** 

    * Regardless of what B answers, there's a 50% chance it's the truth about A and a 50% chance it's the opposite. In both cases, "ja" will represent the opposite of the actual truth about A.


Therefore, no matter who B is and what "ja" means, by analyzing their answer to this question, we can establish whether "ja" signifies the opposite of the truth or not.


**Question 2:** Ask god C: "Would god A say ja if I asked him 'Is B True?'"


**Explanation:**


* We established whether "ja" means the opposite of the truth or not from question 1.

* If B is True, their answer to "Is B True?" is "ja," regardless of which word it actually is. 

* If B is False, their answer is "da" (the opposite of their true answer). 

* If B is Random, there's a 50% chance either one is true.

* Regardless of B's identity and answer, we can now deduce A's identity:

    * If their answer to "Would god A say ja if I asked him 'Is B True?'" is "ja," then A is Random.

    * If their answer is "da," then A is either True or False (we can't differentiate in this step).


**Question 3:** Ask the god we don't know the identity of (A or C): "If I asked B 'Is A False?', would he say ja?"


**Explanation:**


* We now know whether "ja" means the opposite of the truth or not from question 1.

* We know one of the remaining gods is either True or False (from question 2).

* If the remaining god answers "ja," then they are False and the other god is True.

* If they answer "da," then they are True and the other god is False.


By following these three questions, you can confidently identify the identities of all three gods, True, False, and Random.