10september2010

Burn The Strings (Difficulty Level : Medium)

You have two strings whose only known property is that when you light one end of either string it takes exactly one hour to burn. The rate at which the strings will burn is completely random and each string is different.

How do you measure 45 minutes?

Solution:

Light both the ends of the first string and one end of the second string. 30 minutes will have passed when the first string is fully burned, which means 30 minutes have burned off the second string. Light the end of the second string and when it is fully burned, 45 minutes will have passed.
Some people have difficulty grasping that when you light both ends of the first fuse, it will take 30 minutes to burn. Because the burning rate is random and unknown to you, you have no idea where the 30 minute mark is on the fuse. If you had an exact duplicate, then the 30 minute mark would be in the same place. It is probably not in the middle, but it is somewhere. If you burn both ends of a fuse it will not stop burning until it has reached this mark, which means 30 minutes is up.