The Torch & Bridge Problem
The Puzzle: Four people (A, B, C, D) need to cross a bridge at night.
- They have only one torch.
- The bridge can only hold two people at a time.
- Anyone crossing must carry the torch.
- Speeds: A: 1 min, B: 2 min, C: 7 min, D: 10 min.
- When two people cross, they move at the speed of the slower person. What is the minimum time for all to cross?
1. The Common Mistake (Greedy Approach)
Most people try to use the fastest person (A) as the “shuttler” to bring the torch back every time.
- A & B cross (2 min), A returns (1 min) = 3
- A & C cross (7 min), A returns (1 min) = 8
- A & D cross (10 min) = 10 Total: 21 mins.
2. The Optimized Solution (The “Buddy” Rule)
The key is to send the two slowest people (C & D) together so their slow times overlap into a single trip. But someone needs to be on the other side to bring the torch back!
- A & B cross: (2 min)
- A returns: (1 min) - Now A and B are split.
- C & D cross: (10 min) - Slowest people are now across!
- B returns: (2 min) - B was waiting there!
- A & B cross: (2 min) Total: 17 mins.
Interview-Focused Questions
Q: Why is 17 mins better than 21 mins?
A: Because in the 21-min version, C’s 7 mins and D’s 10 mins were counted separately. In the 17-min version, C and D cross together, so we only “pay” for the slowest one (10 mins).
Q: Is the ‘shuttle’ method always worse?
A: No. If the speeds were more uniform (e.g., 1, 2, 3, 4), the A-shuttle would be faster. The “Buddy” rule only works when the two slowest people are significantly slower than the fastest two.
Summary
- Step 1: Send the two fastest.
- Step 2: Bring back the fastest.
- Step 3: Send the two slowest.
- Step 4: Bring back the second fastest.
- Step 5: Send the two fastest again.
Premium Content
Unlock Bridge and Torch Puzzle and all premium lessons with a subscription.
From ₹199.99/year — See plans