Heaven or Hell Puzzle

Puzzle:

You are standing before two doors. One of the path leads to heaven and the other one leads to hell. There are two guardians, one by each door. You know one of them always tells the truth and the other always lies, but you don’t know who is the honest one and who is the liar.

You can only ask one question to one of them in order to find the way to heaven. What is the question?

This is one of the classic puzzles asked in Infosys interview.

Puzzle Solution:

The question you should ask is “If I ask the other guard about which side leads to heaven, what would he answer?”. It should be fairly easy to see that irrespective of whom do you ask this question, you will always get an answer which leads to hell. So you can chose the other path to continue your journey to heaven.

This idea was famously used in the 1986 film Labyrinth.

Here is the explanation if it is yet not clear.

Let us assume that the left door leads to heaven.

If you ask the guard which speaks truth about which path leads to heaven, as he speaks always the truth, he
would say “left”. Now that the liar , when he is asked what “the other guard (truth teller) ” would answer, he would definitely say “right”.

Similarly, if you ask the liar about which path leads to heaven, he would say “right”. As the truth teller speaks nothing but the truth, he would say “right” when he is asked what “the other guard( liar ) ” would answer. So in any case, you would end up having the path to hell as an answer. So you can chose the other path as a way to heaven.

46 Thoughts on “Heaven or Hell Puzzle”

1. Hasnen Laxmidhar on June 10, 2014 at 2:55 pm said:

just Asked One Doorkeeper :–>>what is Your Side(left or right) Compate to Other Doorkeeper ??

• Komal on May 21, 2015 at 11:44 pm said:

he will ask to any one of them as
“According to your next guard which way goes to hell?”
If guard is truth teller he will tell according to next guardian that is way of heaven.and if he is liar he will also tell way of heaven.
so always ask question in such way that destination to which you want to go is not in the question….

• Harishankar on August 17, 2014 at 6:13 pm said:

Answer could be simple yes/no – You can detect truth teller/liar with this but how would you get to know what is the actual door to heaven? Remember only 1 question can be asked!

3. ARVIND KUMAR CHAUBEY on August 3, 2014 at 9:15 pm said:

ask universal truth question to each guard. like ,in which direction sun is rises?
if guard is lier then he will give wrong ans. so go to another guard and u know that this guard is telling true.because in question it is given that one guard is telling true and other is telling lier.so ask to other guard,which is heaven room? and enter that room.

4. crankyCoder on September 1, 2014 at 1:40 pm said:

Captain Vyom!!!!!!!!!!!!!!!!!!

5. just ask to the doorkeeper -If I ask to the other one that at which side heaven lies?
since if to whom I ask is truth teller then he will definitely tell the truth(which is actually the false statement of liar).
however if he would be liar then he will give the opposite side of actual heaven side .
that is the answer we get will be the same

6. you can ask left guy as what is your side …if he said truth(left) then go to another guy and ask which door goes to hell if he say right side then take the left door or if he say left take right one . and if first guy response u right then another one may lead you truth ..

7. its simple one……..
have a eye on it ….
you can ask left guy as what is your side …if he said truth(left) then go to another guy and ask which door goes to hell if he say right side then take the left door or if he say left take right one . and if first guy response u right then another one may lead you truth ..

8. Ravikumar on November 13, 2014 at 4:29 pm said:

Lets go to one of them and ask him Universal truth i.e Sun rises in which direction ?? with that answer we can confirm him whether he is liar or not(let’s assume he is liar). Then we can go to the other guard(truth teller) and ask him which is way to heaven definitely he will give correct answer and we can foll that way to heaven

9. Saurabh Phatak on January 6, 2015 at 6:50 pm said:

Well I really don't get how one find the ans by asking just a single question. Let's put this to case.

There are 2 Guards G1 & G2. guarding 2 gates L & R.

Also lets assume L = Heaven, R = Hell. (The Questioner doen't knw, its just an asumption)

You don't which Guard is honest or liar nor do you know which gate is Heaven or Hell.

Now Ask G1 : " If I Ask G2 where is heaven, what would he say ?"

G1 replies : G2 would say R

Now with the given reply, how are we suppose to know if G1 is telling the truth or G2 ?

We further proceed and ask the same question to G2.

Ask G2 : If I ask G1 where is heaven what would he say ?

G2 replies : G1 would say L.

Now how do you know who's telling the truth ?

• shh pkde bhahya how can we know that which one is ri8

• Well let think it this way.
suppose I pick any one of the 2 guards . now if the one i picked is an honest person (I’m considering the fact that i have no idea about their honesty but obviously the honest one would be knowing that who is honest and who is not) and quoting the same question mentioned above here, he will answer according to the dishonest one and the answer would be a lie(ie, it would lead to hell if i asked for the heaven). so i’ll pick the door which he didnt mention in his answer.

Now lets consider the case that the guard im gonna ask the question is a liar. He surely knows he’s a liar and truth cant be expected out of him. when im asking about heaven (i mean the question that what would the other guard say if he’s been asked which door leads to heaven) , being a liar he would manipulate the honest one’s reply (as he’s gonna lie anyway) and will direct you towards hell. so in this case also picking up the door which is opposite of what is being told will lead you to heaven.

So we actually have only this question “if we ask the other guard about which door leads to heaven what will he say) , we’ll reach heaven.

