Puzzle : Burning ropes

Many of you must have heard this puzzle.

Problem : There is this special kind of ropes made from some non-homogeneous material. Because of this special material, the rope takes exactly one hour to burn if lighted from one end. However, as the material is not uniform across the rope, different parts of rope may take different amount of time. So for example, one half may take 1 minute where as other half may take 59 minutes to burn.

1) You are given two such ropes and you need to measure 45 minutes.

2) You are given only one such rope and you need to measure 15 minutes.

Solution : Solution to the first one is very simple, the second one is however, not as easy as the first one.

1) We have two ropes A and B. Light A from both the ends and B from one end. When A is finished burning we know that 30 minutes have elapsed and B has 30 minutes remaining. Now, light the other end of B also so that remaining part of B will burn at double speed taking 15 minutes to burn. Thus, we have got 30+15 = 45 minutes.

2) We are given a rope of 1-hour burn time and we need to measure 15 minutes. Doubling the speed is easy by burning  the rope from both the ends but the same is not true when you need to increase the speed four fold.

For example, if you cut a rope into two halves H1 and H2 with burning time 10 and 50 respectively. Now, burning both of them from both the ends does not help as H1 will burn in 5 minutes where as H2 will take 25 minutes.

Anyways, the solution is , you cut the rope into two pieces ( need not be half, because of non-uniformity it does not matter whether you cut at the middle point or not ) P1 and P2. Note that we need to measure 15 minute with 60-minutes burn time rope. Or in short, given a rope of length L( in time when burned from one end ) we need to measure L/4.

Burn, P1 and P2 from both the ends. P1 = 30-x and P2 = 30+x where x \in [0,30). Because we are burning from both the ends, P1 will get burnt in 15-(x/2) minutes. For P2 , 30+x – 2*(15-(x/2)) = 2x, because P2 is also burning from both the ends. At the end of 15-(x/2) minutes P2 will have length 2x remaining. To measure exactly 15 minutes we need to measure time x/2 after 15-(x/2) has elapsed.

We are again back to the same problem. We have a rope of length 2x and we need to measure x/2 which is increasing the speed four fold. So, we can keep on repeating this experiment. How long do we need to repeat this? Well, until both the pieces finish burning exactly at the same time. Why?

Say we have a rope of length y and we need to measure y/4. Two pieces P1 and P2 measures y-z and z. When both are lighted from both the ends time taken will be (y-z)/2 and z/2 respectively.

If they finish burning at the same time then

(y-z)/2 = z/2

=> y = 2z

Burning time was z/2 = y/4 which is what we wanted.

–Saurabh Joshi


Tags: ,

