# What is the _simplest_ way to solve problems of this kind?

Two doors with talking doorknockers - one always tells the truth and one always lies. One door leads to death other to escape. Only one question may be asked to either of the door knockers. What would that question be?

Given hint says that the question ought to be about both doors.

PS: There are a couple of similar questions on MSE but the answers to those are not satisfactory.

   (Also,I have come across more complicated puzzles of this type.)


• I don't know how to start with symbolic logic and arrive at the insight needed for the answer, without using that insight to begin with. But perhaps this idea with help: one door answers truthfully, call that function $T : Questions \to Answers$ and for false $F$. Then in some appropriate sense, $T \circ F= F \circ T$. So asking either door the same question, "What would the other door say in answer to question X" does it. (Where X of course is "which door leads to escape") – Simon S Apr 10 '15 at 21:24
• Related question: math.stackexchange.com/q/179968/11994. My answer there (math.stackexchange.com/a/620471/11994) is also an answer to your question. So the solution to your puzzle would be "Can you say that your door leads to escape?" Or if you must use the other door: "Can you say that the other door leads to escape?" – MarnixKlooster ReinstateMonica Apr 11 '15 at 14:09

Let $L$ be the proposition that the left door leads to escape.

You ask a question $Q$ (some proposition). Let $R$ be the truth-telling/lying status of the person you ask (so true if the person is a truth-teller, false if the person is a liar). The response from this person is the truth value of $Q \Leftrightarrow R$.

So what you want to do is come up with some $Q$ such that $Q \Leftrightarrow R$ is equivalent to $L$. That is, you want the actual answer to your question to be the truth status of $L$.

Just make a truth table:

$\begin{array}{c|c|c|c} L & R & Q & Q\Leftrightarrow R \\ \hline T & T & ? & T \\ T & F & ? & T \\ F & T & ? & F \\ F & F & ? & F \end{array}$

I've made the $Q \Leftrightarrow R$ column match the $L$ column (because this is what we want).

Now you can fill in the $Q$ column such that it works (there's only one way):

$\begin{array}{c|c|c|c} L & R & Q & Q\Leftrightarrow R \\ \hline T & T & T & T \\ T & F & F & T \\ F & T & F & F \\ F & F & T & F \end{array}$

You see the answer is to set $Q$ equal to $L \Leftrightarrow R$.

That is, you can ask "Is it either the case that you're a truth-teller and the escape door is the left one, or the case that you're a liar and the escape door is the right one?" (There are equivalent ways to word this.) Then if the response is yes, go left, and if it's no, go right.