\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<k<a-1$.

${}$

Assuming that there is a long-term equilibrium probability
distribution $(\pi_k)$, where

$$\pi_k=\lim_{n\to\infty} p_{j,\ k}^{(n)}\ \rm{for}\ 0 \leq j \leq
a,$$

use the difference equations derived to obtain difference
equations of $\pi_k$. Solve these equations recursively, or
other-wise, to obtain explicit formulae for $\pi_k$ in terms of
$p,\ q$ and $a$.



\vspace{.25in}

{\bf Answer}

${}$

$\begin{array}{rcl} p_{j,\ 0}^{(n)} & = & q\cdot p_{j,\
1}^{(n-1)}\\ p_{j,\ 1}^{(n)} & = & p_{j,\ 0}^{(n-1)}+q\cdot p_{j,\
2}^{(n-1)}+(1-p-q)p_{j,\ 1}^{(n-1)}\\ p_{j,\ k}^{(n)} & = & p
\cdot p_{j,\ k-1}^{(n-1)}+q \cdot p_{j,\
k+1}^{(n-1)}+(1-p-q)p_{j,\ k}^{(n-1)}\ \ 1<k<a-1\\ p_{j,\
a-1}^{(n)} & = & p \cdot p_{j,\ a-2}^{(n-1)}+p_{j,\
a}^{(n-1)}+(1-p-q)p_{j,\ a-1}^{(n-1)}\\ p_{j,\ a}^{(n)} & = & p
\cdot p_{j,\ a}^{(n-1)}\end{array}$

Assuming the existence of an equilibrium distribution, taking
limits in the above equations gives:

$$\begin{array}{lclc} \pi_0 & = & q\pi_1 & (1)\\ \pi_1 & = & \pi_0
+q\pi_2+(1-p-q)\pi_1 & (2)\\ p_k & = &
p\pi_{k-1}+q\pi_{k+1}+(1-p-q)\pi_k & (3)\\ \pi_{a-1} & = &
p\pi_{a-2}+\pi_a+(1-p-q)\pi_{a-1} & (4)\\ \pi_a & = & p\pi_{a-1} &
(5)\end{array}$$

Equation $(1)$ gives $\pi_1=\ds \frac{1}{q}\pi_0$.

$(2)$ gives

$\pi_2=\ds \frac{(p+q)}{q}\pi_1-\ds \frac{1}{q}\pi_0=\ds
\frac{(p+q)}{q}\cdot \ds \frac{1}{q}\pi_0-\ds \frac{1}{q}\pi_0=\ds
\frac{1}{q}\left(\ds \frac{p}{q}\right)\pi_0$

$(3)$ gives

$\pi_3=\ds \frac{(p+q)}{q}\pi_2-\ds \frac{p}{q}\pi_1=\ds
\frac{(p+q)}{q}\cdot \ds \frac{1}{q}\cdot\ds \frac{p}{q}\pi_0-\ds
\frac{p}{q}\cdot \ds \frac{1}{q} \pi_0=\ds \frac{1}{q}\left(\ds
\frac{p}{q}\right)^2\pi_0$

Assume $\pi_i=\ds \frac{1}{q}\left(\ds \frac{p}{q}\right)^{i-1}$
for $1 \leq i \leq k$.

$(3)$ gives

$\pi_{k+1}=\ds \frac{p+q}{p}\pi_k-\ds \frac{p}{q}\pi_{k-1}=\ds
\frac{p+q}{q}\cdot\ds \frac{1}{q} \left(\ds
\frac{p}{q}\right)^{i-1}\pi_0-\ds \frac{p}{q}\ds
\frac{1}{q}\left(\ds \frac{p}{q}\right)^{i-2} \pi_0=\ds
\frac{1}{q}\left(\ds \frac{p}{q}\right)^i \pi_0$

so $\pi_k=\ds \frac{1}{q}\left(\ds \frac{p}{q}\right)^{k-1}\pi_0$
for $1 \leq k \leq a-1$.

$(5)$ then gives $\pi_a=p\pi_{a-1}=\left(\ds
\frac{p}{q}\right)^{a-1} \pi_0$

(This is consistent with $(4)$ as expected)

Now $\ds\sum_{k=0}^a \pi_k=1$ and so

$$\pi_0\left(1+\ds \frac{1}{q}\left(1+\ds
\frac{p}{q}+\cdots+\left(\ds \frac{p}{q}\right)^{a-2}\right)
+\left(\ds \frac{p}{q}\right)^{a-1}\right)=1$$

i.e. $\pi_0=\left(1+\ds
\frac{1-(\frac{p}{q})^{a-1}}{q-p}+\left(\ds
\frac{p}{q}\right)^{a-1}\right)^{-1}$

$p \ne q$

which gives the formulae3 for $\pi_k$, as these are in terms of
$\pi_0$ above.



\end{document}
