'Bee flying between two trains' problem

17.8k Views Asked by At

There is a famous arithmetic question :

Two trains $150$ miles apart are traveling toward each other along the same track. The first train goes $60$ miles per hour; the second train rushes along at 90 miles per hour. A fly is hovering just above the nose of the first train. It buzzes from the first train to the second train, turns around immediately, flies back to the first train, and turns around again. It goes on flying back and forth between the two trains until they collide. If the fly's speed is $120$ miles per hour, how far will it travel?

It is easy to determine the distance travelled by the bee.

But how to determine how many times it touches first/second train?

or

Which train it touches last?

9

There are 9 best solutions below

10
On

That would be infinite.
Both the number of times it touches the trains, and which train it touches last cannot be determined. Read about Zeno's paradox, specifically the tortoise and Achilles.
Here is the link:

2
On

The trains are approaching each other at $150$ miles per hour. Since they are $150$ miles apart, they meet in 1 hour. So the bee flies for 1 hour.

The speed of the bee is given to be $120$ miles an hour, so it travels a total of $120$ miles, because it gets 1 hour to fly before getting squashed.

Also, if the bee is assumed to be a point, it touches both the trains an infinite number of times. The distance travelled can also be calculated by the sum of the infinite series. This is of course assuming that the bee takes 0 time in turning around.

In a similar way, it is impossible to determine which train it last sits on, unless there is a specific amount of time taken in turning around.

20
On

We can prove that the bee touches both trains infinitely many times.

Suppose at some time the bee is at the nose of one train, and it flies to the other train. Then it will arrive at the other train earlier than the two train meets, since its speed is larger than any train.

The process repeats, and thus the bee will touch both trains infinitely many times.

0
On

It will be infinite. You cannot apply the logic that the quantity will be finite as the trains collide in finite amount of time because that would be the case in real world where the bee cannot turn back in infinitesimally small amount of time.

4
On

Okay. In 5/6 an hour the bee has flown 100 miles and the second train has traveled 50 miles. The bee has met the train. The bee has done the first half of the first jag.

The first train has gone 75 miles. The bee turns around to fly toward the train 25 miles away from it. In 25/210 = 5/42 of an hour the bee reaches the first train.

It had taken the bee 5/6 + 5/42 = 20/21 hours to do the first jag. The trains are now 150x1/21 miles apart.

The bee must repeat the jag but only go 1/21 the distance so it takes 1/21 the time. If we add up how long each of these jags were the bee flies from the first to the second train and back and how long it takes the total is

$20/21+20/21*1/21+20/21*(1/2)^2+20/21*(1/21)^3+.... $

An infinite sum.

It adds up to

$20/21 (1+1/21+(1/21)^2+(1/21)^3+...)=$

$20/21 [\frac {1}{1-1/21}]=20/21 [\frac {1}{20/21}]=20/21*21/20=1$ hour.

So the bee flew for 1 hour. Did an infinite number of jags each taking an exponentially shorter period of time that add up to 1 hour and 120 miles.

That's how you do it with math and infinite sums and limits without doing the trick of figuring how long the trains take.

===

Okay. You are probably wondering how I did the infinite sum and got 21/20.

Well. IF the sum $1 + a+a^2+a^3+... $ does add up to something finite then:

$(1-a)(1+a+a^2+....)=$

$(1+a+a^2+...)-(a+a^2+a^3+...)=1$

So $(1+a+a^2+...)=\frac {1}{1-a} $

So $1+1/21+(1/21)^2+(1/21)^3+...=\frac {1}{1-1/21}=21/20$.

=====

Okay, I have to note first time I made a calculation error and thought the first train traveled 90 and not 75 miles in the first half jag. Oddly enough this didn't effect the outcome as the result was still that each jag is proportionally smaller by the factor it took to do the first jag. No matter how badly I do the math, the jags are proportionally smaller by the inverse of the first time, so the sum will always be an hour.

Likewise, I switched which train the bee started at. That likewise makes no difference.

8
On

Here is some graphical intuition for understanding why the bee touches trains infinitely often.

The bee's trajectory in space-time is a zig-zag path which is self-similar; if you zoom in onto successive pairs of turnarounds, you get a copy of the original:

Bee at 120 mph

So the bee touches both trains infinitely often, in a finite amount of time. The duration of time between successive touches gets shorter and shorter.

To make it obvious without needing to zoom, take a faster bee (or slower trains). Here is what happens for a bee 10 times as fast:

Bee at 1200 mph

EDIT. Given the discussion about bees of nonzero length, here's what happens to a 20 mile long bee going at 1200 mph:

20 mi bee at 1200 mph

8
On

The whole sad matter ends with a catastrophic event for the fly, shortly followed by a catastrophic event for the trains.

