Expected number of moves in random walk up the stairs

106 Views Asked by At

A person is going along the stairs up the mountain: with probability $p$ he makes one step forward, with probability $(1-p)$ he falls, rolls down and raises only $k$ steps behind. The peak of the mountain is $n$ steps from the starting point, and there is no end of the stairs downway. What is the expected number $E_n$ of moves before achieving the peak? Both a step up and a rolling down are considered one move.

There is an obvious functional equation $E_n=1+pE_{n-1}+(1-p)E_{n+k}$, but it seems that there is not enough boundary conditions, only $E_0=0$. How can it be solved?