A rope burns non-uniformly for exactly one hour. How do you measure 45 minutes, given two such ropes?
The Solution
Let’s call the ropes A and B. Light rope A at one end and rope B at both ends. B will burn in exactly 1/2 hour. When B burns out light the unlit end of rope A. Rope A will burn out 15 minutes later. Total elapsed time, 45 minutes.
I've got a masters degree in computer science and over 10 years of experience building web-based systems using Java/J2EE, Ruby, Rails and PHP. I'm a strong believer in the effectiveness of Agile Methods. Read more »
Rope Burns
The Problem
A rope burns non-uniformly for exactly one hour. How do you measure 45 minutes, given two such ropes?
The Solution
Let’s call the ropes A and B. Light rope A at one end and rope B at both ends. B will burn in exactly 1/2 hour. When B burns out light the unlit end of rope A. Rope A will burn out 15 minutes later. Total elapsed time, 45 minutes.