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.

Heaven and Hell Puzzle
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.

0 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….

  2. Just ask “do both doors lead to heaven”?

    • 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 ?

  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 ..
      Can anyone answer the question??

      • *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.

  16. Just ask..am I dead?
    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.
    question : “If I ask the G2 about which side leads to heaven, what would he answer?”
    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.
    question : “If I ask the G1 about which side leads to heaven, what would he answer?”
    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.
    question : “If I ask the G1 about which side leads to heaven, what would he answer?”
    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.
    question : “If I ask the G2 about which side leads to heaven, what would he answer?”
    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

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Post Navigation