The hardest logic puzzle ever: the solution

The answer to Tuesday’s puzzle, then. Remember that the puzzle is:

There are three guardians, A, B and C. Their names are Knight, Knave and Chaos. Knight always speaks truly, Knave always lies. Chaos tossed a coin this morning to decide whether today he would behave like Knight or like Knave.
Your task is simple: ask three yes-no questions, each of a single guardian, and determine which is Knight, which is Knave, and which is Chaos. There is, alas, a complication: the guardians understand English but will answer in the local language, in which “Da” means yes and “Ja” means no. Or possibly “Ja” means yes and “Da” means no – you cannot remember.

Yesterday I gave you a hint:
For any yes/no question, Q, you can ask any guardian this question:

“If I asked you Q in your current mental state, would you say ‘ja’?”

And you’ll get the answer “ja” if and only if the truthful answer to Q is yes. This is true whether you ask the question of Knight, Knave or Chaos.

The answer follows:

Ask Guardian A, “If I asked you, “Are you Chaos?” in your current mental state, would you say “ja”?”
If A answers “ja”, he’s Chaos. Then ask Guardian B, “If I asked you, “Are you Knight?”, would you say “ja”?”. The answer is “ja” if B is Knight, and either way the problem is now solved.

If A answers “da”, he’s either Knight or Knave. So ask him instead, “If I asked you, “Are you Knight?”, would you say “ja”?” If the answer is “ja” he’s Knight; otherwise he is Knave.
So, now, ask him “If I asked you, “Is guardian B Chaos”, would you say “ja”?” If he answers “ja”, B is Chaos, and C is the opposite of A. If he answers “da” then C is Chaos and B is the opposite of A.

Wikipedia has more, much more, and of course the puzzle is no longer the hardest logic puzzle ever

Tim Harford’s blog

This blog is no longer updated but it remains open as an archive.

Tim, also known as the Undercover Economist, writes about the economics of everyday life.