# Rope Burning Interview Question

Kottke just posted the infamous rope-burning interview problem, which is actually quite easy:

You are given two ropes and a lighter. This is the only equipment you can use. You are told that each of the two ropes has the following property: if you light one end of the rope, it will take exactly one hour to burn all the way to the other end. But it doesn’t have to burn at a uniform rate. In other words, half the rope may burn in the first five minutes, and then the other half would take 55 minutes. The rate at which the two ropes burn is not necessarily the same, so the second rope will also take an hour to burn from one end to the other, but may do it at some varying rate, which is not necessarily the same as the one for the first rope. Now you are asked to measure a period of 45 minutes. How will you do it?

The solution is the following:

- Light rope #1 at one end
- Light rope #2 at both ends
- When rope #2′s ends meet, light rope #1 at the other end. 30 minutes have been measured so far, leaving 30 minutes left on rope #1.
- When rope #1′s ends meet, fifteen minutes have been measured, for a total of 45 minutes.

### Related Posts

This entry was posted on Wednesday, November 22nd, 2006 at 10:56 pm and is tagged with . You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback. |

it seems u do not think with your brains. if you light the both ends of the rope, or one after another, and one half burns in 1 minute and the other in 59 minutes, the only possible outcome, using 2 flames is to shorten the duration to less than 1 hour. to a MINIMUM of 30 minutes. BUT if it takes 30 minutes to burn half, then it takes 30 minutes to burn the other half so that means it burns uniformly WHICH is obviously the exact thing you do not understand. so the real answer is you cannot measure sub-units of less than an hour. only multiples of one hour. so elliot and everybody is wrong. elliot, by the way, nobody here was talking about distance, but time. when the flames meet, when fire comes from both sides, they meet in the 30<x<60 minute interval . BETWEEN 30 and 60, 30 & 60 NOT included. 30 not included cuz that would mean UNIFORM burning, and 60 not included because that would mean lighting from 1 end. before telling people to think , think for yourself ffs

how would u do 52.5 minutes?

This is a pretty unusual rope, Vimal, which might take 59.99 minutes to burn 1/1000th of its length, and 0.01 minutes to burn the rest. Still so sure it will always burn at the same rate in either direction?

Anyway, it’s easy enough to design a rope that will burn slowly for the first half and faster for the second half *AND* do so in both directions. Simply take two ropes that burn faster in one direction than the other. Let’s say they take 32 minutes to burn in one direction and 28 minutes in the other. Now join the “fast” ends. Voila: the rope will burn end to end in one hour but when lit from both ends will take 32 minutes!

Nick,

The analogy of the cyclists, though appearing to be similar, isn’t similar.

Suppose, like you say, the course of the cyclists is like a hill, halfway uphill and half way downhill. In this case, there exists a symmetry. No matter which end you start from, the first half is always uphill (and so takes more time).

There’s no such summetry for the rope. You can’t design a rope that’ll burn slowly for the first half and faster for the second half *AND* do so in both directions!

If you burn both ends of the rope, it will burn in half the time!

Gene,

We’re told that the rope takes an hour to burn from one end to the other, and I think we can reasonably assume that’s the case no matter which end is lit. But it doesn’t immediately follow that if we light *both* ends it will take the rope 1/2 hour to burn out.

To see why, you only have to imagine two cyclists who can both cycle from A to B (or B to A) in one hour. Yet when they both set off at the same time, one from A and one from B, it takes them not 30 but 45 minutes to meet. Why? Because they’ve both been cycling uphill!

That’s the flaw in the riddle. We have to assume something like: any given section of each rope takes the same time to burn in either direction. We’re not told that, and I’m not convinced it’s a reasonable or (given the uneven nature of the rope) a physically realistic assumption to make.

Nick,

The way to think about it is that the rope burns for one hour no matter which side is lit. The composition of the rope doesn’t matter. If you light it from one end it will burn to a certain point on the rope in 1/2 hour, leaving some length of rope that will burn in the remaining 1/2 hour. Therefore if you light both ends the fires will meet at that point in 1/2 hour.

Nobody has explained why rope 2 takes 30 minutes to burn through when lit from both ends. In fact, that doesn’t follow from the stated conditions, and therefore the riddle is flawed.

Cut rope A into two pieces, half way through the middle; light all 4 ends. This should buy you 15 minutes.

Light both ends of Rope B, this should bring you 30 minutes.

You’ve now wasted 45 minutes, two ropes and left with a lighter and the wrong smell of burning hemp .. or nylon.

Yes, Elliot and Anna are correct. The way Rob T and Tang are thinking about it involves lighting from both ends and the each half burns independently of the other half. This would not be true however. If it takes 59 minutes to burn the first half and 1 minute to burn the second half, the rope would still be burned in 30 min. After 1 min, there would be 58 min left to burn the first half and 0 min left to burn the second half–but the flame that burned the second half will begin burning the first half from the other side. Therefore it would take 29 minutes for the second half to burn, and adding that extra one minute from the beginning gives you 30 overall.

Recently a good friend of mine told me to go to the local pharmacy and buy myself Rabeprazole. I am very curious to know what kind of medicine is this? Anyone can help?

I will be very grateful indeed.

Elliott is right, its a matter of common sense, when you start burning from both the ends at the same time say 10:00 AM, by the time the rope is completely burnt, at whatever rate the rope burns on either sides, it will take 30 minutes to burn the entire rope. The left hand side might burn 10% in half hour and the right hand side might burn 90% in the same time doesn’t matter.

Elliott Back,

that’s fine, but it still took 59.999 minutes to burn one side and .001 minutes to burn the other -leaving you no certain way to measure 30 minutes. You need a uniform rate or at least the avg rate of time to be the same. I beleive the question is flawed from the start

Yes–which is fine. But you’ve lit the rope at both ends, so when they meet, at 999 ft and 1ft, half the time is up. They don’t have to meet in the middle to measure half of the time interval. Go back, Tang, and think about it some more

Sorry what I meant was not expressed properly above

and could be misleading.

What I meant was : since burning rate is not uniform across all cross sections of the rope it is not certain

whether the rope when lighted from both ends will burn out in 30 mins. Remember what the question says "non uniform burning rate" – which means a fire on one rope end could take e.g 59.99 mins to burn 1/1000 th of its length, and 0.01 secs to burn the rest.

This is the popular answer, but I itself violates the assumption of non uniform burning rate as you are assuming that 1/2 of the rope will burn in 30 mins,

which is not necessarily true.

That question is so old. was published in 2002. everyone who has interviewed with wall street firms knows it.

that’s pretty good but i think the most appropriate question is how will you burn those ropes at exactly 45 minutes.

if i will just be asked by ‘how will i measure 45 minutes’, i’ll probably just say, ‘i’ll take a look at my watch’