At the point where the distance between the two trains is less than the length of a fly, the fly cannot turn around and fly back anymore. At the point where the distance is less than the space a fly needs to live, the fly is dead.

The exact time the fly goes in one direction depends on which train it is approaching; the speed the fly approaches that train is either 210 km/h or 180 km/h. So you can calculate what happens during two flights and that will turn into a simple geometric sequence. Which ends after very few iterations with a dead fly.

0
On

Once you accept that the bee touches each train a countable infinity of times, it is important to realize that the question of which train it touches last does not make sense. The bee touches one train on the odd number touches and the other on even touches. You are asking whether the largest natural is odd or even, but there is no largest natural.

3
On

Here we derive some recurrence relations to determine position and times the bee meets one of the trains.

Scenario:

We consider the interval $[0,150]$ on the $x$-axis with train $A$ starting at time $t=0$ at position $x=0$ and train $B$ starting at the same time from $x=150$. Train A moves with $60$ mph towards B whereas train B moves with $90$ mph towards A.

The bee starts at time $t=0$ from $x=0$ towards $B$ with $120$ mph. It meets $B$ the first time at position $B_1$ after time $t_1$. At that time we denote the position of train $A$ with $A_1$. Then it turns around flies back to $A$ and meets $A$ at position $A_2$ after time $t_2$ while the train B is at position $B_2$ at that time. Then the bee turns around again and continues this dangerous game.

We denote the positions of the train A with $A_n$ and the positions of the train B with $B_n$, $n\geq 0$.

Note the bee meets the train $A$ at even positions $A_{2n}$ and it meets the train B at odd positions $B_{2n+1}$. The delta time between $A_{n}$ and $A_{n+1}$ is denoted with $t_{n+1}$ which is the same as the time between $B_{n}$ and $B_{n+1}$. We consider the following sequences

\begin{array}{rlllll} \text{Train A: }&A_0=0,&A_1,&A_2,&\ldots &A_{n},\ldots\\ \text{Train B: }&B_0=150,&B_1,&B_2,&\ldots &B_{n},\ldots\\ \text{Delta times: }&t_0=0,&t_1,&t_2,&\ldots &t_{n},\ldots\\ \text{Bee: }&A_0=0,&B_1,&A_2,&\ldots&B_{2n-1},A_{2n},B_{2n+1},\ldots \end{array}

We show the following is valid for $n\geq 0$

\begin{align*} A_{2n}&=60\left(1-\frac{1}{3^n7^n}\right)\qquad&B_{2n}&=150-90\left(1-\frac{1}{3^n7^n}\right)\\ A_{2n+1}&=60\left(1-\frac{2}{3^n7^{n+1}}\right)\qquad&B_{2n+1}&=150-90\left(1-\frac{2}{3^n7^{n+1}}\right)\\ \\ t_{2n}&=\frac{5}{3^n7^n}\\ t_{2n+1}&=\frac{5}{3^n7^{n+1}} \end{align*}

A first plausibility check shows \begin{align*} \lim_{n\rightarrow \infty}A_{2n}=\lim_{n\rightarrow \infty}A_{2n+1} =\lim_{n\rightarrow \infty}B_{2n}=\lim_{n\rightarrow \infty}B_{2n+1}=60 \end{align*} The trains will meet each other after one hour and since the speed of A is $60$ mph and it started from $x=0$ at $t=0$ its position is at $x=60$ after one hour. The same holds for $B$ since B moves with $90$ mph from $x=150$ and $150 - 90 = 60$.

Recurrence relations:

The bee meets the train A at delta time $t_{2n}$ at position $A_{2n}$ and then flies with $120$ mph towards the train B. We can calculate the next meeting point $B_{2n+1}$ with train B as \begin{align*} A_{2n}+120 t_{2n+1}&=B_{2n}-90 t_{2n+1}\\ t_{2n+1}&=\frac{1}{210}\left(B_{2n}-A_{2n}\right)\tag{1} \end{align*} The positions of A and B after delta time $t_{2n+1}$ are \begin{align*} A_{2n+1}=A_{2n}+60t_{2n+1}=\frac{5}{7}A_{2n}+\frac{2}{7}B_{2n}\tag{2}\\ B_{2n+1}=B_{2n}-90t_{2n+1}=\frac{3}{7}A_{2n}+\frac{4}{7}B_{2n}\tag{3} \end{align*} Similarly the bee meets the train B at odd indexed delta times $t_{2n+1}$ at position $B_{2n+1}$ and then flies with $120$ mph towards train A. We describe the next meeting position $A_{2n+2}$ with train A and obtain \begin{align*} B_{2n+1}-120 t_{2n+2}&=A_{2n+1}+60 t_{2n+2}\\ t_{2n+2}&=\frac{1}{180}\left(B_{2n+1}-A_{2n+1}\right) \end{align*} The positions of A and B after delta time $t_{2n+2}$ are \begin{align*} A_{2n+2}=A_{2n+1}+60t_{2n+2}=\frac{2}{3}A_{2n+1}+\frac{1}{3}B_{2n+1}\tag{4}\\ B_{2n+2}=B_{2n+1}-90t_{2n+2}=\frac{1}{2}A_{2n+1}+\frac{1}{2}B_{2n+1}\tag{5} \end{align*}

