2023 WSMO Team Round Problems/Problem 15

Problem

On a number line labeled $0, 1, 2, 3, 4, 5,$ and old man starts at $0$ and tries to reach $5.$ Initially, he knows to walk right. However, he has dementia. On each move, there is a $\frac{1}{3}$ chance he forgets which direction he is supposed to go, resulting in him walking the opposite direction. If the probability the old man reaches $5$ without dying is $\frac{m}{n},$ for relatively prime positive integers $m$ and $n.$ Find $m+n.$ (Note: if the old man tries to walk left when he is at 0, he falls off a cliff and dies.)

Solution