The Warden and the Three Doors

An evil warden holds you as a prisoner but offers you a chance to escape. There are 3 doors A, B, and C. Two of the doors lead to freedom and the third door leads to lifetime imprisonment, but you do not which door is what type. You are allowed to point to a door and ask the warden a single yes-no question. If you point to a door that leads to freedom, the warden does answer your question truthfully. But if you point to the door that leads to imprisonment, the warden answers your question randomly, saying either “YES” or “NO” by chance. Can you figure out a way to escape the prison?

You can point towards door A and ask whether door B leads to freedom. If the warden says “YES”, then you open door B. It can not lead to imprisonment because this would mean that door A leads to freedom and the warden must have told you the truth. If the warden says “NO”, then you open door C. This is because either the warden lied, and then the imprisonment door is A, or he told you the truth, and then the imprisonment door is B.

We do not know where this puzzle originated from. If you have any information, please let us know via email.


  1. The solution is correct, but stated incorrectly. It states “if he says YES, then this would mean A leads to freedom.”
    No, it means that IF A leads to freedom, B is safe because of the YES answer, and IF A leads to imprisonments, then B is safe because there’s only one imprisonment door.

  2. I agree that a “no” answer compromises both the door you are pointing to and the door you asked about and you can be sure the third door is one of those that lead to freedom. However, if you get a “yes” answer when pointing to any door and asking about another, if the one pointed to is the imprisonment door then the answer is random and it tell you nothing about either the door pointed to or the door asked about. You then have the same one in three chance as you would have if you had not asked a question, so the first part of the explanation is wrong.

    1. If you point towards A and the warden says that B leads to freedom, then B cannot lead to imprisonment. If we assume the opposite, this means that the warden has lied, and then door A also leads to imprisonment, which leads to contradiction.

      1. The warden tells the truth or answers randomly (says the puzzle). He does not lie as such. If you point to A and the warden says B leads to freedom then his answer is either true, or random. Your explanation seems to assume we can differentiate between the two possibilities, but we cannot. There are no contradictions because we do not know the status of any door either before or after the warden replies. Pointing to door A as though we know it has special status is an illusion. A contradiction can only be established if one is allowed to point to each door in turn and ask a single question – this is NOT part of the puzzle, which speaks of pointing to a (single) door, not to each door in turn, or even to more than one door. The puzzle is badly worded to the extent that it is insoluble if taken literally.

        1. The provided solution does not assume anything not stated in the problem. You point to a single door and ask a single question. When you point towards A and the warden says that B leads to freedom, then no matter if he lies or not, door C will lead to freedom. The mentioned assumptions are used only to prove the solution is correct.

        2. I though that this solution was ridiculous at first as well. I figured that since there was a 1 in 3 chance of the response being nothing more than a coin flip that this solution could not be valid. However I tested this out and I came up with these solutions. They depict the outcomes while accounting for the uncertainty (whether the wardens claims are valid or not.)

          Pointing to A and asking if B leads to freedom.

          Yes invalidly = B and C are freedom
          Yes validly = A and B are freedom

          No invalidly = B and C are freedom
          No validly = A and C are freedom

          From this we can observe that regardless of whether the mans claims are valid or not, No will ensure that C leads to freedom, and Yes will ensure that B leads to freedom.

          If you still have suspicions, simply try to disprove any one of the data points that I have provided above. It can’t be done.