PS : i earlier thought of asking this ” yamraaj kahan hai?” lol. :p

10. Saurabh Phatak on January 6, 2015 at 6:50 pm said:

Well I really don't get how one find the ans by asking just a single question. Let's put this to case.

There are 2 Guards G1 & G2. guarding 2 gates L & R.

Also lets assume L = Heaven, R = Hell. (The Questioner doen't knw, its just an asumption)

You don't which Guard is honest or liar nor do you know which gate is Heaven or Hell.

Now Ask G1 : " If I Ask G2 where is heaven, what would he say ?"

G1 replies : G2 would say R

Now with the given reply, how are we suppose to know if G1 is telling the truth or G2 ?

We further proceed and ask the same question to G2.

Ask G2 : If I ask G1 where is heaven what would he say ?

G2 replies : G1 would say L.

Now how do you know who's telling the truth ?

• kavya reddy on March 5, 2015 at 7:53 am said:

This is exactly my question is ..

• *G2 will reply: G1 would say R.
Cos G2 will lie..

assume that G1 is heaven guy(left) and G2 hell(right)..
u ask g1: what wll the othr guy say..
he’ll reply: R… why? cos ur asking him.. what will g2 reply when i ask him what is the way to heaven.. the way to heaven is left.. so he’ll obviously reply R..
so u choose L.
now if u ask g2 first.. what wil the othr guy tell if i ask him the way to heaven.. he’ll reply: R.. why? cos the other guy… i.e. G1 will reply left if u ask him.. but g2 doesnt want u to go to heaven and hence he’ll lie to u and tell the other will tell right.. so again u choose L..
so either way u choose left

now assume G1(left) is hell and G2 is heaven(right)
and u ask g1.. what’ll the other guy say.
now g1 is a liar.. if u ask him what will the other guy tell if i ask him where’s heaven.. he’ll reply left.. cos if u actually ask g2.. he’ll tell u right.. but g1 doesnt wan u to go to heaven.. so he’ll tell left.. so u choose Right.
if u ask g2 first.. he’ll tell left.. cos if u ask g1 whats the way to heaven.. he’ll tell left.. cos he doesnt want u to go to heaven.. and he’ll tell left..
so u choose Right..

u don’t know who’s lying.. or who’s telling the truth.. u just use this logic now..

11. Arighna on January 10, 2015 at 1:36 am said:

We can ask the question “Is the truth-teller guardian of Heaven”? If he says ‘yes’ then he is guarding Heaven else Hell.

12. sumitra on March 1, 2015 at 7:41 pm said:

still not yet clear…

13. Ankan kakoti on April 1, 2015 at 5:58 pm said:

If you are the liar tell me which door leads to heaven and if you are the honest one tell me which door leads to hell.

14. Ankan kakoti on April 1, 2015 at 6:01 pm said:

We will take the oppssite door . That door will be the way to heaven.I am asking just one question but their is two condition.. Mail me if you like my answer.

15. ritik sharma on April 5, 2015 at 11:40 pm said:

still not clear, plz anyone explain it again.

If the guard says yes..then he is saying the truth if No then he is lying.

17. ritik sharma on April 20, 2015 at 12:36 am said:

not clear yet

18. aabha vyas on August 10, 2015 at 4:13 pm said:

nice

19. As we are supposed to ask a single question, we need to formulate the question in such a way that it gives us both answers as to who is liar and which is the heaven direction.
questions like “Am I dead” will give us only one answer whether he is liar or not.

let us assume

Heaven : Left L : Guard G1
Hell : Right R: Guard G2

case 1: G1 liar, G2 Truth teller

U r asking G1 the below question.
G2 will tell ‘L’ as he is truth teller.
But G1 will tell opposite which is ‘R’ bcoz he is a liar.

choose the other way which is ‘L’.

U r asking G2 the below question.
G1 will tell ‘R’ as he is liar.
G2 will also tell ‘R’ bcoz he is a truth teller what ever G1 says he will tell the same.

choose the other way which is ‘L’.

case 2: G2 liar, G1 Truth teller

U r asking G2 the below question.
G1 will tell ‘L’ as he is truth teller.
But G2 will tell opposite which is ‘R’ bcoz he is a liar.

choose the other way which is ‘L’.

U r asking G1 the below question.
G2 will tell ‘R’ as he is liar.
G1 will also tell ‘R’ bcoz he is a truth teller what ever G2 says he will tell the same.

choose the other way which is ‘L’.

what ever is the case the answer is ‘L’ so u r directed to the destination.

20. shubham on October 7, 2015 at 5:27 pm said:

Or we can easily ask to first doorkeeper”If i ask to second doorkeeper about you if you speak truth.What would he say?”

In that case if the first doorkeeper say “Yes” then he is the liar and other one is truth teller
or if he says “No” then he is the truth teller.
In that way we will be able to know the truth teller and liar.
and then go to other doorkeeper and ask the heaven door

If second one was liar then choose other door whichever he recommends to.
or if he was truth teller then go according to him

21. Srinivas Ravi on October 29, 2015 at 10:50 am said:

To all those suggesting answers proposing asking 2 questions – ONLY ONE question can be asked. That’s the constraint of the puzzle.

Mostly only the given solution works. Anyone with alternatives do comment. But only after thinking thoroughly.

22. the man can ask only one question ri8, then he asks that ” which way the second person will told me goes to heaven ?” and this question have always a wrong answer
when he asks this que to guardian which always lies he give way which lead to hell so man must choose another way
when same que ask to guardian who always tell truth he say” the other person will show you this way is going to heven ” which is way of hell so both the guardian shows the way to hell so easily man can choose another way going to heaven
if my answer is ri8 then inform me on [email protected] dot com

23. Just ask any of the door keeper ..
what am I,boy or a girl??
U will get to know which way leads to heaven
There can be millions of such questions..
U can also talk science..
For ex: Is iron a metal?
It might sound funny..but believe me, the interviewer will definitely get attracted towards the way u think..!

24. One can ask a simple straight forward question to one of the door keeper that ” Am I a girl or a boy?”..
You will get to know which door leads to heaven
There can be millions of such questions..
You can also talk science
For ex: Is iron a metal..??
It may sound funny..but believe me..the interviewer wants a answer like that..a different approach of thinking can be a good option sometimes..

25. Sayali Borade on January 19, 2016 at 2:11 pm said:

One can ask a simple straight forward question to one of the door keeper that “Where is lord Indra ?”.
obviously we know that lord Indra live in heaven so when we ask lier he will reply hell…and
You will get to know which door leads to heaven.

26. krishna sai on February 4, 2016 at 10:56 pm said:

Fill the blanks of nine letter word(_a_s_o_i_)

27. Rohit Chauhan on June 7, 2016 at 4:25 pm said:

First of all, the question states that you can ask only one question to any one of them, so the solution provided to ask both the guards the same question does not fit here at all. So I would request a proper solution for this if anyone knows or if the question is even valid or not.
Thanks

28. poornima on June 23, 2016 at 11:23 am said:

The question you need to ask is – “If I ask the other guard which is the door to heaven, which door will he point me to?”

Explanation:
No matter who you ask this question to, that guard will always point you to the door to hell.

If you ask this to the truth telling guard – he will honestly tell u that the lying guard will point you to the door to hell
If you ask the lying guard – he will lie to you and point you to the door to hell.

29. Vamsi on July 24, 2016 at 9:51 pm said:

______________________
| left | right | TT – Truth Teller
|——|——————–|
| TT | yes | no |
|——|——————–|
| Liar | no | yes |
|——|——————–|

I can ask question like this to any one of them:
If I ask you whether the left door leads to heaven you will say yes, won’t you??
(or)
Is it true that you are a truth teller and the left door leads to capital
(or)
you are a liar and the right door leads to heaven

30. Anil Arora on February 26, 2017 at 10:51 pm said:

One person is positive and another is negative .

SO if you ask a question to anyone that Question iS

“if i would have asked other person which gate goes to Heaven what would have his answer”

So we are assuming that both gatekeeper knows each other that other always tells right or wrong that i think is not mentioned here.

So answer will be always negative (Hell)
because if the other person is right he will tell right path to Heaven but to whom you are asking will reverse + and – ve = – ve

same way you can think of other.

31. Philip on March 23, 2017 at 8:48 pm said:

Do not make the assumption that we wants to know which guard is lying; we don’t care. Do not make the assumption that the truthful guard is guarding the gate to heaven; it doesn’t matter. Remember that we are allowed only one question to ask of either guard. Assume however that each guard is standing in front of each gate. Assume also that they each know the other’s inclination to speak lies or speak truths.

A better solution is to ask either guard standing in front of their respective gates one question. The question is, “Is the truthful guard guarding the gate to heaven?” If the guard says, “Yes,” then that guard is guarding the gate to heaven. If the guard says, “No,” then that guard is guarding the gate to hell.

So with that question, we find out which gate leads to heaven, but we never find out if the guard we questioned was lying or telling us the truth.

32. ashish on April 6, 2017 at 1:47 pm said:

come on he can ask only one question . from any of them mentioned in the question very clearly,
suppose left gate leads to heaven :
he would any one of the person , that he dont know he is lair or truth teller , so it is impossible to find 100% , correct gate which leads to heaven…
if iam not wrong correct the problem statement , the person can sk two question then it is very simple and w can apply these logics

33. The puzzle is inaccurately worded, and so has no valid answer. For example, the puzzle does NOT tell you that one of the doors leads to heaven. Also, the liar can answer that 1 equals 2, which is a lie, but gives nothing away regarding the way to heaven.

34. Sanish on July 3, 2017 at 10:06 pm said:

I will ask to guardian1 the following question “If I tell this is the door to heaven, will the guardian2 reject it? If the answer is “yes” then that is the door to heaven. If the answe is “no” then other door is the door to heaven. Because the above question both guardians will reply the same answer.