\documentclass[a4paper,12pt]{article}

\begin{document}

\parindent=0pt

QUESTION

\begin{description}

\item[(a)]
Consider the M/M/$1$/$n-2$ queue where $n \ge 2$. Let $p_i$ be the
steady state probability that there are $i$ customers in the
system. It is known that $$ p_{i+1} = {{\lambda}\over{\mu}} p_i
\quad {\rm for} \ i=0,1,2,\ldots,n-2. $$ Here, $\lambda^{-1}$ is
the mean inter-arrival time, and $\mu^{-1}$ is the mean service
time.

\begin{description}

\item[(i)] Show that $$ p_i = {{(1-\rho)\rho^i}\over{1-\rho^n}}, \quad
i=0,1,2,\ldots, n-1. $$ Here, $\rho = \lambda/\mu$.

\item[(ii)]
Find the expected number of customers in the system in terms of
$\rho$ and $n$.

\item[(iii)]
Let $L$ and $W$ be the expected number of customers and the
expected waiting time of customers in the system, respectively.
Write down an expression which demonstrates Little's queueing
formula.


\item[(iv)]
Supposing that $\lambda/\mu <1$, show that the expected waiting
time of a customer in the system is $(\mu-\lambda)^{-1}$ as $n \to
\infty$.

\end{description}

A repairman is to be hired to repair machines which break down at
random at an average rate of $3$ per day. Non-productive time on
any machine costs the firm \pounds100 per day. The firm can hire a
slow cheap man charging \pounds50 per day who can repair $4$
machines per day on average. Alternatively, the firm can hire a
fast expensive man charging \pounds100 per day who can repair $6$
machines per day on average. In either case, service times are
exponentially distributed. Calculate the expected operation cost
in both cases, and determine which repairman is more economical to
hire.

\end{description}

ANSWER

\begin{description}

\item[(a)]

\begin{description}

\item[(i)]
From $p_{i+1}=\left(\frac{\lambda}{\mu}\right)p_i$ we have
$p_i=\rho^ip_0$. Since $\sum_{i=0}^{n-1}p_i=1$, we have

$$p_0=\frac{1-\rho}{1-\rho^n}$$

\item[(ii)]
The expected number of customers in the system is given by

\begin{eqnarray*}
L&=&\sum_{i=0}^{n-1}ip_i\\ &=&\sum_{i=1}^{n-1}ip_0\rho^i\\
&=&\frac{\rho-n\rho^n-(n-1)\rho^{n+1}}{(1-\rho)(1-\rho^n)}
\end{eqnarray*}

\item[(iii)]
$L=\lambda W$ where $L$ is the expected number of customers in the
system and $W$ is the expected waiting time for the customers.

\item[(iv)]
$$L=\lim_{n\to\infty}\frac{\rho-n\rho^n-(n-1)\rho^{n+1}}{(1-\rho)(1-\rho^n)}=\frac{\rho}{1-\rho}.$$

Therefore as $n\to\infty$ we have

$$W=\frac{L}{\lambda}=\frac{1}{\mu(1-\rho)}=\frac{1}{(\mu-\lambda)}.$$

\end{description}

\item[(b)]
One may regard the problem as an $M/M/1/\infty$ queuing problem
with the customers being the broken machines.

In the case of slower repairman, $\lambda=3$ and $\mu=4$,
therefore $\rho=0.75$ and the expected number of broken machines
in the system will be $\frac{\rho}{1-\rho}$. Therefore we have
$\frac{\rho}{1-\rho}=3$. Thus the operating cost will be

$$3\times100+50=350.$$

In the case of the faster repairman, $\lambda=3$ and $\mu=6$,
therefore $\rho=0.5$ and the expected number of broken machines in
the system will be $\frac{\rho}{1-\rho}=1$. Thus the operating
cost will be

$$1\times100+100=200.$$

Hence it is more economical to employ the faster repairman.

\end{description}





\end{document}
