15
$\begingroup$

You die and ascend to heaven, there is a knight (truth-teller), a knave (pure liar) and a joker (random) sitting on a cloud - they all look the same. In order to gain entry you must determine their identities. You have 3 yes/no questions (each directed to only one of them). They will only respond to questions speaking their own heavenly language's words for "yes" and "no" which you do not know - "pluh" and "plit" (unknown which means what).

Are you going to be allowed into heaven?

$\endgroup$
12
  • 16
    $\begingroup$ A pure liar that made it's way to heaven? Remarkable. $\endgroup$ Commented Oct 8, 2014 at 13:42
  • $\begingroup$ Indeed. Well let's say is a little device of God's why not $\endgroup$
    – d'alar'cop
    Commented Oct 8, 2014 at 13:45
  • 1
    $\begingroup$ @Quassnoi The effect of the 2 options is pretty much the same. The answer can neither be depended on to be true or false. You can ask his the same question 2 times and get a different answer, or the same answer (2 nos, 2 yeses, or 1 no 1 yes - there is not way to know) $\endgroup$
    – d'alar'cop
    Commented Oct 8, 2014 at 13:58
  • 1
    $\begingroup$ @d'alar'cop: "if I asked you if the Pope is Catholic instead of this question, and you answered with same honesty, would you answer pluh?". If the answer is an arbitrarily chosen truth or lie, it is still pluh. If it's random, it can be either. $\endgroup$
    – Quassnoi
    Commented Oct 8, 2014 at 14:15
  • 4
    $\begingroup$ What happens when they don't know the answer? Say I happen to ask the Knight about how the Joker will respond. He can't answer truthfully either way. $\endgroup$ Commented Oct 9, 2014 at 17:00

2 Answers 2

18
$\begingroup$

This is so called The Hardest Logic Puzzle Ever. Wikipedia has a thorough description of it and its solutions, including different versions of formulations of how the joker functions (which was not defined in the OP's question).
I can cite the very basics here:

Formulation:

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.

Solution:

Q1: Ask god B, "If I asked you 'Is A Random?', would you say ja?". If B answers ja, either B is Random (and is answering randomly), or B is not Random and the answer indicates that A is indeed Random. Either way, C is not Random. If B answers da, either B is Random (and is answering randomly), or B is not Random and the answer indicates that A is not Random. Either way, you know the identity of a god who is not Random.
Q2: Go to the god who was identified as not being Random by the previous question (either A or C), and ask him: "If I asked you 'Are you False?', would you say ja?". Since he is not Random, an answer of da indicates that he is True and an answer of ja indicates that he is False.
Q3: Ask the same god the question: "If I asked you 'Is B Random?', would you say ja?". If the answer is ja, B is Random; if the answer is da, the god you have not yet spoken to is Random. The remaining god can be identified by elimination.

$\endgroup$
2
  • $\begingroup$ @CaelanO'Toole, what do you mean? " In order to gain entry you must determine their identities" $\endgroup$
    – klm123
    Commented Jun 22, 2016 at 21:03
  • $\begingroup$ Oh, I read that last line as if that was the goal, to figure out which words were yes and no, and then ask. $\endgroup$
    – Klyzx
    Commented Jun 22, 2016 at 21:16
0
$\begingroup$

There are 6 possible outcomes for the assignments of A, B, and C to be T, F, and R. I have a set of 6 questions but will only need 3 questions to solve any case. The rules say that I must ask a yes - no question but it does not say that a god must be able to give a yes - no answer. There are yes - no questions which cannot be answered and the result will be N/A (no answer). Thus, there are 3 possible answers: da, ja, N/A. My strategy is to find R, then find out what da and ja mean, then find T and F. This works for 4 cases, but the last 2 cases required a question that revealed who was T and F without solving for da and ja.

Q1. A, yes or no, will B say C is True? If A says da or ja, then I know that A = R and will ask Q2 and then Q3 to solve the puzzle. Q2. B, yes or no, will C say you are True? B must answer NO, no matter who is T or F, and I will therefore know what da and ja mean. Q3. B, yes or no, will C say he is True? B will answer YES if he is T and will answer NO if he is F. I know what da and ja are, so I can determine who is T and F and I already know A is R so I have solved 2 cases with 3 questions.

If A does not answer Q1, then I know that A is not R and did not answer because it is unanswerable due R being either B or C. In this case, I will skip Q2 and Q3 and ask Q4. Q4. A, yes or no, will B say you are True? A will either answer or will not answer at all because it is unanswerable. If A answers, then the answer must be NO, no matter who is T or F, and I will know what da and ja mean. If A did answer, then I will follow up Q4 with Q5. Q5. A, yes or no, will B say he is True? A will answer YES if he is T and will answer NO if he is F. I have now solved 2 more cases.

If A did not answer Q4, then it was because C was R and Q4 could not be answered, and I will ask Q6. Q6. A, yes or no, will the sum be 5 if you assign an answer of YES = 1 and an answer of NO = 0, and, in your mind, you pretend to ask B and C whether 1 + 1 = 2, 10 times in a row, and you add up the total accumulated sum? Q6 scenario #1: A gives no answer: A = T, B = R, C = F.
C will always answer Q6 as NO and will be assigned a value of 0. B will randomly answer YES or NO and will be given a value of 0 or 1.
The minimum total sum will be 0 if B always answers NO, and the maximum sum will be 10 if B always answers YES. The real value will be somewhere between 0 and 10 so A cannot know if the sum will be 5 and will give N/A (no answer). Q6 scenario #2: A says da or ja. A = F, B = R, C = T.
C will always answer Q6 as YES and will be assigned a value of 1. B will randomly answer YES or NO and will be given a value of 0 or 1. The minimum total sum will be 10 if B always answers NO, and the maximum sum will be 20 if B always answers YES. The real value will be somewhere between 10 and 20 so A will be able to definitively answer da or ja.
A will say YES while the real answer is NO, but it doesn't matter. I don't need to know what da and ja are.
I know A = F because he answered definitively.

A 6 cases are solved with a total of 3 answers.

$\endgroup$

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