\documentclass{article}
\usepackage{amssymb}
\usepackage{amsmath}
 
\newcommand{\Comment}[1]{}
\newcommand{\ruleOne}[2]{\arraycolsep=14pt\renewcommand{\arraystretch}{1.75}%
\begin{array}[c]{c}#1\\
    \hline\multicolumn{1}{c}{#2}
\end{array}}

\newcommand{\statespace}[1]{\mathcal{#1}} 
\newcommand{\myset}[1]{\{ #1\}}

\begin{document}
\begin{center}
{\bf COURSE 336, PERFORMANCE ANALYSIS, P.G. HARRISON\\
Coursework 5 (Unassessed), 17/02/2006
}
\end{center}

\begin{enumerate}
\item In an M/M/1 queue, assume that customers arrive as a  Poisson  process with
parameter one per  
  $12$ minutes, and that the service time is exponential at rate 
  one service per $8$ minutes.  Calculate the following quantities:
\begin{enumerate} 
\item $L$ the average  number of customers  in the system;
\item $W$ the average amount of time that a customer spends  in the system;
\item $W_{Q}$  the average amount of time a customer spends in the queue, waiting to
start service.
\end{enumerate} 
 If  there are no customers waiting to be served on arrival, what  is the value of the
queueing time random variable?

\item Consider an M/M/1 queue where the jobs' willingness to join the queue is influenced by the queue size.  More precisely, a job which finds $i$ other jobs in the system joins the queue with probability  $1/(i+1)$    and departs immediately otherwise ($i=0,1,\ldots$).  Draw the state diagram for this system with arrival rate $\lambda$ and mean service time $1/\mu$.  Write down and solve the balance equations for the equilibrium probabilities $\pi_i$ and show that a steady-state distribution always exists.  Find the utilisation of the server, the throughput , the average number of jobs in the system and the average reponse time for a job that decides to join.  Note that the form of equilibrium probabilities is the same as that of the M/M/$\infty$ queue.

\item Consider an M/M/$\infty$ queue with discouraged arrivals but with the following birth-and-death coefficients: 
$$ \lambda(i) = \frac{\lambda}{(i+1)^b}~~~\mbox{and }~~~\mu(i)=i^c\mu $$
where $c$ is the ``pressure-coefficient'' -- a constant that indicates the degree to which the service rate of the system is affected by the system state -- and $b$ is the ``discouraging coefficien''.  Obtain the  equilibrium probabilities $\pi_i$ for this birth-and-death process.  What is the equilibrium distribution when $b+c = 1$?


\item  Let $D$ be a random interval between  two 
consecutive departures from an  M/M/$1$ queue 
at equilibrium. If, just  after the first departure,
 the queue was not empty, then  $D$ coincides 
 with the service time of the next job. 
  If the queue was empty, then $D$ consists 
   of the period up to the next arrival, 
   as well as the service time of the next job. Assuming
    that the probability of a non-empty system 
    just after departure is the same as the utilisation, 
    show that $D$ is exponentially distributed with parameter $\lambda$.
\item 
Let $X_1$  and $X_2$ be two independent exponential
 random variables with parameters $\lambda_1$ and $\lambda_2$.  Prove that the random
variable $Z= \min(X_1,X_2)$ is an exponential random variable with  parameter
$\lambda_1 + \lambda_2$. \\
\end{enumerate}

\end{document}

\item ({\bf Assessed}) Consider a barber  shop that consists of two chairs, i.e.
chair$1$ and chair$2$. A customer arrives  and goes initially to chair$1$ where his
beard is shaved, then   he moves to chair$2$ where his hair is cut. The service times
at the  two chairs are assumed to be independent random variables  which are
exponentially distributed  with  parameters $\mu_1$ and $\mu_2$.
 Moreover, assume that the customers arrive  as a  
Poisson process  with rate  $\lambda$,  when and only when both chairs are empty.
\begin{enumerate}
\item  Describe the state space of the system
 and give the rate associated with  each state,  for example by drawing a
  diagram showing the rates.  
\item Derive the one-step probabilities of moving from one state to another.
\item Why is the Markov chain  is irreducible?  Find the steady state
 probabilities  $p_0, p_1, p_2$ corresponding to your states.
\item  Assuming  that $\lambda = \mu_1 = \mu_2$, find the steady state 
 probabilities $p_0, p_1, p_2$.

\end{enumerate}
Now,  suppose we change the system  in the following way: 
 when  a  customer sits in chair$1$ he could decide to leave the shop without
 going for a hair-cut.
 The service time at chair1 in this case is exponentially distributed with 
 parameter  $\delta$.  The customer chooses to have a  hair-cut with probability $u$
and to leave with probability $1-u$. Draw a diagram of the modified system's state
transition graph and calculate the equilibrium probability that the shop is empty when
  $\lambda= 3$,  $\delta = 6$,  $\mu_1 = 8$ and $\mu_2 = 2$.


