\documentclass[a4paper,12pt]{article}
\newcommand{\ds}{\displaystyle}
\newcommand{\pl}{\partial}
\parindent=0pt
\begin{document}
{\bf Question}
A simple random random walk has the set $\{0,\ 1,\ 2,\ cdots,\
a-1,\ 1\}$ as possible states. States 0 and $a$ are reflecting
barriers from which reflection is certain, i.e., if the random
walk is in state 0 or $a$ at step $n$ the it will be in state $1$
or state $a-1$ respectively at step $n+1$. For all other states,
transitions of $+1,\ -1,\ 0$ take place with non-zero
probabilities $p,\ q,\ 1-p-q$ respectively.
${}$
Let $p_{j,\ k}^{(n)}$ denote the probability that the random walk
is in state $k$ at step $n$, having started in state $j$. Obtain
difference equations relating these probabilities, for the cases
$k=0,\ 1,\ a,\ a-1$ and $1