# Expected wait time of $D/E_2/1$ and $D/M/1$ queues

A company has a choice of hiring one of two individuals to operate its single-channel facility. One man's times were approximately exponentially distributed with a mean rate of $6$/day, while the other man's times were distributed according to an Erlang-2 with a mean rate of $5$/day. Given the arrival rate of 4 per day, which man should be hired?

My thought: For the first man with exponential service time, we see that we would have a $D/M/1$ queue system. So $W_q = \frac{1}{u} \frac{\delta}{1-\delta}$ where $\delta$ is the solution with smallest absolute value to the equation $\delta = e^{-24(1-\delta)}$, and $\delta\in (0,1)$ (since $u = 6$ and $\beta= 4$). But this equation does not have any solution $\delta$.

For the 2nd one, we would have the system $\ D/E_2/1$. But I have no idea how to compute the expected wait time for such system.

• Why do you assume a D/G/1 system? I would assume you would use an M/G/1 queue and apply the PK formula.
– PiE
Commented Mar 14, 2017 at 18:19
• @PMF: thank you for your help. Well, the problem said that the arrival rate is $4$ per day, and it did not indicate that the arrival rate follows Poisson distribution, so how could we assume it follows $M/G/1$ queue? Also, what is the PK formula that you are talking about? Unless the $G$ is indicated specifically, there does not exist a closed-form formula for $W_q$.
– ghjk
Commented Mar 15, 2017 at 18:13
• Typically, with these types of questions, one assumes the arrival process is Poisson by default. A D/G/1-type queue is quite unusual for these types of questions. Also, By the same token, how can you assume the arrival process follows a deterministic distribution? For the M/G/1 queue, using the PK formula, you only need the second moment of the service time distribution to determine mean response times.
– PiE
Commented Mar 15, 2017 at 18:19
• Here is info about the PK formula...en.wikipedia.org/wiki/Pollaczek%E2%80%93Khinchine_formula
– PiE
Commented Mar 15, 2017 at 19:15

HINT: This is a solution sketch...

You will need to fill in the details....

Assume jobs arrive to a"single channel facility" randomly, which we are going to model using an M/G/1 queue. The service distribution or worker 1 is exponentially distributed with rate of 6 per day, while worker 2's service time is Erlangian-2 distributed with rate of 5 per day. Arrivals come to both facilities at a rate of 4 per day.

Thus, the utilization for each of the facilities are:

Worker 1: utilization = $\rho_1$ = 4 / 6.

Worker 2: utilization = $\rho_2$ = 4 / 5.

For Worker 1, the service time is exponentially distributed. Thus to compute the mean response time using the PK formula, we need the 1st and 2nd moments.

Thus, we have

$E[S] = \frac{1}{\mu } = \frac{1}{6 }$

$E[S^2] = \frac{2}{\mu ^2} =\frac{2}{36}$

So, the mean response time $E[R]$ is given by:

$E[R] = E[S] + \frac{\lambda E[S^2]}{2(1-\rho)}$ = $\frac{1}{6} + \frac{4 \frac{2}{36}} {2(1 -\frac{4}{6})} = 1/2$

For Worker 2, the service time is $E_2$ distributed. Thus, for 1st and 2nd moments we have:

$E[S] = \frac{2}{\mu } = \frac{1}{5 }$

$E[S^2] = \frac{6}{\mu ^2} =\frac{3}{50}$

$E[R] = E[S] + \frac{\lambda E[S^2]}{2(1-\rho)} = \frac{4}{5}$

So, we should definitely hire Worker 1 since it takes him 1/2 day to complete the job while Worker 2 requires most of the day (4/5).

• could you please explain where you got the $E(R)$ formula from? It does not look anything like the PK formula, so that's what pondered me till now....
– ghjk
Commented Mar 23, 2017 at 16:58
• There are many variants of the PK formula (but they all give the same answer). Here is one for the waiting time that is similar to the one I used in the answer. The only difference is the PK formula in the paper is the waiting time - NOT the response time. Remember E[R] = E[W] + E[S] (i.e., E[wait] + E[service]) richardclegg.org/previous/networks2/Lecture9_06.pdf
– PiE
Commented Mar 23, 2017 at 18:06