\documentclass[a4paper,12pt]{article}
\newcommand{\ds}{\displaystyle}
\newcommand{\pl}{\partial}
\newcommand{\df}{\ds\frac}
\parindent=0pt
\begin{document}


{\bf Question}

In a single server queue, the time taken to serve a customer is
exponentially distributed with constant parameter $\mu$ and is
independent of the arrival of new customers. New customers are
discouraged from joining the queue by the length of the queue. If
the queue size including the customer being serves, if any, is $n$
at time $t$, the probability of a new customer joining the queue
in the time interval $[t,\ t+\delta t]$ is

$$\df{\alpha}{n+1}\delta t+o(\delta t),$$

where $\alpha$ is a positive constant. The probability of more
than one customer joining the queue in this time interval is
$o(\delta t)$. Show that, if $n>0$, the queue size changes in
$(t,\ t+\delta t]$ by $+1,\ -1$ or 0 with respective
probabilities,

$\begin{array}{rcl} \df{\alpha}{n+1}\delta t & + & o(\delta t),\\
\mu\delta t & + & o(\delta t),\\ \rm{and}\ \ \ \ \ \ \
1-\left(\df{\alpha}{n+1}+\mu\right)\delta t & + & o(\delta t).
\end{array}$

Obtain the corresponding probabilities when $n=0$.

By considering the forward differential equations, or otherwise,
show that the equilibrium equations are

$$-\alpha w_0+\mu w_1=0,$$

$$-\left(\df{\alpha}{n+1}+\mu\right)+\df{\alpha}{n}w_{n-1}+\mu
w_{n+1}=0\ \ n=1,2,\cdots .$$

Hence obtain the equilibrium distribution.

For what proportion of a long time period is the server busy?

\vspace{.25in}

{\bf Answer}

Since the time taken to serve a customer is exponentially
distributed with parameter $\mu$, the probability of a customer
service being completed in a time interval $\delta t$ is
$\mu\delta t+o(\delta t)$.

If the queue size at time $t$ is $n>0$:

P(increase by 1)=P(1 new customer)P(no departures)

$=\left(\df{\alpha}{n+1}\delta t+o(\delta
t)\right)\left(1-\mu\delta t+o(\delta
t)\right)=\df{\alpha}{n+1}\delta t+o(\delta t)$

${}$

P(decrease by 1)=P(no new customer)P(one departure)

$=\left(1-\df{\alpha}{n+1}\delta t+o(\delta
t)\right)\left(\mu\delta t+o(\delta t)\right)=\mu\delta t+o(\delta
t)$

${}$

P(no change)=P(no new customer)P(no departure)

\hspace{.98in} +P(1 new customer)P(one departure)

$=\left(1-\df{\alpha}{n+1}\delta t+o(\delta
t)\right)\left(1-\mu\delta t+o(\delta t)\right)$

$+\left(\df{\alpha}{n+1}\delta t+o(\delta t)\right)\left(\mu\delta
t+o(\delta t)\right)=1-\left(\df{\alpha}{n+1}+\mu\right)\delta
t+o(\delta t)$

When $n=0$

P(increase by 1)=$\alpha\delta t+o(\delta t)$

P(no change)=$1-\alpha\delta t+o(\delta t)$

${}$

For $n=0$???

$p_0(t+\delta t)=(\mu \delta t+o(\delta t))p_1(t)+(1-\alpha\delta
t+o(\delta t))p_0(t)$

so $p_0'(t)=\mu p_1(t)-\alpha p_0(t)$.

For $n>0$

$\begin{array}{rcl} p_n(t+\delta t) & = &
\left(\df{\alpha}{n}\delta t+o(\delta
t)\right)p_{n-1}(t)+(\mu\delta t+o(\delta t))p_{n+1}(t)\\ & & +
\left(1-\left(\df{\alpha}{n+1}+\mu\right)\delta t+o(\delta
t)\right)p_n(t). \end{array}$

so $p_n'(t)=\df{\alpha}{n}p_{n-1}(t)+\mu
p_{n+1}(t)-\left(\df{\alpha}{n+1}+\mu\right)p_n(t)$

Now if $\pi_n=\lim_{t \to\infty}p_n(t)$ we have

$0=\mu\pi+1-\alpha \pi_0$

$0=\df{\alpha}{n}\pi_{n-1}+\mu\pi_{n+1}-\left(\df{\alpha}{n+1}+\mu\right)\pi_n$

i.e.
$\pi_{n+1}-\df{\alpha}{\mu}\df{1}{n+1}\pi_n=\pi_n-\df{\alpha}{\mu}\df{1}{n}\pi_{n-1}$

and $\pi_1-\df{\alpha}{\mu}\pi_0=0$.

Thus by induction $\pi_{n+1}-\df{\alpha}{\mu}\df{1}{n+1}\pi_n=0$.

Thus
$\pi_{n+1}=\df{1}{(n+1)!}\left(\df{\alpha}{\mu}\right)^{n+1}\pi_0$

Mow $\ds\sum \pi_n=1$

so $1-\pi_0\ds\sum_{n=0}^\infty
\df{1}{n!}\left(\df{\alpha}{\mu}\right)^n=\pi_0e^{\frac{\alpha}{\mu}}$

so $\pi_n=\df{(\frac{\alpha}{\mu})^n}{n!}e^{-\frac{\alpha}{\mu}}$

i.e. the equilibrium distribution is Poisson with parameter
$\df{\alpha}{\mu}$.

The proportion of time the server is busy is

$$1-\pi_0=1-e^{-\frac{\alpha}{\mu}}$$

\end{document}
