Expected Distance to Escape a Room

Expectation · Medium · Free problem
You are stuck in a room with 4 doors. Two doors lead to freedom: one down a path of length 5 miles, the other 7 miles. The other two doors loop you right back to this same room -- one after 2 miles, the other after 4 miles. At every step you pick a door uniformly at random. What is the expected total distance you travel before reaching freedom?

Open the full interactive solver, hints, and worked solution →