# There are two ropes and a lighter. Each rope takes exactly 60 minutes to burn completely. But the ropes do not burn at a constant rate, so you do not know that half the rope burns in 30 minutes. For instance, if one end of the rope is lit, it may take 5 minutes to burn the first half of it, and 55 minutes to burn the second half. How can you measure exactly 45 minutes by burning the ropes?

**Updated:**July 24, 2021 —

**Training Time:**2 minutes

Overseen by: Archangel Macsika

**Topic:** Data Science.

**Difficulty:**Intermediate.

**Companies who previously asked this:** -

**Objective:** There are two ropes and a lighter. Each rope takes exactly 60 minutes to burn completely. But the ropes do not burn at a constant rate, so you do not know that half the rope burns in 30 minutes. For instance, if one end of the rope is lit, it may take 5 minutes to burn the first half of it, and 55 minutes to burn the second half. How can you measure exactly 45 minutes by burning the ropes?

**Short Answer: practical answer**.

### Full Solution

Let's label the ropes as Rope A and Rope B.

First, burn both ends of Rope A, and at the same time, burn only one end of Rope B.

Rope A will take twice the rate of Rope B to burn, which means, Rope A will take 30 minutes rather than 60 minutes to burn completely.

At the time Rope A burns completely, Rope B will have 30 minutes remaining to burn.

At this point, we proceed to burn the other end of the Rope B.

This will double the rate at which Rope B burns. So rather than 30 minutes, Rope B will completely burn in 15 minutes.

Adding up the 30 minutes it takes to completely burn Rope A, and the 15 minutes it takes to completely burn the remaining half of Rope B gives us 45 minutes.