Wait time in queue for 2 server system (exponential process)

267 Views Asked by At

A customer has to be server 1 before being served by server 2. Service times are exponential with rates $\mu_1$ and $\mu_2$ respectively. After being done at server 1, you wait at that station till server 2 is free (thereby blocking server 1 for any new customers). Suppose initially you have once customer each at 1 and 2 being served. A new customer arrives and sees this. What is his expected wait time before being able to go to server 1?

I saw a solution to this problem where: $E[W_1] = 1/\mu_1 +$ expected additional time conditioned on whether 2 is still busy when server 1 is done. I don't see why we can use $1/\mu_1$. I think that bit is wrong.

But I was thinking along this line for the answer: Condition based on who finishes first - 1 or 2. So the answer according to me is

$(1/(\mu_1 + \mu_2) + 1/\mu_2)(\mu_1/(\mu_1 + \mu_2))$ + $(1/(\mu_1 + \mu_2) + 1/\mu_1)(\mu_2/(\mu_1 + \mu_2))$

Even if the first solution is not wrong, I don't see why my solution is wrong. Do you see where I have gone wrong (if I have)?

1

There are 1 best solutions below

0
On

Let $T_n$ be the service time at the $n^{\mathsf{th}}$ station and $D$ the delay of the new customer. Then \begin{align} \mathbb E[D] &= \mathbb E[D\mid T_1<T_2]\mathbb P(T_1<T_2) + \mathbb E[D\mid T_1>T_2]\mathbb P(T_1>T_2)\\ &= \mathbb E[T_1]\mathbb P(T_1<T_2) + \mathbb E[T_1+T_2]\mathbb P(T_1>T_2)\\ &= \frac1{\mu_1}\left(\frac{\mu_1}{\mu_1+\mu_2}\right) + \left(\frac1\mu_1+\frac1\mu_2\right)\left(\frac{\mu_2}{\mu_1+\mu_2}\right)\\ &= \frac1{\mu_1}+\frac1{\mu_1+\mu_2}. \end{align}