# Interview Questions

# Maximum distance with 50 bikes each having fuel capacity of 100 kms

- September 18, 2013
- Posted by: Kamal Rawat
- Category: Logic Puzzles Quantitative Aptitude

There are 50 bikes, each with a tank that has the capacity to go 100 kms (when the fuel is full). Fuel tanks of all the bikes are full.

Using these 50 bikes, what is the maximum distance that you can go?

Hint: It’s not that we want all the 50 bikes to be at the end. You can use other bike’s fuel?

**Naive Solution:**

The most naive solution would be to just make all the bikes go together. Hence, the maximum distance travelled will be 100km.

**Better Solution:**

Move all the bikes 50km, so that each bike has half tank empty.

Now pour the fuel of 25 bikes (whose tanks are half filled) into other 25 bikes. Now we have 25 bikes will full tanks and these 25 bikes can go upto 100km each

Repeat the same after next 50 km.

Hence the number of bikes will go down after every 50 km, like:

50 -> 25 -> 12 -> 6 -> 3 -> 1

Total distance covered will be 5*50 + 100= 350 kms (At the end you have a bike filled with 100km fuel).

**Note:** You can further optimize few more km, because we are ignoring one bike’s (50 km fuel) when 25->12 and 3->1.. Since it is not the best solution, I have ignored that.

**Best Solution:**

In this solution we will vacate the tank of a bike as soon as there is capacity in other bikes (not waiting for 50 km). After 2 km each bike will have 98km of fuel left in them.

So empty one bike into rest 49 bikes. (49*2 = 98).

Again travel a distance of 100/49km, that is sufficient to vacate the fuel of one more bike in other 48 bikes.

The actual number of km traveled will be:

**= 449.92 km**

This puzzle was asked in the Adobe.

Please explain more.I am not getting it.