From these equation we derive recurrence relations for odd and even $A_n$ in terms of $A_{n-1}$ and $A_{n-2}$ and we do the same for $B_n$.

We obtain from (2) - (5) \begin{align*} A_{2n+2}&=\frac{2}{3}A_{2n+1}+\frac{1}{3}B_{2n+1}\\ &=\frac{2}{3}A_{2n+1}+\frac{1}{3}\left(\frac{3}{7}A_{2n}+\frac{4}{7}B_{2n}\right)\\ &=\frac{2}{3}A_{2n+1}+\frac{1}{7}A_{2n}+\frac{4}{21}\left(\frac{7}{2}A_{2n+1}-\frac{5}{2}A_{2n}\right)\\ &=\frac{4}{3}A_{2n+1}-\frac{1}{3}A_{2n} \end{align*} and \begin{align*} A_{2n+1}&=\frac{5}{7}A_{2n}+\frac{2}{7}B_{2n}=\frac{5}{7}A_{2n}+\frac{2}{7}\left(\frac{1}{2}A_{2n-1}+\frac{1}{2}B_{2n-1}\right)\\ &=\frac{5}{7}A_{2n}+\frac{1}{7}A_{2n-1}+\frac{1}{7}\left(3A_{2n}-2A_{2n-1}\right)\\ &=\frac{8}{7}A_{2n}-\frac{1}{7}A_{2n_1} \end{align*}

In the same way we derive for odd and even $n$ a representation of $B_n$ in terms of $B_{n-1}$ and $B_{n-2}$. \begin{align*} B_{2n+1}&=\frac{8}{7}B_{2n}-\frac{1}{7}B_{2n-1}\\ B_{2n+2}&=\frac{4}{3}B_{2n+1}-\frac{1}{3}B_{2n} \end{align*}

With the help of (1) and (2) we can calculate $A_1$ and obtain a fully specified recurrence relation for $A_n$:

\begin{align*} A_{2n+1}&=\frac{8}{7}A_{2n}-\frac{1}{7}A_{2n-1}\qquad\qquad n\geq 1\tag{6}\\ A_{2n+2}&=\frac{4}{3}A_{2n+1}-\frac{1}{3}A_{2n}\qquad\qquad n\geq 0\tag{7}\\ A_0&=0\\ A_1&=\frac{300}{7} \end{align*}

$$ $$

Generating function for $A_{n}$:

We derive based upon the recurrence relation for $A_n$ a generating function $A(x)$ with \begin{align*} A(x)=\sum_{n= 0}^\infty A_nx^n \end{align*} Since we have according to (6) and (7) to respect even and odd part separately we do it in two steps and consider the even part $(A(x)+A(-x))/2$ and odd part $(A(x)-A(-x))/2$ of the generating function accordingly. We start from (7) and replace for convenience $n$ with $n-1$. We derive from \begin{align*} A_{2n}&=\frac{4}{3}A_{2n+1}-\frac{1}{3}A_{2n}\qquad\qquad n\geq 1\\ \end{align*} the generating function \begin{align*} \sum_{n= 1}^\infty A_{2n}x^{2n}&=\frac{4}{3}\sum_{n= 1}^\infty A_{2n-1}x^{2n}-\frac{1}{3}\sum_{n= 1}^\infty A_{2n-2}x^{2n}\\ \frac{A(x)+A(-x)}{2}-A_0&=\frac{4}{3}x\sum_{n= 0}^\infty A_{2n+1}x^{2n+1}-\frac{1}{3}x^2\sum_{n= 0}^\infty A_{2n}x^{2n}\\ &=\frac{4}{3}x\cdot\frac{A(x)-A(-x)}{2}-\frac{1}{3}x^2\cdot\frac{A(x)+A(-x)}{2} \end{align*} Noting that $A_0=0$ we obtain after some rearrangement \begin{align*} A(x)(x^2-4x+3)+A(-x)(x^2+4x+3)=0\tag{8} \end{align*} Now the odd part (6). We obtain \begin{align*} \sum_{n=1}^\infty A_{2n+1}x^{2n+1}&=\frac{8}{7}\sum_{n= 1}^\infty A_{2n}x^{2n+1}-\frac{1}{7}\sum_{n= 1}^\infty A_{2n-1}x^{2n+1}\\ \frac{A(x)-A(-x)}{2}-A_1x&=\frac{8}{7}x\cdot\frac{A(x)+A(-x)}{2}-\frac{1}{7}x^2\frac{A(x)-A(-x)}{2} \end{align*} with $A_1=\frac{300}{7}$ we obtain \begin{align*} A(x)(x^2-8x+7)-A(-x)(x^2+8x+7)=600x\tag{9} \end{align*}

