Nice Puzzle !!! solve it..

Discussion in 'Chit Chat' started by asadullah.ansari, Apr 8, 2008.

  1. asadullah.ansari

    asadullah.ansari TechCake

    Joined:
    Jan 9, 2008
    Messages:
    356
    Likes Received:
    14
    Trophy Points:
    0
    Occupation:
    Developer
    Location:
    NOIDA
    There is a prisoner who is about to be executed. The king decides to give him one last chance to live.

    There are 2 doors, the life door and the death door. There is one guard standing by each door. Those two guards know which door is the life door and which is the death door. However, one of them always tells the truth and the other always tells a lie. There is no way you can identify which door is the life door or the death door. There is no way you can distinguish who is the one telling the truth.

    The prisoner can only ask one guard one question. Then he needs to choose a door to walk in. If he walks in the death door, then he will be executed. If he walks in the life door, he can have a new life.

    He did choose the life door and lived. What was the question he asked? How did he choose the door after he got the answer from one of the guards?

    Reference : http://www.freepuzzles.com/puzzles/PuzzlePage.asp?PuzzleNumber=Logic003&CategoryID=2
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    Which is the life door if I would have asked the other guy would be?
     
  3. asadullah.ansari

    asadullah.ansari TechCake

    Joined:
    Jan 9, 2008
    Messages:
    356
    Likes Received:
    14
    Trophy Points:
    0
    Occupation:
    Developer
    Location:
    NOIDA
    You can solve it by this way also.

    Which door would you point to if I asked you the question which door is
    the Life door?

    Both should point to the Life door!

    If you think of T (true) and F (false) as functions on the parameter Q
    (question), the T person would reply T(T(Q))=T(Q) and the F person would
    reply: F(F(Q))=T(Q).

    For the previous soln, one replies T(F(Q))=F(Q) and the other
    F(T(Q))=F(Q).
     
  4. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
    Not always. When I ask the question to the guy who is lier he will point to the death door for the above question.
     
  5. asadullah.ansari

    asadullah.ansari TechCake

    Joined:
    Jan 9, 2008
    Messages:
    356
    Likes Received:
    14
    Trophy Points:
    0
    Occupation:
    Developer
    Location:
    NOIDA
    Yes!!! You are right shabbir

    Assuming that both know who tells the truth and who lies, ask anyone:

    Which door will the other person show me if I ask him to show me the
    life door?
    And then choose the other door from the answer to the above question.

    Suppose L and D are doors. And T and F are people.

    Ans from T: D (as T knows F will answer D (false) and T gives this
    answer truly)
    Ans from F: D (as F knows T till answer L (true) and F gives the
    opposite answer falsely)

    Since this gives D, we go for the other door L.
     
  6. faizulhaque

    faizulhaque New Member

    Joined:
    May 23, 2008
    Messages:
    210
    Likes Received:
    3
    Trophy Points:
    0
    Occupation:
    Student
    Location:
    Karachi
    Home Page:
    http://www.google.com
    can't get the entire idea friends!
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice