\documentclass[a4paper,12pt]{article}
\newcommand{\ds}{\displaystyle}
\newcommand{\pl}{\partial}
\parindent=0pt
\begin{document}


{\bf Question}

In a single server queue, the time taken to serve a customer is
exponentially distributed.  New customers are discouraged by the
sight of a long queue.  If the queue size, including the customer
being served, is $n$ at time $t$, the probability of a new
customer joining the queue in the time interval $(t, t + \delta
t]$ is $$\frac{\alpha}{n+1} \delta t + o(\delta t),$$ for some
constant $\alpha > 0$.  The probability of more than one customer
joining the queue in this time interval is $o(\delta t)$.

Obtain the forward differential equations for the probability that
the queue size is $j$ after time $t.$  Show that the equilibrium
distribution of the process is a Poission distribution and find
the proportion of time that the queue is empty.


\vspace{.25in}

{\bf Answer}

If the queue size $N(t) = n \not= 0$ then the queue length changes
in $(t, t+ \delta t]$ by \begin{eqnarray*} + 1 & {\rm with\
probability} & \frac{\alpha}{n+1} \delta t + o(\delta t) \\ - 1 &
{\rm with\ probability} & \mu \delta t + o(\delta t) \\ 0 & {\rm
with\ probability} & \left( 1 - \left(\frac{\alpha}{n+1}+ \mu
\right) \delta t \right) + o(\delta t) \end{eqnarray*}

If $N(t) = 0$ then the queue length changes by \begin{eqnarray*} +
1 & {\rm with\ probability} & \alpha \delta t + o(\delta t) \\ 0 &
{\rm with\ probability} & 1 - \alpha \delta t + o(\delta t)
\end{eqnarray*}

Let $p_n(t) = p(N(t) = n))$

$\ds p_0(t + \delta t) = p_0(t)(1 - \alpha \delta t + o(\delta t))
+ p_1(t)(\mu \delta t + o(\delta t))$

giving $\ds p_0'(t) = -\alpha p_0(t) + \mu p_1(t)$

\bigskip
For $n = 1, 2, \ldots$
\begin{eqnarray*} p_n(t + \delta t) & = & p_n\left(1 - \left(
\frac{\alpha}{n+1} + \mu\right) \delta t+ o(\delta t) \right) \\ &
+ & p_{n+1} ( \mu \delta t + o(\delta t)) + p_{n-1}(t)
\left(\frac{\alpha}{n} \delta t+ o(\delta t)\right) \\ {\rm
giving\ \ } p_n'(t) & = & -\left( \frac{\alpha}{n+1} + \mu \right)
p_n(t) + \mu p_{n+1}(t) + \frac{\alpha}{n} p_{n-1}(t)
\end{eqnarray*}
The equilibrium distribution satisfies: \begin{eqnarray*} 0 & = &
-\alpha \pi_0 + \mu \pi_1 \\ 0 & = & -\left( \frac{\alpha}{n+1} +
\mu \right)p_n(t) + \mu \pi_{n+1} + \frac{\alpha}{n}\pi_{n-1}
\end{eqnarray*}
Recursive Solution of equilibrium equations: \begin{eqnarray*} 0 &
= & \alpha \pi_0 + \mu\pi_1 \hspace{.2in} {\rm so \ \ } \pi_1=
\frac{\alpha}{\mu}\pi_0 \\ n=1: \, \, \, \, 0 & = & -\left(
\frac{\alpha}{2} + \mu \right) \pi_1 + \mu \pi_2 + \alpha \pi_0 \\
& = & -\left( \frac{\alpha}{2} + \mu \right)
\frac{\alpha}{\mu}\pi_0 + \mu \pi_2 + \alpha \pi_0 \\ \pi_2 & = &
\left(\frac{\alpha}{\mu}\right)^2 \frac{1}{2} \pi_0 \\ n = 2: \,
\, \, \, 0 & = & -\left( \frac{\alpha}{3} +\mu\right)\pi_2+
\mu\pi_3 + \frac{\alpha}{2} \pi_1 \\ & = & -\left(\frac{\alpha}{3}
+ \mu \right) \left(\frac{\alpha}{\mu}\right)^2 \frac{1}{2} \pi_0
+ \mu \pi_3 + \frac{\alpha^2}{2\mu} \pi_0 \\ \pi_3 & = & \left(
\frac{\alpha}{\mu} \right)^3 \cdot \frac{1}{3 \cdot 2 }\pi_0 \\
{\rm Inductive\ step} \\ 0 & = & -\left(\frac{\alpha}{n+1} + \mu
\right)\pi_n + \mu \pi_{n+1} + \frac{\alpha}{n}\pi_{n-1} \\ & = &
-\left( \frac{\alpha}{n+1} + \mu \right) \left( \frac{\alpha}{\mu}
\right)^n \cdot \frac{1}{n!} \pi_0 + \mu\pi_{n+1} \\ & & +
\frac{\alpha}{n} \cdot
\left(\frac{\alpha}{\mu}\right)^{n-1}\cdot\frac{1}{(n-1)!}\pi_0 \\
{\rm giving} \\ \pi_{n+1} & = & \left( \frac{\alpha}{\mu}
\right)^{n+1} \cdot \frac{1}{(n+1)!} \pi_0 \end{eqnarray*}

Thus solving recursively gives $$\pi_n =
\frac{\alpha^n}{\mu^nn!}\pi_0$$

We require $\ds \sum \pi_n = 1$ so $\ds\pi_0 =
e^{-\frac{\alpha}{\mu}}$ and $\ds \pi_n = e^{-\frac{\alpha}{\mu}}
\frac{\left(\frac{\alpha}{\mu}\right)^n}{n!}$

i.e.  we have a Poisson distribution with parameter $\ds
{\alpha}/{\mu}$

The proportion of time the queue is empty is $\ds\pi_0 =
e^{-\frac{\alpha}{\mu}}.$



\end{document}
