\problemdata      
        {?} % latex-friendly label for the prob.
        {Random Walks} % The topic(s) of the problem content.
        {?} % Source (if known)
        {Fall 2001, final} % Usage (list ones you are aware of).
        {Christos Kapoutsis, S02} % Last revision info (author, date).



\begin{problem}
We consider the gambler's ruin game, where there is some fixed
probability, $p$, that the gambler will win each individual 1-dollar bet,
and the gambler has some fixed goal of $T$ dollars.

Let $e(n)$ be the expected \emph{number of bets} the gambler must make
until the game ends, where $n \leq T$ is his initial capital, \ie the number
of dollars he starts with.  Then the function $e$ satisfies a linear
recurrence of the form
\[
e(n) = a \cdot e(n+1) + b \cdot e(n-1) + c.
\]
for constants $a,b,c \in \reals$.
\begin{problemparts}

\problempart 
What are a\brule{0.5in}, b\brule{0.5in}, c\brule{0.5in}?

\solution{$a=p, b=1-p , c = 1$}

\problempart 
What are $e(0)$ \brule{0.5in} and $e(T)$ \brule{0.5in}?

\solution{$0,0$.}
\end{problemparts}
\end{problem}
