\documentclass[a4paper,12pt]{article}
\newcommand{\ds}{\displaystyle}
\newcommand{\pl}{\partial}
\parindent=0pt
\begin{document}
{\bf Question}
A fish and chip shop has one server and room for $L$ customers to
queue, including the customer being served. The time taken to
serve a customer is exponentially distributed with parameter
$\mu$, and customers arrive in a Poisson process at a rate
$\frac{\mu}{2}$. A customer joins the queue if he is able to wait
inside the shop, otherwise he buys his food elsewhere. Find the
equilibrium distribution of the queue length and hence obtain the
proportion of customers who go elsewhere.
The owner of the shop carries out improvements to the premises
which enable twice as many customers to wait inside the shop. The
improvements result in a doubling of the rate of arrivals of
customers. What effect does this have on the proportion of
customers lost?
\vspace{.25in}
{\bf Answer}
This is an immigration - emigration process.
Let $X(t)$ = length of queue at time $t,$ including the customer
being served.
\begin{eqnarray*} P(X(t+ \delta t)= n+1 | X(t) = n) & = &
\frac{\mu}{2}\delta t + o(\delta t) \hspace{.2in} n = 0, 1, 2,
\ldots, L-1 \\ P(X(t+ \delta t)= n-1 | X(t) = n) & = & \mu \,
\delta t + o(\delta t) \hspace{.2in} n = 1, 2, \ldots, L \\
P(X(t+ \delta t)= n | X(t) = n) & = & 1 - \frac{3\mu}{2}\delta t +
o(\delta t)\hspace{.2in}n = 1, 2, \ldots, L-1
\\ P(X(t+ \delta t)= 0 | X(t) = 0) & = & 1- \frac{\mu}{2}\delta t
+ o(\delta t) \\ P(X(t+ \delta t)= L | X(t) = L) & = & 1 - \mu \,
\delta t + o(\delta t) \end{eqnarray*}
The forward differential equations can be set up as in the general
theory as follows: \begin{eqnarray*} p_0'(t) & = & -\frac{\mu}{2}
p_0(t) + \mu p_1(t) \\ p_n'(t) & = & \frac{\mu}{2} p_{n-1}(t) -
\frac{3\mu}{2} p_n(t) + \mu p_{n+1}(t) \, \, \, n = 1, 2, ..., L-1
\\ p_L'(t) & = & \frac{\mu}{2}p_{L-1}(t) - \mu p_L(t)
\end{eqnarray*}
The equilibrium distribution must satisfy: \begin{eqnarray*} 0 & =
& -\frac{1}{2} \pi_0 + \pi_1 \\ 0 & = & \frac{1}{2} \pi_{n-1} -
\frac{3}{2} \pi_n + \pi_{n+1}\, \, \, n = 1, 2, ..., L-1
\\0 & = & \frac{1}{2}\pi_{L-1} - \pi_L \end{eqnarray*}
Solving recursively gives $\ds \pi_k = \frac{1}{2} \pi_0 \, \, k =
0, ..., L$
$\ds \sum \pi_k = 1$ gives $\ds \pi_0\left( \frac{1 -
\left(\frac{1}{2} \right)^{L+1}}{1 - \frac{1}{2}} \right) = 1$ so
$\ds \pi_0 = \frac{\frac{1}{2}}{1 - \left( \frac{1}{2}
\right)^{L+1}}$
The proportion of customers who go else where is the proportion of
time the queue is full. i.e. $\ds \pi_L = \frac{1}{(2^{L+1} -
1)}$. After improvements, the equilibrium equations are
\begin{eqnarray*} 0 & = & -\mu \pi_0 + \mu \pi_1 \\ 0 & = & \mu
\pi_{n-1} - 2\mu\pi_n + \mu\pi_{n+1} \, \, n = 1, ..., 2L-1 \\ 0 &
= & \mu \pi_{2L - 1} - \mu \pi_{2L} \end{eqnarray*}
Solving recursively gives $\ds \pi_k = \pi_0 = \frac{1}{2L+1}$. So
the proportion of customers lost is$$\pi_{2L} = \frac{1}{2L+1} >
\frac{1}{2^{L+1} - 1} \, \, \, {\rm for } L \geq 2$$
\end{document}