# Probability question using no-memory property of exponential distribution

A customer must be served first by server 1, then by server 2, and finally by server 3. The amount of time required for service by server i is an exponential random variable with rate µi , for i = 1, 2, 3. Suppose you enter the system when it contains a single customer who is being served by server 3.

Find the expected amount of time that you spend in the system. (Whenever you encounter a busy server, you must wait for the service in progress to end before you can enter service.)

Attempt: $1/\mu_1+1/\mu_2+1\mu_3 \frac{\mu_1}{\mu_1+\mu_2} \frac{\mu_2}{\mu_2+\mu_3)}1/\mu_3$

Let $T$ be the amount of time you take to clear the system; $T_n$ be the amount of time you spend in an empty cue $n$; and $S_3$ be the amount of time the other customer spends in cue 3.   Clearly the critical issue is whether the other customer has cleared the cue 3 by the time you reach it.
\begin{align}\mathsf E[T] =~& \mathsf E[~\max(S_3, T_1+T_2)~]+ \mathsf E[~T_3~] \\[1ex] = ~& \mathsf E[~\max(S_3, T_1+T_2)~]+ \dfrac 1{\mu_3} \\[1ex] \ddots & \end{align}
Now \begin{align} \mathsf E[~\max(S_3,T_1+T_2)~] ~=~& \int_0^\infty \left(t\int_0^t f_{S_3}(s)\operatorname d s+\int_t^\infty sf_{S_3}(s)\operatorname d s \right) f_{T_1+T_2}(t)\operatorname d t \\ =~& \int_0^\infty \left(t\int_0^t \mu_3\mathsf e^{-\mu_3s}\operatorname d s+\int_t^\infty s\mu_3\mathsf e^{-\mu_3s}\operatorname d s \right) f_{T_1+T_2}(t)\operatorname d t \\ =~& \int_0^\infty \left(t(1-\mathsf e^{-\mu_3 t})+\frac{1+\mu_3t}{\mu_3}\mathsf e^{-\mu_3 t}+t \right) f_{T_1+T_2}(t)\operatorname d t \\ =~& \int_0^\infty \left(\tfrac 1{\mu_3}\mathsf e^{-\mu_3 t}+t \right) f_{T_1+T_2}(t)\operatorname d t \end{align}
• Sorry, I have thought it for a while, and I couldn't come up with answer to the $max(S3, T1+T2)$ term – randy Apr 12 '16 at 6:32