Jill takes an exponentially distributed amount of time with mean $30$ minutes to clean the kitchen.
Kelly takes an exponentially distributed amount of time with mean $40$ minutes to clean the bathroom.
The first one to complete their task will go outside and start raking leaves, a task that takes an exponentially distributed amount of time with a mean of one hour.
When the second person is done inside, they will help the other and raking will be done at rate $2$. (Of course the other person may already be done raking in which case the chores are done.)
What is the expected time until the chores are all done?
I use the following matlab code to evalute the answer numerically, but I have no idea how to solve it analytically.
n=10000;
S=zeros(n,1);
x1=exprnd(30/60,n,1);
x2=exprnd(40/60,n,1);
x3=exprnd(60/60,n,1);
x4=exprnd(30/60,n,1);
x_max=max(x1,x2);
x_min=min(x1,x2);
for i=1:n
if x_max(i,1)+x3(i,1)>x_max(i,1)
S(i,1)=x_max(i,1)+x4(i,1);
else
S(i,1)=x_max(i,1);
end
end
avg_S=sum(S)/n
Hint: This can be treated as a continuous-time Markov chain with nodes labelled by the set of tasks that have been finished. You can write a system of equations for the expected time from each node to the terminal node, conditioning on the next task to be completed.