\documentclass[a4paper,12pt]{article}
\newcommand{\ds}{\displaystyle}
\newcommand{\pl}{\partial}
\parindent=0pt
\begin{document}
{\bf Question}
A gambler with initial capital $\pounds\!z$ plays against an
opponent with capital $\pounds(a -z),$ where $a$ and $z$ are
integers and $0 \leq z \leq a.$ At each bet the gambler wins
\pounds1 with probability $p,$ and loses \pounds1 with probability
$q$ or retains his stake. The bets are independent and the game
ends when the gambler or his opponent is ruined. Show that the
probability, $P_z$, that the game ends after an odd number of bets
satisfies the difference equation. $$P_z(2 - p - q) + pP_{z+1} +
qP_{z-1} = 1 \hspace{.2in} {\rm for\ \ \ } z = 1, 2, ..., a - 1.$$
Two children play with a toy roulette wheel having 36 numbers
$0,1,\ldots,35$ using stakes of 1 matchstick. One child wins if
the number obtained when the wheel is spun is $0,1,2,\ldots,8$ or
9 and the other child wins if the number is $10, 11, 12,\ldots,
18$ or 19. If the result is $20, 21, 22,\ldots 34,$ or 35 both
children retain their matchsticks. If the first child has 5
matchsticks and the second has 6, find the probability the one
other of the children runs out of matchsticks after an odd number
of spins, stating any assumptions made.
\vspace{.25in}
{\bf Answer}
Arguing on the first bet conditionally gives $$P_z = p(1 -
P_{z+1})+q(1 - P_{z-1}) + (1-p-q)(1 - P_z)$$ i.e. $\ds (2-p-q)P_z
+ pP_{z+1} + qP_{z-1} = 1$
Boundary conditions are $\ds P_0 = 0$ and $\ds P_a = 0$.
Let child 1 be the gambler. Then $\ds p = \frac{10}{36} =
\frac{5}{18} = q, \hspace{.2in} z = 5, \hspace{.2in} a =11$
The equation becomes $$5P_{z+1} + 26P_z + 5P_{z-1} = 18$$ The
auxiliary equation is\ \ $\ds 5\lambda^2 + 26 \lambda + 5 = 0$
$$(5 \lambda +1)(\lambda +5) = 0 \hspace{.2in} {\rm so}
\hspace{.2in} \lambda = -\frac{1}{5} , -5.$$
A particular solution is $P_z = $ constant = $\frac{1}{2}.$
So the general solution is $$P_z = A \left( - \frac{1}{5} \right)
^z + B (-5)^z + \frac{1}{2}$$
with $P_0=0, \hspace{.2in} P_{11} = 0.$
So $A + B + \frac{1}{2} =0,$
$\ds A \left( -\frac{1}{5} \right)^{11} + B(-5)^{11} + \frac{1}{2}
= 0$
i.e. $\ds B = \frac{5^{11} - 1}{2(5^{22} -1)} \hspace{.2in}
(\approx 1.02 \times 10^{-8})$
$\ds A = -\frac{1}{2} - \frac{5^{11} - 1}{2(5^{22} -1)}$
So \begin{eqnarray*} P_5 & = & \left( -\frac{1}{2} - \frac{5^{11}
- 1}{2(5^{22}-1)} \right) \left(-\frac{1}{5} \right)^5 +
\frac{5^{11} -1}{2(5^{22} - 1)} (-5)^5 + \frac{1}{2} \\ & = &
0.500128\ldots
\end{eqnarray*}
\end{document}