I am trying to understand the applications of exponential waiting times when there are two queues.
Let there be two counters in a mall, the first counter $X$ (where the order is placed), and the second counter $Y$ (where the item is collected). When a customer arrives, they first go to counter $X$ to order, and then go to counter $Y$ to collect the item.
Also, serving times at each counter are independent and Exponential, with parameter $λ1$ at counter $X$, and parameter $λ2$ at counter $Y$.
If someone is already being served at a counter, the next customer waits in a queue.
For simplicity, I start with the following. I assume that when I arrive, there is one customer at counter $X$, and no customer at counter $Y$ $($i. e., counter $Y$ is free when I arrive$)$. How can I calculate the expected time I have to wait before collecting my order?
I have worked out the following:
$E($time I have to wait to collect my order$)$
= $E($time taken to serve the previous customer who's at counter $X$ when I arrive$)$ $+$ $E[$max $($$Tx$, $Ty$$)$$]$ $+$ $E($time taken to serve me at counter $Y$$)$
= $E(Tx)$ $+$ $(1/$$λ1$$)$ $+$ $(1/$$λ2$$)$ $-$ $(1/$$($$λ1$ + $λ2$$)$$)$ $+$ $E(Ty)$
The $2$nd, $3$rd and $4$th terms in the above sum are what I get for $E[$max $($$Tx$, $Ty$$)$$]$. I am using the $E[$max $($$Tx$, $Ty$$)$$]$ because, when the previous customer is finished being served at counter $X$, the previous customer goes to counter $Y$, and I will start being served at counter $X$.
So here, there are 2 possibilities: $Tx$ > $Ty$, OR $Ty$ > $Tx$
$Tx$ ~ Exponential $($$λ1$$)$ and $Ty$ ~ Exponential $($$λ2$$)$.
Am I on the right track here? Or have I missed something or not understanding it correctly?
Any insights are most appreciated. Thank you so much!
For this particular question, there are some shortcuts using the memoryless property of exponential distributions.
Add these up: $\frac{2}{\lambda_1}+\frac{\lambda_1}{\lambda_2(\lambda_1+\lambda_2)} + \frac{1}{\lambda_2}$