Probability of intersecting paths on loop under random starting condition

Jim leaves his house at noon and walks at a constant rate of 4 miles per hour along a 4 mile loop (returning to his house at 1 PM). At a randomly chosen time, uniform between noon and 1 PM, Sally chooses a random location (uniform along Jim’s route) and begins running at a constant rate of 7 miles per hour along the route in the same direction that Jim is walking until she completes one 4-mile circuit of the route.

The probability that Sally runs past Jim while he is walking is given by $$m/n$$, where $$m$$ and $$n$$ are relatively prime integers.

Find $$m + n$$.

I find this problem interesting because of the condition that Sally completes just a single loop and cannot continue, even if it would allow her to catch Jim. This makes finding the appropriate starting conditions a bit tricky. Moreover, it is surprising to me that the answer will be the ratio of two primes. This is certainly not obvious from the problem statement.

• Welcome to Math.SE. Can you please add to your post what you did while trying to solve your problem and the specific problem you faced? By the way, which are the distribution of the probabilities? – Ertxiem - reinstate Monica Apr 4 at 21:45
• What does "square" have to do with anything? – David G. Stork Apr 4 at 23:31
• @ David G Stork "Square" is just one description of a circuit. The point is it's a closed loop which has everything to do with determining starting positions for Sally to catch Jim. – Phil H Apr 4 at 23:41
• So delete every reference to the confusing "square." – David G. Stork Apr 4 at 23:50
• I made some small edits which change the voice of the question a little (rather than asserting that the problem is interesting, I think is better to say that you think that the problem is interesting). I also voted to reopen---in its current state, the question seems to meet the site guidelines. – Xander Henderson Apr 5 at 20:56

4 Answers

Jim's trajectory is in blue. If and only if Sally starts anywhere in the shaded regions, she will catch Jim.

Note to all: be careful to include the fact that Sally can run just once around the loop... she cannot go farther, even if it would allow her to catch Jim!

Of course negative distances are simply measured backward from Jim's house.

The shaded area is the sum of two triangles:

$$A = \underbrace{\frac{1}{2} \cdot \frac{12}{7} \cdot \frac{3}{7}}_{orange} + \underbrace{\frac{1}{2} \cdot \frac{3}{7} \cdot 4}_{blue}$$

and the total possible area is $$1 \cdot 4 = 4$$, so the ratio is $$15/49$$ and thus the sum is $$64$$.

Note this is the same answer as David K:

$$\int\limits_{t=0}^1 \int\limits_{D=0}^{Min[3 t, 12/7]} 1\ dt\ dD = \frac{15}{49}$$

• So what would the final answer be? I am getting 2/5 which equals 7. – Rohit Dasanoor Apr 5 at 1:04
• @RohitDasanoor: Be careful with your calculation. Recall that Sally only runs once around the loop... she cannot go further, even if it would "catch" Jim. – David G. Stork Apr 5 at 1:12
• @DavidK: That's what I thought at first, but it is incorrect. If Sally starts at -3 miles (one mile ahead of Jim), she must stop at +1 miles (having completed a full loop). By that time Jim is well past that point. She does NOT catch Jim in that case! – David G. Stork Apr 5 at 1:14
• Good point! I left that detail out. – David K Apr 5 at 1:16
• Taking into account that Sally will stop after running $4$ miles, I get the same result as this answer. – David K Apr 5 at 1:42

The two end points of this distribution spread over the $$60$$ minute time frame will be $$(0,.75)$$ and $$(60,0)$$ where $$x$$ is the start time of Sally in minutes and $$y$$ the probability of Sally passing Jim. At $$t = 0$$, the probability of Sally passing Jim is the probability of Sally starting no more than $$3$$ miles behind Jim on the course. This gives a position of any $$3$$ miles out of $$4$$ hence $$p = 0.75$$. At $$t = 60$$, it is impossible for Sally to pass Jim hence $$p = 0$$. All you have to do now is determine the shape of the distribution between these two end points (try $$t = 30$$) and integrate to get the overall probability. Convert it to a fraction and you are done.

