\documentclass[a4paper,12pt]{article}
\newcommand{\un}{\underline}
\newcommand{\undb}{\underbrace}
\newcommand{\df}{\ds\frac}
\newcommand{\ds}{\displaystyle}
\newcommand{\pl}{\partial}
\parindent=0pt
\begin{document}
{\bf Question}
A gambler with initial capital $£z$ plays against an opponent with
capital $£(z-1)$, where $a$ and $z$ are integers and $0 \leq z
\leq a$. At each play the gambler wins $£1$ with probability $p$
and loses $£1$ with probability $q=1-p$.
Let $q_z$ denote the probability that the gambler will eventually
be ruined. Write down a recurrent relation for $q_z$ and solve it
to obtain explicit formulae for $q_z$ in terms of $z,\ a,$ and
$p$, in both cases $p=\df{1}{2}$ and $p\ne \df{1}{2}$.
Two players begin a game of dice with $10$ each. At each play they
both stake $£1$ and each of them throws a fair cubical die. If
player $A$ has a higher score than player $B$ he wins, otherwise
he loses. Player $B$ says that if player $A$ gets down to his last
$£5$ he will give him a chance by changing the game to one of
tossing a fair coin until one of the players us ruined. In this
game $A$ wins if the coin lands heads and $B$ wins if it lands
tails again with $£1$ stake.
Calculate the probability that player $A$ will eventually be
ruined.
\vspace{.25in}
{\bf Answer}
We argue conditionally on the result of the first play to obtain
$q_z=pq_{z+1}+qp_{z-1}$ where $q=1-p$
The auxiliary equation is
$$p\lambda^2-\lambda+q=0$$
i.e., $(p\lambda-q)(\lambda-1)$ since $p+q=1$.
so $\lambda=\df{q}{p}\ \ \lambda=1.$
We have unequal roots of $q \ne p$.
Then $q_z=A+B\left(\df{q}{p}\right)^z$\ \ \ for $0