Busy times for a M/M/1 queue

415 Views Asked by At

I have an M/M/1 queue with people arriving Poisson with parameter $\lambda$ and a service time exponentially distributed rate $\mu$.

I have been asked to find the average time between the first person arriving at the queue and the queue being empty again.

I let the Expected time for the queue to be empty from there being n people be denoted $E_n$

Thus:

$$ (\lambda + \mu)E_n = 1 + \lambda E_{n+1} + \mu E_{n-1} $$

Solving this gave me

$$ E_n = \frac{n}{\mu-\lambda} + c_1 + c_2 \left(\frac{\mu}{\lambda}\right)^n $$

And substituting $E_0=0$ in told me $c_1=-c_2$.

But this still leaves me with:

$$ E_n = \frac{c_2\left(\left(\frac{\mu}{\lambda}\right)^n -1\right)(\lambda - \mu) - n }{\lambda - \mu} $$

How should I work out what $c_2$ is?

2

There are 2 best solutions below

0
On BEST ANSWER

If the system is in state $n$, then it moves to state $0$ by successively moving through states $n-1,\;n-2,\;\ldots,\;0$.

The mean time for each of these transitions equals $E_1$ since we have the same birth and death rates at all states greater than $0$. The sum of them equals $E_n$, so we have $E_n = nE_1$. That is, $E_n$ is $n$ times some constant ($E_1$). Given

$$E_n = \dfrac{n}{\mu-\lambda} + c_1 + c_2\left(\dfrac{\mu}{\lambda}\right)^n$$

the only possibility is to have $c_1=c_2=0$. This gives the solution

$$E_n = \dfrac{n}{\mu-\lambda}.$$

Hence the required answer is

$$E_1 = \dfrac{1}{\mu-\lambda}.$$

0
On

Let $Z(t)$ be the number of customers in the system at time $t$ and $T_n$ the arrival times. Then the times at which $Z(t)$ jumps from $0$ to $1$ and from $1$ to $0$ form an alternating renewal process, and the renewal reward theorem yields that $$\lim_{t\to\infty}Z(t) = \frac{\mathbb E[BP]}{\mathbb E[BP]+E[IP]}. $$ Since the server is idle iff there are no customers in the system, $\mathbb E[IP]=\frac1\lambda$, and the above limit is equal to the utilization $\rho=\lambda\mu$. It follows that $$ \frac{\mathbb E[BP]}{\mathbb E[BP]+\frac1\lambda}=\rho$$ and hence $$\mathbb E[BP] = \frac1{\mu(1-\rho)}=\frac1{\mu-\lambda}. $$