Revision $$2$$ Edit: Oops, Sally only completes one $$4$$ mile circuit so the revised probability distribution will be:

Revision 3 addition

Another way to look at the probability distribution is to plot p versus starting position of Sally in miles from Jim's house. The significance of $$s = 2 \frac{2}{7}$$ is that it's the furthest distance from Jim's House along the course direction whereby Sally won't pass Jim if she leaves at noon. The area divided by $$4$$ gives the probability.

• That answer is wrong. At 0 min, If Sally started 3 miles behind. She would finish her 4 mile loop before catching up to Jim. – Rohit Dasanoor Apr 5 at 1:06
• It's unfortunate that this answer missed the fact that Sally stops running after $\frac47$ hour. When that detail is fixed it becomes a reasonable approach. (The correct integral is shown now in David G. Stork's answer.) – David K Apr 5 at 1:57
• Oops yes, only one 4 mile circuit completed by Sally. See revised answer with added probability distribution. – Phil H Apr 5 at 16:08
• And the diagram is not carefully or correctly made (e.g., location of $t = 3/7$ and $t=1/2$). – David G. Stork Apr 5 at 20:23
• @David G. Stork Seriously? It's not to scale but this is MS Word graphics. I'll have to replace the t = 1/2 location as it's impossible to get the label in. It's only a check point anyway. – Phil H Apr 5 at 23:21

At the time and place where Sally starts, Jim is $$D$$ miles ahead and will continue walking for $$T$$ hours.

Sally will run for $$\frac47$$ hour. Since she gains $$3$$ miles per hour on Jim, if $$D > \frac{12}{7}$$ she will not pass him before she stops running.

If $$D > 3T$$ then Sally will not pass Jim before he stops walking.

But if $$D < 3T$$ and $$D < \frac{12}{7}$$, Sally will pass Jim. (I'm ignoring the cases $$D = 3T$$ and $$D = \frac{12}{7}$$ because they have zero probability and I don't care to quibble about the definition of "passing" in those cases.)

The joint distribution of $$D$$ and $$T$$ is uniform over the rectangle $$0 \leq D < 4$$ and $$0 \leq T \leq 1.$$ Figure out the fraction of this region that lies under both of the lines $$D < 3T$$ and $$D < \frac{12}{7}$$.

I've edited my answer, correcting the previous wrong solution. Kudos to David G. Stork for the comments that lead me in the right direction.

The position $$j$$ of Jim as a function of time $$\tau \in [0,1]$$ is given by: $$j(\tau) = 4 \tau$$

The position $$s$$ of Sally as a function of time $$\tau \in [t,t+\frac{4}{7}]$$ is: $$s(\tau) = x + 7(\tau - t)$$

They meet when $$j(\tau) = s(\tau)$$, i.e., $$4 \tau = x + 7(\tau - t)$$ $$\tau = \frac{7 t - x}{3}$$ for $$\tau \in [0,1] \cap [t,t+\frac{4}{7}] = [t, \min(1, t+\frac{4}{7})]$$.

If they meet at $$\tau = t$$ we have an upper bound on $$x$$: $$3t = 7t -x$$ $$x = 4t$$

If $$t \geq \frac{3}{7}$$, the lower bound on $$x$$ corresponds to the case in which they meet right when Jim is finishing his course $$\tau = 1$$: $$3 = 7t - x$$ $$x = 7t - 3$$

And if $$t < \frac{3}{7}$$, the lower bound on $$x$$ correspond to the case in which they meet when Sally his finishing her lap $$\tau = t+\frac{4}{7}$$: $$3t + \frac{12}{7} = 7t - x$$ $$x = 4t - \frac{12}{7}$$