Combining (8) and (9) we can eliminate $A(-x)$ and obtain after some simplifications and partial fraction decomposition \begin{align*} A(x)&=\frac{300x(x+3)}{(x-1)(x^2-21)}\\ &=\frac{60}{1-x}+180\frac{2x+7}{x^2-21}\\ &=\frac{60}{1-x}+180\left(\frac{2\sqrt{21}-7}{42\left(1+\frac{x}{\sqrt{21}}\right)} -\frac{2\sqrt{21}+7}{42\left(1-\frac{x}{\sqrt{21}}\right)}\right)\\ &=60\sum_{n= 0}^\infty x^n+\frac{30}{7}(2\sqrt{21}-7)\sum_{n= 0}^\infty \left(-\frac{1}{\sqrt{21}}\right)^nx^n\\ &\qquad\qquad\qquad-\frac{30}{7}(2\sqrt{21}+7)\sum_{n= 0}^\infty \left(\frac{1}{\sqrt{21}}\right)^nx^n\\ &=60\sum_{n= 0}^\infty x^n-\frac{60}{7}\sqrt{21}\sum_{n= 0}^\infty \frac{1-(-1)^n}{\left(\sqrt{21}\right)^n}x^n -30\sum_{n=0}^\infty \frac{1+(-1)^n}{\left(\sqrt{21}\right)^n}x^n\\ &=60\sum_{n= 0}^\infty x^n-\frac{120}{7}\sum_{n\geq 0}\frac{1}{21^n}x^{2n+1} -60\sum_{n=0}^\infty \frac{1}{21^n}x^{2n}\\ &=60\left(\sum_{n= 0}^\infty x^n-\sum_{n= 0}^\infty \frac{2}{3^n7^{n+1}}x^{2n+1} -\sum_{n= 0}^\infty \frac{1}{3^n7^n}x^{2n}\right)\tag{10} \end{align*}

We can now easily deduce the coefficients $A_n$ from (10). \begin{align*} A_{2n}&=60\left(1-\frac{1}{3^n7^n}\right)\\ A_{2n+1}&=60\left(1-\frac{2}{3^n7^{n+1}}\right) \end{align*} and the first part of the claim follows. According to (2) we obtain after some rearrangement \begin{align*} B_{2n}&=\frac{7}{2}A_{2n+1}-\frac{5}{2}A_{2n}\\ &=150-90\left(1-\frac{1}{3^n7^n}\right) \end{align*} and we get using (3) \begin{align*} B_{2n+1}&=\frac{3}{7}A_{2n}+\frac{4}{7}B_{2n}\\ &=\frac{3}{7}A_{2n}+2A_{2n+1}-\frac{10}{7}A_{2n}\\ &=2A_{2n+1}-A_{2n}\\ &=150-90\left(1-\frac{2}{3^n7^{n+1}}\right) \end{align*} which is the second part of the claim. Finally we obtain \begin{align*} t_{2n+1}&=\frac{1}{210}\left(B_{2n}-A_{2n}\right)=\frac{5}{3^n7^{n+1}}\tag{11}\\ t_{2n}&=\frac{1}{180}\left(B_{2n-1}-A_{2n-1}\right)=\frac{5}{3^{n}7^{n}} \end{align*} showing the last part of the claim is valid.

Epilogue: Of course we know the game is over after one hour and the distance travelled by the bee is $120$ miles. But we could also check it based upon the calculations above.

The total time the bee is flying is according to (11) \begin{align*} \sum_{n=0}^\infty\left(t_{2n+1}+t_{2n+2}\right) &=\sum_{n=0}^\infty\left(\frac{5}{3^n7^{n+1}}+\frac{5}{3^{n+1}7^{n+1}}\right)\\ &=\left(\frac{5}{7}+\frac{5}{21}\right)\sum_{n=0}^\infty\frac{1}{3^n7^n}\\ &=\frac{20}{21}\frac{1}{1-\frac{1}{21}}\\ &=\frac{20}{21}\cdot\frac{21}{20}\\ &=1 \end{align*} which is precisely one hour. The distance travelled by the bee is according to the last result \begin{align*} 120t_1+120t_2+120t_3+\cdots=120\sum_{n=0}^\infty\left(t_{2n+1}+t_{2n+2}\right)= 120 \end{align*} miles.