You are in a prison. There are 3 doors, and a ghost standing in the middle of the prison. He says one of the doors is the way to freedom while the other two lead to death. You get to ask only one question. He will only answer with YES or NO. All he says is truth. What do you ask to find the door to freedom?

  • 12
    $\begingroup$ What if he can't answer? Does his head explode? $\endgroup$ Commented Apr 18, 2015 at 20:14
  • 1
    $\begingroup$ Does the ghost answer every question that he knows the answer to? $\endgroup$
    – xnor
    Commented Apr 19, 2015 at 1:13
  • 44
    $\begingroup$ After you pick a door, does he show you one with a goat? $\endgroup$
    – Josh
    Commented Apr 19, 2015 at 3:24
  • 2
    $\begingroup$ Clearly a trick question -- a door that's standing in the middle of a room doesn't lead anywhere. $\endgroup$ Commented Apr 24, 2015 at 11:43
  • 2
    $\begingroup$ - What is the meaning of life ? - Yes $\endgroup$
    – Nico
    Commented Jun 15, 2016 at 12:51

13 Answers 13


The puzzle lays a restriction on the ghost's answers, but not on your question (i.e., your question doesn't have to be a yes/no question). I think it's a bit of misdirection.

Give the doors names: "Door 1 I name 'Yes', Door 2 I name 'No', and Door 3 I give no name. Behind the door of which name lies freedom?"

The ghost can answer "Yes," "No," or nothing, and by his answer he designates the name you gave that door.

This is very similar to GOTO 0's answer, but this doesn't involve asking two questions for the price of one.

  • 1
    $\begingroup$ It does, however, circumvent the logical intention of the puzzle. $\endgroup$ Commented Apr 20, 2015 at 12:12
  • 1
    $\begingroup$ @IanMacDonald Because you only get 1 bit of information the logical intentions of the puzzle is that it is impossible. $\endgroup$
    – Taemyr
    Commented Apr 20, 2015 at 12:51
  • $\begingroup$ @Taemyr Not all puzzles created on PSE have possible solutions. I do agree that this answer is good, though. $\endgroup$ Commented Apr 20, 2015 at 12:54
  • $\begingroup$ It is difficult, is it not, to determine the intention of a "puzzle"? Many puzzles hinge on misdirection and precise word choice. $\endgroup$
    – galdre
    Commented Apr 20, 2015 at 15:15
  • 7
    $\begingroup$ I have to disagree with this answer. The puzzle clearly states that he will answer "YES" or "NO" to your question. Not answering the question would directly contradict this. $\endgroup$
    – BlueBuddy
    Commented Apr 20, 2015 at 17:06

I will try to be in the spirit of the riddle: Ask only one question and get a real YES/NO aka true/false response:

If I take the first door and my brother takes one of the first two doors, will at least one of us get to freedom ?

  • If the first door leads to freedom, the answer is yes.
  • If the third door leads to freedom, the answer is no.
  • If the second door leads to freedom, the answer would be maybe/don't know, so the ghost cannot answer with yes/no.

My first thought: It is a trick question. Pay attention to your environment. If there are only 3 doors, one of them must be the one through which you entered. And since you are in prison, you know that this door does not lead to freedom, you can just ask the ghost "Is this the door leading to freedom?" while pointing on one of the other two doors in the room. If he says "Yes" you pick that door, if he says "No" you pick the other one. It is kind of an prove through exclusion attempt.

If it is not a trick question, and you actually entered the room which has 3 doors on top of the one through which you entered, the best you can do is try to act based on the Mounty-Hall-Problem. You might only be able to increase your chances to a chance of 5/6 chance, but not to a 100%.

You cannot get 3 informations out of 1 bit. You can combine 2 infos into 1 bit, but not 3. (Bit operations all have only 2 input and 1 output channels).

You could ask the ghost for example "If I picked the left door and somebody would show me one of the remaining doors leading to death, could he show me the middle door?" If the answer would be "Yes", you could switch to the right door, as it would have a 2/3 chance to be the freedom door. (See Mounty-Hall-Problem) If the answer would be "No", you definitly know the mid door is the freedom door. A 100% chance and a 2/3 chance combine to (6/6+4/6)/2, which is 5/6.

  • 4
    $\begingroup$ If you don't know the door you entered by (e.g. carried in while unconscious) you have no basis to eliminate any door. Even if you do know what door you entered through, you have no reason to assume something changed outside that door since you entered (e.g. some death dealing device activated after you entered) $\endgroup$
    – Peter
    Commented Apr 19, 2015 at 8:17
  • $\begingroup$ That might be right for the trick question. But if you write I should not assume, you should neither. This goes both ways. You assumed that the life in prison does not lead to death. But what if it is a life sentence, death sentence or somebody is waiting to kill you there? But hey, maybe your sentence would be over in an hour. It is just a lousy scenario if you think about it. ;) For the other case, the "not a trick question", it does not change the math. 5/6 is the best you can get in my opinion. $\endgroup$
    – nerre
    Commented Apr 19, 2015 at 20:33
  • 2
    $\begingroup$ You cannot get 5/6 odds with 1 bit of information. With 1 bit of information, you can distinguish between at most 2**1 options. Your question is equivalent to "Does the middle door lead to death?", and you never pick the left door in your answer, so your odds are only 2/3. Monty hall is irrelevant here. $\endgroup$
    – Ishamael
    Commented Apr 20, 2015 at 22:31

