\documentclass[a4paper,12pt]{article}
\newcommand{\ds}{\displaystyle}
\newcommand{\pl}{\partial}
\parindent=0pt
\begin{document}


{\bf Question}

The waiting list for a particular operation at a hospital consists
of $j$ people.  The consultant performs at most one operation a
day and there is a probability $Q(>\frac{1}{2})$ that he will
operate on a day.  The probability of one new patient being added
to the waiting list on a day is $P,$ and the probability of no new
patient being added is $(1 -P).$  A patient will not have an
operation on the same day he is added to the waiting list.  When
there are $a(>j)$ people on the waiting list the computer goes on
strike and all new patients are directed to a different hospital.
Show that the length of the waiting list can be described as a
simple random walk with two barriers, stating any necessary
assumptions.  Find the probability that the length of the waiting
list reaches $a.$  If $Q = \frac{2}{3}$ and $P = \frac{1}{3}$ find
the expected number of days until a strike occurs.



\vspace{.25in}

{\bf Answer}

Let $X_n=$ length of waiting list at day $n$

Let $Z_n=$ change in waiting list on day $n$



Then $X_0 = j$ and $X_n = X_{n-1} + Z_n\ \  n = 1,2,3,\ldots$

Assume that the decision to perform operation is independent of
whether a new patient is added.

Then $Z_n = \left\{ \begin{array}{ll} 1 & {\rm with\ probabiltiy\
}P (1-Q) = p \\ -1 & {\rm with\ probability\ } (1-P)Q = q \\ 0 &
{\rm with\ probability\ } (1-P)(1-Q) + PQ = r
\end{array} \right.$

provided $0 < X_{n+1} < a$

\begin{eqnarray*} Z_n & = & 0 {\rm \ \ with\ probability\ } 1
{\rm when\ } X_{n-1} = a \\ Z_n & = & \left\{ \begin{array}{ll} 1
& {\rm \ \ with\ probability\ }P \\ 0) & {\rm \ \ with\
probability\ }1-P \end{array} \right. {\rm when\ }X_{n-1} = 0
\end{eqnarray*}

Assuming that activities on different days for both surgeon and
patients are independent, the $Z_n's$ are independent and ($X_n$)
is a simple random walk with an absorbing barrier at $a$ and a
reflecting barrier at 0.

Let $\ds q_j = $ probability of absorption at $a$ from a start at
$j$

$\begin{array}{rcl} {\rm Then\ \ \ } q_j & = & pq_{j+1} + q
q_{j-1} + rq_j \hspace{.1in} j = 1, 2, \ldots, a-1 \\ q_a & = & 1
\\ q_0 & = & Pq_1 + (1-P)q_0 \hspace{.1in} {\rm i.e.\ }q_1 = q_0
\end{array}$

The general solution of the difference equation is
\begin{eqnarray*} q_j & = & A \left( \frac{q}{p} \right) ^j
\hspace{.5in} q \not= p \\ q_j & = & A + Bj \hspace{.5in} q = p
\end{eqnarray*}

To find $A$ and $B$

Case I: $p \not= q$

$\ds q_a = 1$ so $A\left( \frac{q}{p} \right)^a + B = 1$

As $ q_1 = q_0$ we get $A + B = A\left( \frac{q}{p} \right) + B
\Rightarrow A = 0 $ therefore $B = 1$

\bigskip

Case II: $p = q$

$\ds q_a = 1$ so $A + Ba = 1$

As $ q_1 = q_0$ we get $A = A + B   \Rightarrow B = 0 $ therefore
$A = 1$

Hence $q_j = 1$ in both cases.  Absorption is certain.

\bigskip

Now let $E_j$ be the expected number of days until absorption.
\begin{eqnarray*} E_j & = & p(1 + E_{j+1}) + q(1 + E_{j-1}) + r(1
+ E_j) \hspace{.3in} j = 1, 2,\ldots, a-1 \\ E_0 & = & 0 \\ E_0 &
= & P(1 + E_1) + (1-P)(1 + E_0) \hspace{.2in} {\rm i.e.\ } 1 =
P(E_0 + E_1) \end{eqnarray*}
The general solution of the
difference equation is $$E_j = A + B \left( \frac{q}{p} \right)^j
- \frac{j}{p-q} \hspace{.2in} {\rm for\ } p \not= q $$

When $Q = \frac{2}{3} $ and $P = \frac{1}{3}$; then $p =
\frac{1}{9} $ and $q = \frac{4}{9}$.  Using these values and the
boundary conditions, gives $$B = -2 \hspace{.2in} {\rm and\ \ }
\hspace{.2in} A = 2 \cdot 4^a - 3a$$ So $$E_j = 2(4^a - 4^j) +
3(j-a)$$



\end{document}
