VLSI DV Interview Puzzles · All levels
Burning Ropes to Measure 45 Minutes
You have two ropes. Each rope takes exactly 60 minutes to burn, but burns non-uniformly. Measure exactly 45 minutes.
Puzzle
Difficulty: Medium · Puzzle 3 of 6 · Topic: Classic Brain Teasers
You have two ropes. Each rope takes exactly 60 minutes to burn, but burns non-uniformly. Measure exactly 45 minutes.
Hint
Lighting both ends changes remaining burn time predictably.
Step-by-step solution
diagram
1) Light rope A at both ends and rope B at one end at time t=0.
2) Rope A finishes in exactly 30 minutes (both ends lit).
3) At t=30, rope B has some length left, but that remainder would take exactly 30 more minutes from one end.
4) Light the other end of rope B at t=30; now remaining part burns in 15 minutes.
5) Total elapsed time is 30 + 15 = 45 minutes.Answer
Answer: Light A from both ends and B from one end; when A finishes, light B's other end and wait until B finishes: 45 minutes total.
Why candidates get it wrong
Assuming non-uniform burn makes all timing impossible; total burn-time invariants still hold.
Interviewer follow-up
How would you measure exactly 15 minutes with the same two ropes?