2 User Queuing Model Probability Problem

822 Views Asked by At

Consider two users who arrive to a system with exponential arrival times with parameters $\lambda_a$ and $\lambda_b$. Once they arrive, the users stay in the system for an exponentially distributed time (parameters $\mu_a$ $\mu_b$) before leaving. The four exponential RVs are independent. What is the probability that A arrives before B AND leaves after B.

Letting $T_a$, $T_b$ denote the arrival times of each, and $S_a$, $S_b$ denote the service times. This probability is then $Pr(T_a < T_b \cap T_a + S_a > T_b + S_b)$ We can solve this by conditioning but it gets quite messy, is there a simpler way to tackle this? Perhaps something involving the memoryless property of the exponential distribution?

1

There are 1 best solutions below

6
On BEST ANSWER

There are three exponential time 'contests', and each is independent of the others.

First, A must arrive before B. Second (no memory), B must arrive before A finishes being served. Third (no memory), B must finish service before A finishes service.

Thus, the desired probability is the product of three ratios: $$\frac{\lambda_a}{\lambda_a + \lambda_b} \frac{\lambda_b}{\mu_a + \lambda_b} \frac{\mu_b}{\mu_a + \mu_b}.$$

For example, if both arrival rates are 1 and both service rates are 2, then the result is $(1/2)(1/3)(1/2) = 1/12.$

The following brief simulation in R illustrates to about three-place accuracy:

 ta = rexp(10^6, 1);  tb = rexp(10^6, 1)
 sa = rexp(10^6, 2);  sb = rexp(10^6, 2)
 mean(ta < tb & ta+sa > tb+sb)
 ## 0.082959