2023 WSMO Team Round Problems/Problem 15
Problem
On a number line labeled and old man starts at
and tries to reach
Initially, he knows to walk right. However, he has dementia. On each move, there is a
chance he forgets which direction he is supposed to go, resulting in him walking the opposite direction. If the probability the old man reaches
without dying is
for relatively prime positive integers
and
Find
(Note: if the old man tries to walk left when he is at 0, he falls off a cliff and dies.)