A particle P executes a random walk on the line above such that when it is at point $n$ ($1 \leq n \leq 9$, $n$ a non-negative integer), it has a probability of $0.4$ of moving to $n+1$ and a probability of $0.6$ of moving to $n-1$. The walk terminates as soon as P reaches either $0$ or $10$. Let $p_n$ denote the probability that the walk terminates at $0$ starting from $n$.
a) Show that $2p_{n+1} - 5p_n + 3p_{n-1} = 0$
b) Solve this recurrence relation subject to the boundary conditions $p_0 = 1$ and $p_{10} = 0$.
(The result should be $p_n = \frac{1.5^{10} - 1.5^n}{1.5^{10} - 1}$.)
I wasn't quite sure how to approach the problem so any help is appreciated.
(a) Suppose you are currently at point $n$; you have a probability $p_n$ of terminating at point $0$. How do we break that down? You have a probability $0.4$ of moving to point $n+1$, at which point your probability of terminating at point $0$ is $p_{n+1}$, and you have a probability $0.6$ of moving to point $n-1$, at which point your probability of terminating at point $0$ is $p_{n-1}$. We can therefore write
$$ p_n = 0.4p_{n+1}+0.6p_{n-1} $$
It should be a matter of simple algebra to convert that into the desired expression.
(b) Additive series such as these have solutions that are either pure geometric series or linear combinations of pure geometric series. We proceed first by finding the geometric solutions: We assume that the series is of the form $p_n = a r^n$, and we substitute into the recurrence equation.
$$ 2ar^{n+1}-5ar^n+3ar^{n-1} = 0 $$
Dividing out $ar^{n-1}$ gives us
$$ 2r^2-5r+3 = 0 $$
You can solve this in the usual way to derive two solutions $r_1, r_2$; the closed form for the additive series is then of the form
$$ p_n = a_1 r_1^n + a_2 r_2^n $$
At this point, you write out equations for the two boundary conditions:
$$ 1 = p_0 = a_1 r_1^0 + a_2 r_2^0 = a_1 + a_2 $$ $$ 0 = p_{10} = a_1 r_1^{10} + a_2 r_2^{10} $$
You now have two linear equations in two variables $a_1$ and $a_2$. Solve for them and you should obtain the desired expression using the general form of $p_n$ above.