Table of contents
Introduction - read about where the puzzle comes from.
The puzzle - read the puzzle itself.
Warming up - read about solutions to a simpler variation of the puzzle.
Introduction
(Edit: Improved the wording and clarified the "Introduction" section.)
Before stating the puzzle, I want to introduce the idea behind it.
This puzzle is an extension to the well known classic guards and doors puzzle.
In short, there we only need to figure out which doors are which. But, it is actually possible to additionally deduce which guard is which as well. This extension is motivated by the fact that none of the answers given in the linked classic accomplish this additional task.
You may notice that this extension is not possible to solve if we can only distinguish yes or no answers from a single yes or no question (one bit of information is not sufficient).
Note that a single yes or no question can actually receive four distinct answers, making this puzzle solvable. The other two answers are represented by a paradox (the guard can't answer) and by tautology (the guard can answer either yes or no).
The goal of this puzzle is to find a question that expects a yes or no answer, such that depending on whether it was: answered with a yes, answered with a no, couldn't be answered, or was simultaneously answered with a yes and a no; You can deduce the information about both the guards and the doors.
The puzzle
You find yourself in a cryptic room with two guards, each guarding a door and carrying a key.
One guard is a truth teller (T), and the other one is a liar (L). You can't tell which one is which. Similarly, the doors are indistinguishable from each other. You know that one of the two doors leads to Freedom (F), and the other to damnation (D).
The truth teller holds the key to the freedom door, and the liar holds the key to the damnation door. The only way to freedom is to both pick the correct door and the correct key (guard).
The only thing you are allowed to do before picking a door and a key, is to ask a single yes or no question to one of the guards.
If the guard is given a choice to answer either truthfully or untruthfully, they will follow their inclination and answer with either a decisive YES or a decisive NO. That is, the truth teller will never lie, and the liar will always lie.
If the truth teller cannot answer truthfully, or if a liar cannot answer untruthfully, then they will remain MUTE. However, if they can satisfy their inclination with either yes or no answer, they will produce an arcane SCREECH representing a simultaneous yes and no answer.
What do you ask the guard to deduce both his inclination and the door he is guarding?
There are four scenarios to consider, and four answers we can receive.
We can be asking T who guards F, T who guards D, L who guards F, or L who guards D.
The answer will either be a YES, a NO, a SCREECH, or a MUTE response.
The solution to the puzzle needs to be a question representing a bijection between these scenarios and answers. We know of at least one solution, with variations to it being possible.
Warming up
From now on, we will be discussing answers to the classic guards and doors puzzle.
The following part of this post spoils the linked puzzle, and possibly gives hints to solving this puzzle. You have been warned.
For the first example, the following questions (answers) solve the linked puzzle using YES, NO answers. That is, we can deduce which doors are which by asking:
1.a
Ask "Is the truth telling guard standing in front of the door that leads to freedom?"
1.b
Ask "If I asked you 'are you standing in front of the freedom door?', would your reply be 'yes'?"
Both 1.a and 1.b will result in the following answers: (to TF, LF, TD, LD scenarios):
T | L | |
---|---|---|
F | Yes | Yes |
D | No | No |
This tells us which doors are which, but does not tell you which guard is the liar and which one is the truth teller (it does not give you the key).
Alternatively, here are alternative answers that uses the SCREECH, MUTE answers:
2.a
Ask "Would your answer to 'Is the door you are guarding Freedom?' be consistent with (equal to) your answer to this (my) question?"
2.b
Ask "Among the propositions 1. 'You are a liar', 2. 'You will reply negatively' and 3. 'This door leads to freedom', is there an odd number of true propositions?"
Both 2.a and 2.b will result in the following answers: (to TF, LF, TD, LD scenarios):
T | L | |
---|---|---|
F | Screech | Screech |
D | Mute | Mute |
This again only tells us which door is which, not revealing anything about the keys (the inclination of the guards).
The problem of this post is, to pose a question such that "YES", "NO", "SCREECH" and "MUTE" answers all appear exactly once in the answer table.
For example, the solution I found gives the following answer table:
$$\begin{array}{c|cc} & T & L \\ \hline F & \text{No} & \text{Yes} \\ D & \text{Screech} & \text{Mute} \end{array}$$
Based on this, we can now ask the guard such a question, and then respond as:
- If we hear No, we take the key from the asked guard and enter his door.
- If we hear Yes, we take the key from the other guard and enter the door of the asked guard.
- If we hear a Screech, we take the key from the asked guard, and enter the other door.
- If they remain Mute, we take the key from the other guard and enter the other guards door.
To always unlock the freedom door with the truth tellers key.
Can you find such solution (question)?