random walk with possibility to freeze

197 Views Asked by At

Consider a Random Walk on a one-dimensional lattice. The walker starts moving at time $0$ from $x=0$. At every step, the walker moves to the right with probability $p$, to the left with probability $q$ and it dies with probability $r$. Naturally $p+q+r = 1$. What is the probability that it will reach the site $x=d$ before dying?