So, the integral of the probability density for $$t$$ in $$[0, 1]$$ will be split in two parts: $$\int_0^{\frac{3}{7}} \int_{4t - \frac{12}{7}}^{4t} \frac{1}{4} dx\ dt + \int_{\frac{3}{7}}^1 \int_{7t - 3}^{4t} \frac{1}{4} dx\ dt$$

$$= \frac{1}{4} \left( \int_0^{\frac{3}{7}} \left[ 4t - \left( 4t - \frac{12}{7} \right) \right] dt + \int_{\frac{3}{7}}^1 \left[ 4t - \left( 7t - 3 \right) \right] dt \right)$$

$$= \frac{1}{4} \left( \frac{12}{7} \left[ \frac{3}{7} - 0 \right] + \frac{3}{2} \left[ t \left( 2 - t \right) \right]_{t=\frac{3}{7}}^1 \right)$$

$$= \frac{1}{4} \left( \frac{4\times 3 \times 3}{7 \times 7} + \frac{3}{2} \left[ 1 - \frac{3}{7} \left( 2 - \frac{3}{7} \right) \right] \right)$$

$$= \frac{1}{4} \left( \frac{4\times 3 \times 3}{7 \times 7} + \frac{3}{2} \times \frac{4 \times 4}{7 \times 7} \right)$$

$$\frac{15}{49} \ .$$

Just for fun, I'm adding another way of getting the same result after getting the previous answer.

I will consider the inertial referential co-moving with Jim (i.e., a referential that is moving at constant velocity where Jim is at the origin). In this referential, Sally moves with a (relative) speed of 3 mph.

To get the probability, we have the following two cases:

• If $$t < \frac{3}{7}$$ Sally will be the first to finish her course at time $$t + \frac{4}{7}$$, and she will overtake Jim if she starts at most $$\frac{3 \times 4}{7}$$ miles behind Jim, so, the distance behind Jim has to be $$y \in \left[ -\frac{12}{7}; 0 \right]$$.

• If $$t \geq \frac{3}{7}$$, Jim will finish his lap first, and in order to Sally to be able to overtake him, she has to start at most $$3(1-t)$$ miles behind Jim, so $$y \in [-3(1-t); 0]$$.

Hence, the probability of Sally overtaking Jim is given by:

$$\int_0^{\frac{3}{7}} \int_{-\frac{12}{7}}^{0} \frac{1}{4} dy\ dt + \int_{\frac{3}{7}}^1 \int_{-3(1-t)}^{0} \frac{1}{4} dy\ dt$$

$$= \frac{1}{4} \left( \int_0^{\frac{3}{7}} \frac{3 \times 4}{7} dt + \int_{\frac{3}{7}}^1 3(1-t) dt \right)$$

Let $$u = 1-t$$. Factorizing the $$3$$ and reversing the limits of the second integral we get: $$= \frac{3}{4} \left( \frac{4}{7} \times \frac{3}{7} + \int_{0}^{\frac{4}{7}} u\ du \right)$$

$$= \frac{3}{4} \left( \frac{4 \times 3}{7 \times 7} + \frac{1}{2} \times \left( \frac{4}{7} \right)^2 \right)$$

$$= \frac{3}{4} \times \frac{4}{7^2} \left( 3 + \frac{1}{2} \times 4 \right)$$

Which, as before, gives $$= \frac{15}{49} \ .$$

After looking at this way of solving, the approach is quite similar to the one by Phil H..

• Ertxiem: Why can't $t \in [0, \frac{3}{7}]$? – David G. Stork Apr 5 at 1:25
• Ertxiem: I think your error stems from the fact that you allow Sally to go to $5, 6, \ldots 8$. Also that you do not allow $t \in [0, \frac{3}{7}]$. – David G. Stork Apr 5 at 1:36
• @DavidG.Stork Thank you for your guidance. I've edited my answer and I was able to obtain the same result as everyone else. – Ertxiem - reinstate Monica Apr 6 at 1:51
• Great. Welcome to the club (;. Now all we have to do is get this great question from being [ON HOLD]. – David G. Stork Apr 6 at 1:56