A friend of mine sent me the following puzzle:

There are two doors, and behind them either a trap, or a safe passage to somewhere, and on the doors, it is written something about whether the doors are safe or not. It is known that if the first door opens up to a safe place then the what is written on that first doors is true, but it is opens up to a trap, what is written on that that first door is false. Moreover, if the second door opens up a safe place, what is written on that second door is false, and if this is a trap, what is written on that second door is true.

Now, you look at the doors, and see that on the first door, it is written that

Both doors are safe

and on the second door, it is written that

Both doors are safe

The question asks what are there behind the doors, i.e are they safe to pass or not.

I've tried making a list according to whether the given statements are correct or not, but the conditions listed in the question are not always (if the statement on the door is true) then (something), so I couldn't figure out how to approach such a problem and prove the results that I get somehow, so;

How to solve this puzzle, and prove that the results that we get are indeed correct ?

  • 1
    $\begingroup$ I suggest that you post the problem in English so more people are able to help you. $\endgroup$ – Haris Gusic Feb 19 at 21:26
  • $\begingroup$ Um... I couldn't help but notice that the puzzle is written in Turkish. $\endgroup$ – Jack M Feb 19 at 21:27
  • $\begingroup$ Sorry, I forgot. $\endgroup$ – onurcanbektas Feb 19 at 21:27
  • $\begingroup$ @HarisGusic See my edit, please. $\endgroup$ – onurcanbektas Feb 19 at 21:34
  • 1
    $\begingroup$ FYI: This is equivalent to "The Fourth Trial" in the "Ladies or Tigers?" chapter of Raymond Smullyan's book of logic puzzles, The Lady or the Tiger (1982). $\endgroup$ – Blue Feb 19 at 21:44

Here's Raymond Smullyan's solution to the Fourth Trial in the "Ladies or Tigers?" chapter of his 1982 book of logic puzzles, The Lady or the Tiger. Interpret Smullyan's "Room I" and "Room II" as OP's first and second doors, respectively; moreover, a room with a lady represents a safe door, and a tiger corresponds to a trapped door.

Since the signs say the same thing, they are both true or both false. Suppose they are true; then both rooms contain ladies. This would mean in particular that Room II contains a lady. But we have been told that if Room II contains a lady, the sign is false. This is a contradiction, so the signs are not both true; they are both false. Therefore, Room I contains a tiger and Room II contains a lady.

  • $\begingroup$ Why do they have to be both false or true ? Your conclusion says that one of them is true and the other is false; am I missing someting ? $\endgroup$ – onurcanbektas Feb 19 at 22:08
  • $\begingroup$ @onurcanbektas: Identical statements should have identical truth values, should they not? The conclusion is not that "one of them and one of them is false"; the solution says explicitly: "they are both false". The circumstances that causes both signs to be false are that the first door is trapped and the second is safe. $\endgroup$ – Blue Feb 19 at 22:11
  • 1
    $\begingroup$ You are right; thanks for the explanation. $\endgroup$ – onurcanbektas Feb 19 at 22:13

I'm going to assume that the first door's statement is true if and only if it opens to safe passage, whereas the second door's statement is true if and only if it opens to a trap.

The first door's statement can't be true. If it were, then both doors would open to safe passage which makes the second door's statement also true, contrary to the conditions of the problem. Since the first door's statement is false, we know that it opens to a trap.

The second door's statement is now known to be false. By the conditions of the problem, that tells us that the second door opens to safe passage.

Confirming this, we find that the first door opens to a trap and its statement is false, whereas the second door opens to safe passage and its statement is likewise false.

  • $\begingroup$ See my edit also; there was an error. $\endgroup$ – onurcanbektas Feb 19 at 21:43
  • $\begingroup$ Also, how can you do such an assumption in the first sentence of your answer. $\endgroup$ – onurcanbektas Feb 19 at 22:09
  • 1
    $\begingroup$ I wrote my answer before you corrected the error in your statement of the problem. I was making explicit what I believed the correction should be. Your edit confirmed that my assumption was correct. $\endgroup$ – Robert Shore Feb 20 at 1:41

The quickest way to answer this is as follows: with both doors saying the same thing, they must lead to different outcomes, meaning that they both make a false statement, and thus door $1$ leads to a trap, and door $2$ leads to a safe place.

However, I also want to show you that you can do what you tried to do, and simply exhaust all possibilities in a 'truth-table' like manner:

Let $D_1$ be what's behind door $1$, and $D_2$ be what's behind door $2$. Also, let $S$ be the truth-value of the statement that both doors are safe. So, we have $4$ possibilities:

\begin{array}{l|l|l} D_1&D_2&S\\ \hline safe&safe&T\\ safe&trap&F\\ trap&safe&F\\ trap&trap&F\\ \end{array}

Now we can rule out certain combinations. For example, for the first row, we find that the second door is safe, but its sign is True, which goes against its sign having to be False when it is safe. Likewise, the second row can be eliminated, since door $1$ leads to a safe place, so its sign should be True, not False. And the last row doesn't work either: door $2$ leds to a trap, so its sign should be True rather than False.

The third row does work out however, and since it is the only one that works out, that myust be the answer: a trap behind door $1$, and a safe place behind door $2$

Finally, we can use boolean algebra. Let $D_1$ represent the claim that $D_1$ is safe, and $D_2$ for the claim that $D_2$ is safe. Then, focusing on door $2$, we have that:

$D_2 \leftrightarrow \neg (D_1 \land D_2)$


$=(D_2 \lor (D_1 \land D_2)) \land (\neg D_2 \lor \neg (D_1 \land D_2))$

$=D_2 \land (\neg D_2 \lor \neg D_1 \lor \neg D_2)$

$= D_2 \land \neg D_1$

And thus, once again, door $2$ is safe while door $1$ leads to a trap.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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