# Waiting time of two independent processes

Suppose that we have two independent alternating renewal processes such that both alternate between states "0" and "1" independently. The amount of time each of them is in state "1" and state "0" are independent exponential random variables with rates $\lambda_1$ and $\lambda_0$, respectively.

Given that one of them is currently in state "1", what is the waiting time until both are in state "1" (for the first time).

I think we should start like this:

suppose the two processes are $U(t)$ and $V(t)$. At time $0$, $U(t)$ is in state "1" and $V(t)$ in an arbitrary state. Suppose that the time until $U(t)$ leaves state "1" is $\tau$ and the time until $V(t)$ enters state "1" is $s$; the expected waiting time is, $$E[W]=\int_{\tau=0}^{\infty}\int_{s=0}^{\tau}E[W|s<\tau]p(s)p(\tau)dsd\tau+\int_{\tau=0}^{\infty}\int_{s=\tau}^{\infty}E[W|s>\tau]p(s)p(\tau)dsd\tau\\ \int_{\tau=0}^{\infty}\int_{s=0}^{\tau}sp(s)p(\tau)dsd\tau+\int_{\tau=0}^{\infty}\int_{s=\tau}^{\infty}E[W|s>\tau]p(s)p(\tau)dsd\tau$$ I do not know how to continue.

Any help is appreciated!

• What is the probability distribution of the time before a switch to another state? Also, what have you tried yourself so far? – Ragnar Jan 5 '14 at 12:59
• @Ragnar I think the probability distribution of the time between renewals for each process is arbitrary, say $F_1(t)$ and $F_2(t)$. For one process I know how to find the waiting time, but for this I have no idea how to start. – Mah Jan 5 '14 at 13:12
• You really ought to show something personal, you know? Not even the statement of the homework is clear... – Did Jan 5 '14 at 13:14
• @Did I edited the question an added some assumptions that I think would help. – Mah Jan 5 '14 at 13:41
• This is definitely better but still incomplete: reread once again the text of your homework and spot the state the other process starts in. – Did Jan 5 '14 at 13:44

Let $t_{xy}$ denote the mean time before U and V are both in state 1 knowing that, at time $0$, they are in states $x$ and $y$ respectively. Starting from U and V in any pair of states, the mean time before a transition occurs is $s=1/(\lambda_1+\lambda_2)$, then the state which changes is U with probability $p=\lambda_1/(\lambda_1+\lambda_2)$ and is V with probability $1-p$. Thus, $$t_{10}=s+pt_{00},\quad t_{00}=s+pt_{10}+(1-p)t_{01},\quad t_{01}=s+(1-p)t_{00},$$ hence the desired mean time $t_{10}$ is $$t_{10}=\frac{2-p}{1-p}s=\frac1{\lambda_2}+\frac1{\lambda_1+\lambda_2}.$$