\documentclass[a4paper,12pt]{article}
\newcommand{\ds}{\displaystyle}
\newcommand{\pl}{\partial}
\parindent=0pt
\begin{document}
{\bf Question}
A random walk has the infinite set \{0, 1, 2, ...\} as possible
states. State 0 is a partially reflecting barrier. If state 0 is
occupied at step n then states 0 and 1 are equally likely to be
occupied at step n+1 of the random walk. For all other states,
transitions of +1, -1, 0 take place with the probabilities $p,$
$q,$ $1-p-q$ respectively. Let $\ds p_{j,k}^{(n)}$ denote the
probability that the random walk is in state $k$ at step $n$,
having started in state $j$. Derive the difference equation
$$p_{j,k}^{(n)} = p \cdot p_{j,k-1}^{(n-1)} + q \cdot
p_{j,k+1)}^{(n-1)} + (1-p-q) \cdot p_{j,k}^{(n-1)} \, \, \, (k
\geq 2)$$ giving clear explanation of the reasoning leading to the
equation. Write down analogous equations for $k=0$ and $k=1$. The
long-term equilibrium distribution is given by $$ \pi_k = \lim_{n
\to \infty}p_{j,k}^{(n)} \hspace{.5in} (j = 0, 1, 2,...)$$ when
these limits exist. Obtain a set of difference equations for
$(\pi_k).$ Solve these equations, recursively or otherwise,
showing that if $p \geq q$ there is no solution, and finding
explicit expressions for $\pi_k$ in the case $p