Interview Query

Stranded Miner

Have you seen this question before?

A miner is stranded and there are two paths he can take.

Path AA loops back to itself and takes him 5 days to walk it.

Path BB brings him to a junction immediately (0 days). The junction at the end of path BB has two paths say Path BABA and Path BBBB.

Path BABA brings him back to his original starting point and takes him 2 days to walk. Path BBBB brings him to safety and takes him 1 day to walk.

Each path has an equal probability of being chosen and once a wrong path is chosen, he gets disoriented and cannot remember which path he went through, and the probabilities remain the same.

What is the expected value of the amount of days he will spend before he exits the mine?

Next question: Find the missing number
Loading comments