12 Responses to “Puzzle : Burning ropes”

  1. anon Says:

    Good description, especially of the second part. The word “length” (at few places) could be substituted with “mass” for more accuracy.

    Liked it.

  2. Bharat Verma Says:

    Cool it helped me … this question was asked to me in a company’s interview.
    I was able to give the answer of first question but not the second in fact the second question was like that how will you measure a time of 1 Hr + 15 Mins ?

  3. Aidin Nasirishargh Says:

    Thanks for the great detail!

    I guess a more practical writing of the answer to the second question can be:

    STEP 1) Start Timer.
    STEP 2) Cut the rope you have in two — no matter from where.
    STEP 3) Burn 4 ends (2 times 2).
    STEP 4) Wait until one of the ropes is fully burnt. So you have only one rope still burning (if they both didn’t finish at the same time).
    STEP 5) if the other rope is also fully burnt, goto STEP 6. Otherwise, extinguish the both burning ends of the only rope you have and goto STEP 2.
    STEP 6) Stop Timer. It is 15 minutes passed!

    PS. You want to make it with the least effort of burn and extinguish? Try to be lucky in STEP 2 and cut the rope in two equal parts in terms of burning time! 😉

  4. Khemraj Says:

    i llike it.
    i got stuck after reading material is not uniform. Thanks saurabh.

  5. Karthik Says:

    Hi, Can you please explain how you are assuming that both the ropes takes same time to burn what if they time taken by 2 ropes are different..

    (y-z)/2 = z/2… how is this possible

    • Saurabh Joshi Says:

      I did not assume that both the ropes take the same time. I said that this repetitive process will end when both of the ropes finish burning at the same time. You continue the process if one of them burns out faster than the other.

  6. AnitaKarthik Says:

    Sorry for bothering you I am just trying to understand this.because the question was that i was given only one rope.. and i was wondering how i could do trial and error method with just one rope.

    while for the first question the answer was clear because we could find the result at a single shot.

  7. AnitaKarthik Says:

    and if i do reverse algorithm….. for the equation y = 2z where y-z is the length of the first rope and z is the length of the second rope say if y = 10 cm and according to the equation y = 2z z will be 5 cm…. so by this relation it comes as we always need to cut the rope in to two equal halves.

    Its already been 6 years out of college and i don’t if i am doing wrong math…

    please help.

    • Saurabh Joshi Says:

      The length in cm does not matter as the ropes are not homogeneous. Only the length in time matters. I did not say y=2z always. I said that we need to repeat the process of cutting a rope into two parts if one of the part finished burning until both of the parts finish burning at the same time. When that happens, at that time y=2z is satisfied and at that time you know that exactly 15mins have elapsed.

  8. Nikhil Says:

    Another way to solve the second puzzle –

    Step 1 – Cut the rope into 4 pieces, P1, P2, P3, P4.

    Step 2 – Light all four pieces at one end

    Step 3 – If you see any of the ropes about to finish burning (Px), cut a small length of rope from some other piece and place it at the end of Px.

    Keep repeating Step 3 and make sure that all 4 pieces finish burning at the same time.

    At the end of this, 15 minutes will have elapsed. Because, we have effectively split the rope into 4 pieces which are burnt at the same time. The mathematics involved is no more than 4X = 60; X= 15.

  9. abow Says:

    I get what you’re trying to do with the algebra (though I’m not very good at it), but here is a thought experiment that I did and it does not get anywhere close to 15 minutes.
    • Cut the 60 minute rope into 2 pieces: unknown to us they turned out to burn up in 10 minutes and 50 minutes
    • Burn both of those at both ends: 10/2 and 50/2 = 5 minutes and 25 minutes
    • At the end of 5 minutes, the first rope is burned up, and there is 20 minutes left of the 25 min rope (Elaped 5 minutes)
    • cut the remaining 20 minute rope in 2: unknown to us, these 2 new ropes would would burn up in 8 minutes and 12 minutes
    • burn both ends of both ropes: (8/2) 4 minutes and (12/2) 6 minutes
    • at end of 4 minutes the first rope is burned up and there are 2 minutes left of the 6 minute rope (Elapsed 5+4=9 minutes)
    • cut that in 2 min rope in half: 1 min and 1 min
    • burn both ends of both ropes: .5 minutes each
    • both are completly burned at the end of .5 minutes so no more iterations are possible/needed
    • Elapsed time 9.5 minutes!
    If anyone can point out where I messed up, let me know. I’ve done a few different sets of burn-lengths and I get a different answer every time.

    • abow Says:

      Nevermind. The rope burn-times are cut in half when you burn both ends. However, once you cut the remaining rope, you now have two 1-burn ropes, so you have to double the burn time back up, THEN light the other sides on fire and divide the 2 new ropes’ burn times in half:
      60 = 10 + 50 = burning both ends: 5 + 25
      After 5 minutes, you cut the remaining rope in two: (25 – 5) * 2 = 40 minutes of single-burn-time rope
      cut that in twain: 40 = 12 + 28 = burn both ends: 6 + 14
      after 6 minutes of burning 14-6 = 8
      cut the 8 x 2 = 16
      16 = 8 + 8 = burn both ends: 4 + 4
      done burning
      Elapsed time 5+6+4 = 15

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: