Exponential Distribution: Expected Value waiting in line

I am trying to solve this problem from Ross's Introduction to probability models,

Consider a two-server system in which a customer is served first by server 1, then by server 2, and then departs. The service times at server $$i$$ are exponential random variables with rates $$\mu_i$$ , $$i = 1, 2$$. When you arrive, you find server 1 free and two customers at server 2—customer A in service and customer B waiting in line. Find $$E[T ]$$, where $$T$$ is the time that you spend in the system.

My ideas was to write $$T$$ as $$T = S_1 + S_2$$ where $$S_1, S_2$$ is the waiting time to get served by server 1 and 2 respectively.

Also to calculate $$E(S_2)$$ I though about conditioning on the number of people in line ahead of me at server 2. Thus there can be either 0,1 or 2 people ahead of me at line. I also calculated

$$P(2) = \frac{\mu_1}{\mu_1 + \mu_2}, P(1)=\frac{\mu_1\mu_2}{(\mu_1 + \mu_2)^2},P(0) = \frac{\mu_2^2}{(\mu_1 + \mu_2)^2}$$ thus I get $$E(S_2) = \frac{3}{\mu_2}P(2) + \frac{2}{\mu_2}P(1) + \frac{1}{\mu_2}P(0)$$

However when I combine all this for a final answer of $$E(T)$$ I am not getting the right answer which should be $$E(T) = \frac{1}{\mu_1} + \frac{1}{\mu_2} + \frac{1}{\mu_2}\frac{\mu_1}{\mu_1 + \mu_2} + \frac{1}{\mu_2}\left(\frac{\mu_1}{\mu_1 + \mu_2} + \frac{\mu_2}{\mu_1 + \mu_2}\frac{\mu_1}{\mu_1 + \mu_2}\right)$$

Any help would be appreciated in figuring out where my logic or computation is going wrong, Thanks!

No matter what happens, you must wait at least as long as it takes to pass through server 2.

But first, how long must you wait to reach server 2?

You will either: (1) pass through server one before the both other customers have passed through server 2 (and must wait for them to do so, no matter how early you were) or (2) arrive after that occurs (and so wait no longer than it took to go through server 1).

Thus, the wait time until you reach server two will be maximum from: the time for you to pass through server one, or the time for the other customers to pass through server two.

Let the times the customers pass through server two be $$S_A$$ and $$S_B$$, which will each be independent and identically distributed to $$S_2$$ (and each also independent from $$S_1$$).

\begin{align}\mathsf E(T)&=\mathsf E(\max\{S_1,S_A+S_B\})+\mathsf E(S_2)\\[1ex]&={{\mathsf E((S_A+S_B)\mathbf 1_{ S_1

Hint: What is the distribution of the sum $$S_A+S_B$$?

• $$\max\{X,Y\}=X+Y-\min\{X,Y\}$$ Commented Aug 11, 2020 at 1:27