I am trying to solve the recurrence relation
$$p_k=\frac{1}{2}p_{k+1} + \frac{1}{2}p_{k-1}.$$
The context of this recurrence relation is as follows: if I start with \$20, and I win \$1 for every head and lose \$1 for every tail, I obtain the above recurrence relation for $p$. I lose the overall game if I lose all my money, and win the overall game if I accumulate \$100.
Now, I understand that substituting $p_k = p^k$ is the usual approach, which gives $p=1$. While clearly this is a solution, in the context of this above game something’s not right – where in my logic have I gone wrong? Thank you!
Write $p_k=\frac{1}{2}p_{k+1} + \frac{1}{2}p_{k-1}. $ in the form $p_{k+1} =2p_k-p_{k-1} $.
This has characteristic polynomial $d^2 = 2d-1$ or $d^2-2d+1 = 0$ or $(d-1)^2 = 0$.
The repeated root means that the two solutions are $r^k$ and $kr^k$.
The $r^k$ solution gives $r^{k+1} =2r^k-r^{k-1} $ or $r^2 =2r-1 $, so $r = 1$ as you got.
The $kr^k$ solution gives, since $r=1$, just $k$.
To check, if $p_k = k$ then $2p_k-p_{k-1} =2k-(k-1) =k+1 =p_{k+1} $.
Therefore the solutions are $1$ and $k$, so the general solution is $a + bk$.