For those interested, ignoring the contradictory presentation of the riddle (as the knights themselves would not say the riddle since one always lies and one always tells the truth), the solution is simple. Ask the knights what the other knight would answer when asked what door is correct, and they will both say which path not to go to. Thus you pick the path that neither Knight says!
Logic:
Liar: Will say the wrong option, as they're being asked which door the truth telling knight would say (and they will lie about what the truth-teller would say)
------------------------------------------
Truth-teller: Will say the wrong option, as they're being asked which door the liar would say (and they'll tell the truth about that)
NOTE: This can be expanded to a case with n doors by asking the knights to provide all the options that the other knight could say, and each will provide n-1 options, so you’d pick the one option that neither knight says. It is possible the liar may not list all options, but the truth-teller would, so the problem could still be worked out regardless (and you’d know which knight is the liar in that case).
The fun is in discrete logic! There is a whole field of mathematics (discrete mathematics) that analyzes the logic of situations that involve binary (true/false) statements, such as the solution to this riddle.
The riddle can be summed up as the following:
Let Y represent a question asked of the knights.
Let A(x) be a boolean function representing the answer of the truth-teller.
Let B(x) be a boolean function representing the answer of the liar.
B(x)≡¬A(x)
An answer can only be determined if the knights do not contradict, otherwise it could not be determined which knight was lying, for instance when Y≡(A(Y)∧B(Y))∨(¬A(Y)∧¬B(Y))≡T.
A trivial question whose answer is logically true would result in the following form:
Y≡(A(Y)∧B(Y))∨(¬A(Y)∧¬B(Y))
A(Y)≡T
B(Y)≡F
Y≡(T∧F)∨(F∧T)≡F∨F≡F
∴Y≡F
Such a question would allow identification of which knight is lying, but would not provide information on which door is true.
Let D represent a set of m doors where there is exactly 1 correct door.
∃!n∈ℕ:D(n)≡T∧n≤m
The player ideally wants to discover which value n is correct so they can choose a door accordingly.
Let R represent the following question: "What are all the doors the other knight could say are correct?".
Let S represent all possible answers to the question "What is the correct door?" for each knight respectively.
Let P be the set representing the value n where D(n)≡T, and Q be the set representing all values n where D(n)≡F,
P⊂D
P={n}
Q⊂D
Q=D-P
Thus the following properties are true:
P∩Q=∅
P∪Q=D
Consider that the answer S would be either t∈P if a knight is telling the truth or t∈Q if a knight is lying.
Thus when answering question R:
A(R)≡B(S)≡t∈Q
B(R)≡¬A(S)≡t∈Q
Since question R asks for all possible answers, both knights would provide an answer equivalent to set Q.
∴ the correct answer is D-Q; the one door that neither knight says.
I’m a little rusty on my discrete mathematics, as I haven’t done it in 3+ years, but hopefully my answer is logically sound! Feel free to correct me.
EDIT: This original puzzle is Knights and Knaves, so to be true to the original, the “truth-telling knight” is just the knight, and the “liar knight” is a knave. I just presented it this way because there was no mention of it in this comic, so I didn’t want to be confusing.
For those interested, ignoring the contradictory presentation of the riddle (as the knights themselves would not say the riddle since one always lies and one always tells the truth), the solution is simple. Ask the knights what the other knight would answer when asked what door is correct, and they will both say which path not to go to. Thus you pick the path that neither Knight says!
Logic:
NOTE: This can be expanded to a case with
ndoors by asking the knights to provide all the options that the other knight could say, and each will providen-1options, so you’d pick the one option that neither knight says. It is possible the liar may not list all options, but the truth-teller would, so the problem could still be worked out regardless (and you’d know which knight is the liar in that case).The fun is in discrete logic! There is a whole field of mathematics (discrete mathematics) that analyzes the logic of situations that involve binary (true/false) statements, such as the solution to this riddle.
The riddle can be summed up as the following:
I’m a little rusty on my discrete mathematics, as I haven’t done it in 3+ years, but hopefully my answer is logically sound! Feel free to correct me.
EDIT: This original puzzle is Knights and Knaves, so to be true to the original, the “truth-telling knight” is just the knight, and the “liar knight” is a knave. I just presented it this way because there was no mention of it in this comic, so I didn’t want to be confusing.