problem: two trains enter a tunnel 200 miles long (yeah, its a big tunnel) travelling at 100 mph at the same time from opposite directions. as soon as they enter the tunnel a supersonic bee flying at 1000 mph starts from one train and heads toward the other one. as soon as it reaches the other one it turns around and heads back toward the first, going back and forth between the trains until the trains collide in a fiery explosion in the middle of the tunnel (the bee survives). how far did the bee travel?
Solution
solution: this puzzle falls pretty high on my aha scale. my first inclination when i heard it was to think “ok, so i just need to sum up the distances that the bee travels…” but then you quickly realize that its a difficult (not impossible) summation which the interviewer could hardly expect you to answer (unless i guess if you are looking for a job as a quant). “there must be a trick” you say. eh, sort of i guess, enough to say that this question is a stupid interview question.
the tunnel is 200 miles long. the trains meet in the middle travelling at 100 mph, so it takes them an hour to reach the middle. the bee is travelling 1000 mph for an hour (since its flying the whole time the trains are racing toward one another) – so basically the bee goes 1000 miles.
there is no process to explain, so this question can’t possibly teach you anything about the person. they either know it or they don’t and if they already knew it before you asked, you’re not going to be able to tell when they give you the answer. so don’t ask this question. and if someone asks you this question, just tell them you’ve already heard it before.
💡Strategies for Solving This Problem
Path Optimization and Movement Constraints
Got this at Citadel in 2023. It's about a bumblebee flying between two trains moving toward each other. Tests understanding of relative motion, series, and when to use simulation vs math.
The Problem
Two trains are 100 miles apart, heading toward each other at 50 mph each. A bumblebee starts at one train, flies toward the other at 75 mph. When it reaches the second train, it turns around and flies back. It keeps doing this until the trains meet. How far does the bumblebee fly?
The Trap
Most people try to calculate each leg:
- First leg: fly to approaching train
- Second leg: fly back
- Third leg: fly forward again
- Sum infinite series...
This works but is complex. There's a much simpler approach.
Approach 1: Simulate Each Leg (Hard Way)
Calculate distance for each leg as trains get closer. Sum them up.
First leg:
- Trains approach at combined 100 mph
- Bee flies at 75 mph toward train
- Relative closing speed: 75 + 50 = 125 mph
- Initial distance: 100 miles
- Time to meet train: 100/125 hours
- Bee distance: 75 × (100/125) = 60 miles
Then calculate second leg with new train distance... Gets messy fast.
Approach 2: Think About Time (Elegant) ✓
Key insight: The bee flies for exactly as long as it takes the trains to meet.
How long until trains meet?
- Distance: 100 miles
- Combined speed: 50 + 50 = 100 mph
- Time: 100/100 = 1 hour
Bee flies at 75 mph for 1 hour = 75 miles
That's it! No infinite series needed.
Why This Works
Doesn't matter how many times the bee turns around. It's constantly flying (no rest) until trains meet. Total flight time = time for trains to meet.
The Simulation (For Verification)
We can simulate to verify:
- Track train positions
- Track bee position and direction
- Update each timestep
- When bee reaches train, flip direction
- When trains meet, stop and report distance
At Citadel
I started working on the geometric series. Interviewer let me struggle for a minute, then said "Think simpler. How long is the bee flying?" Immediately clicked. He said "Good interviewers sometimes let you find the simple answer yourself, but we don't want to waste time. The elegant solution is what we're looking for."