Solution

ID: past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2024/ia/paper-2/11f/iii/solution

Let be the expected remaining time when the walk is at . The first-step recurrence for gambler's ruin is
with . The quadratic
satisfies both the recurrence and the boundary conditions, and their finite linear system has a unique solution. Starting from zero therefore gives

New to topics? Read the docs here!