Keeping in mind that the ghost will only answer if the answer is yes or no, a way to find the door to freedom is to formulate a question such that the answer would be yes, no, or anything else respectively for each of the three doors. In the latter case, the ghost will not answer at all.

There are several possibilities, one of them is this one.

If the door to freedom is not the third one, then is it the first one? Otherwise, what was the name of Napoleon Bonaparte?

  • If the door to freedom is the first one, the ghost will answer yes.
  • If the door to freedom is the second one, the ghost will answer no.
  • If the door to freedom is the third one, the ghost will not answer.
  • 2
    $\begingroup$ I still want to know the answer to the last question :-) $\endgroup$
    – Mohammad
    Commented Apr 19, 2015 at 17:43
  • 7
    $\begingroup$ I am sorry to say, but this are two questions. The ghost could say no or yes after you have spoken out the first sentence, as it is a full and valid question. I tried the same attempt first, but I could not phrase a one sentence question which leaves the ghost with three options: yes, no and "I cannot answer that with yes and no" leading to silence. Also nobody said that he will stay quiet if he cannot answer it with yes and no. That is only an assumption. We know that he can only answer it with yes and no. He might use this words even if the do not answer the answer corretly. $\endgroup$
    – nerre
    Commented Apr 19, 2015 at 20:47
  • $\begingroup$ Does it become one question if the first question mark is replaced by a semicolon? $\endgroup$ Commented Apr 19, 2015 at 22:02
  • 2
    $\begingroup$ Assuming this is a logical puzzle (and not a lateral-thinking one), you can avoid the mutliple questions issue by writing "Yes" on the first door, "No" on the second door, and asking the ghost : "What did I write on the door that leads to freedom ?" $\endgroup$
    – Uriel
    Commented Apr 20, 2015 at 6:43
  • 3
    $\begingroup$ Maybe I don't know how to read, but I'm pretty sure that when you put two "?", you created two questions. $\endgroup$ Commented Apr 21, 2015 at 3:40

my question would be:

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?

I stole this answer (without shame) from: https://puzzling.stackexchange.com/a/2310/9835 It is for an other version of your question where there are 2 guards (one truth full and one lying). But can perfectly be used here

There are 2 possibilities here:
The number of truths is odd, 1. is false, 2. is false, so 3. must be true.
The number of truths is even, 1. is false, 2. is true, so 3. must be true.

Either way you created a paradox if the door you are pointing to is not the one to freedom, so what ever happens the door you are pointing to leads to freedom :)

All credits to Florian F.

  • $\begingroup$ Actually, the three premise question may not answer: if premise 3 IS false, then premise 1 AND 3 are FALSE, 2 is TRUE and all you know is one of the OTHER two doors is correct. $\endgroup$
    – user11602
    Commented Apr 18, 2015 at 22:05
  • 3
    $\begingroup$ This could be simplified to "Is the statement (You will reply negatively) xor (This door leads to freedom) true?" The only reason the (You are a liar) part was needed in the other cases was because there were two guards, one of whom lied. $\endgroup$ Commented Apr 18, 2015 at 22:06
  • $\begingroup$ yes mike but you want an odd statement of negatives. how do you ask a question with xor? $\endgroup$
    – Vincent
    Commented Apr 19, 2015 at 9:22
  • 2
    $\begingroup$ @VincentAdvocaat The typical wording is "Is exactly one of 'you will answer negatively' and 'this door leads to freedom' true?" $\endgroup$ Commented Apr 20, 2015 at 0:40
  • $\begingroup$ @JDJohnson No, that would be a paradox. FALSE TRUE FALSE means that he would reply negatively and therefore that there is an even number of true propositions. However, this is in conflict with the fact that there only the second one is true (odd number). Vincent's answer is correct and AJMansfield's one is a more elegant formulation of it. $\endgroup$
    – Simon
    Commented Apr 20, 2015 at 7:32

Although the Ghost only has a two word vocabulary (Yes or No are its possible responses), I would ask a question that makes full use of its vocabulary;

If you were to walk past each of these doors from left to right, and say 'yes' when you passed a 'door of life' and 'no' when you encountered a door leading to death, what would you say?

In this manner I've extracted all the information I need with one question.


I will ask him,"response me "Yes" if the 1st door has the way to freedom, or response me "No" if the 2nd door has the way to freedom."

If He response, "Yes"

I'll go through 1st door.

If He response, "No"

I'll go through 2nd door.

If He didn't response,

I'll go through 3rd door.

  • 6
    $\begingroup$ Being super-pedantic, you're issuing a command, not asking a question. $\endgroup$ Commented Apr 19, 2015 at 22:05
  • $\begingroup$ Brilliant answer $\endgroup$
    – Bobby
    Commented Apr 20, 2015 at 8:11

I have a question inspired from another puzzle that i found here that could work.

The question:

Is it simultaneously true that the second door is bad and either the third door is bad or your answer to this question is "no"?


For the sake of simplicity I labeled the door that leads to freedom as good and the other ones as bad.
I am gonna divide my question in 3 sentences
A = The second door is bad
B = The third door is bad
C = The answer is "no"

So the question can be wrote like this:

Assuming the 3 cases:

1. First door is the good one => A=True, B=True
true AND (true OR whatever) = true

2. The second door is the good one => A=False
false AND (whatever) = false

3. The third door is the good one => A=True, B=False, C=?
true AND (false and C) = R (R=answer)

If R = true, then it is required that C is also true, but a C that is true implies that R is false (contradiction)
If R = false, then C is also false, but that means that R is true (again contradiction)

So, if the ghost answers with yes we take the first door, if the answer is no we take the second door, and if there is no answer we take the third.


This is a big supposition, but just maybe it happens that the ghost has a quirk where it doesn't wait for you to finish asking the question if it has heard enough of it to be 100% confident of the answer.

In this case, I'd ask, very slowly: "Is the door to freedom one of these two doors: this red door right here, or..." and after a long pause, pace slowly between the other doors, indecisively, finally finishing the question "...this blue door?"

If the ghost is an impatient sort of ghost, or an optimized-algorithm ghost, and the red door is the one to freedom, it will answer "yes" right away.

Otherwise, you'll get a "yes" or "no" only after naming the second door, and there's your answer.


I don't think that's possible. There are three possibilities and you're asking a question with a boolean answer.


I would chose any two doors(X,Y) and ask the following question:

If X,Y does not lead to the same place, does X lead to freedom ?

If he Says "YES"

Chose X

If he says "NO"

Chose Y

If he keeps quite, it means that my first condition was false. Thus,

Chose Z (the left out door)

  • 1
    $\begingroup$ Unfortunately, any "If A then B" evaluates to true if A is false. If the ghost knows its Boolean algebra, it will always give a "yes" or "no" answer to your question. $\endgroup$
    – Jonathan
    Commented Oct 30, 2015 at 1:18

Figured i'd add my answer here, since it's slightly different from the other approaches, and you can never have enough answers to strange ghosts in impossible situations

I'd ask

If you'd completely and utterly forget about the middle door, and you'd draw a cross on the right door, would THE door leading to death have a cross on it?

This works because

If the middle door (was) the life one, the ghost would have 2 doors leading to death, with no way to determine which one i meant by 'THE door'. However, if door 2 was death, then he now only knows of a single door that leads to death, and can answer without a problem. Resulting in Yes to right, No to left, Silence to middle.

Note that you can't ask

Would the door leading to life have a cross on it? Because as many a logic professor will tell you, quantifying over an empty set is always true.


my question will be ( assuming that 2nd door is silent )

Does the 1st door will give me more chance to live than the 2nd door?

yes = 1st door no = 3rd door no answer = 2nd door

  • 2
    $\begingroup$ I don't think this works. Wouldn't the ghost just say "no" if it was the second door? $\endgroup$ Commented Apr 19, 2015 at 2:48
  • $\begingroup$ I think you are on the right track but not quite...is there a better way to get him to not be able to answer? Maybe if he doesn't know. $\endgroup$
    – kaine
    Commented Apr 19, 2015 at 5:31
  • 1
    $\begingroup$ Piggybacking. Ask the ghost - Assuming you played this game with arbitrarily many people who all just asked "is door x freedom", would you direct more people into door 1 than 2? If door 1 is freedom, he will answer yes. If door 2 is freedom, he will answer no, if door 3 is freedom, he will not know. $\endgroup$
    – Scott
    Commented Apr 19, 2015 at 7:56
  • $\begingroup$ Wait, not quite. Assuming you played this game with 3*n people who all just asked "is door x freedom" (with n people each asking about x=1,2,3), and if the answer was no, picked a door at random, would more people walk through door 1 than 2? If door 1 is freedom, he will say yes, as 1/3*1+1/3*~1/2 > 1/3*~1/2. If door 2 is freedom, he will say no by the same logic. If 3 is freedom, then he won't know, as both doors 1 and 2 will have ~1/6th of all people going through them, but he won't know which number is slightly bigger. $\endgroup$
    – Scott
    Commented Apr 19, 2015 at 8:13
  • 1
    $\begingroup$ Could you command the ghost directly? If it's door 1, answer yes, if it's 2, answer no, if it's 3, stay silent. If you can't command it, you just embellish it a little bit and tell him: Let's assign each door a number: 1, 2 and 3. If I would ask you question 1, 2 or 3, depending on which door leads to freedom, what would be your answer? The Questions are: 1. Is the blue color blue? 2. Is the red color blue? 3. Will I be free? (It doesn't know) / At what time do we serve tea in this dungeon? (It can't answer because of yes/no rule) $\endgroup$
    – quimnuss
    Commented Apr 19, 2015 at 13:50

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