Search

Puzzle #28: 3 Doors and Heaven Puzzle | Infosys



A person dies, and he arrives at the gate to heaven. There are 3 doors in heaven. One of the doors leads to heaven, the second one leads to a 1-day stay at hell and then back to the gate and the third one leads to a 2-day stay at hell and then back to the gate. Every time the person is back at the gate, the 3 doors are reshuffled. How long will it take the person to reach heaven?




Puzzle Solution:

According to probability 1/3 of the time, the door to heaven will be chosen, so 1/3 of the time it will take 0 days. 1/3 of the time, the 1-day door is chosen, of those, the right door will be chosen the next day. Similarly, 1/3 of the time, the 2-day door is chosen, of those, the right door will be chosen after the 2 days.


So let's say it will take N days. 1/3 of the cases are done in 0 days as before. 1/3 of the cases are 1+N. 1/3 are 2 + N.


N = 1/3 * 0 + 1/3 * (1 + N) + 1/3 * (2 + N)

N = 1 + 2N/3

Therefore, N/3 = 1 ; N = 3.


So, it will take on average 3 days to reach to heaven.


#3DoorsandHeavenPuzzle #InterviewPuzzle #Puzzle #InfosysInterviewPuzzle