Skip to main content
Posts
What was the challenge?
Remember, there are 50 bikes, each with a tank that has the capacity to go 100 kms.
-----------------------------------------------------------------------------------------------
SOLUTION 1 :
Any body can think that these 50 bikes together can travel 50 x 100 = 5000 km. But this is not true in the case as all bikes will be starting from the same point. And we need to find how far we can we go from that point.
-----------------------------------------------------------------------------------------------
SOLUTION 2 :
Just launch all 50 bikes altogether from some starting point and go the distance of only 100 km with tanks of all bikes empty in the end.
-----------------------------------------------------------------------------------------------
SOLUTION 3 :
1. Take all 50 bikes to 50 km so that tank of each is at half.
2. Pour fuels of 25 bikes (half filled) into other 25 bikes so that their tanks are full.
3. Now, move these 25 bikes to another 50 km so that again their tanks are at half.
4. Pour fuel of 12 bikes into other 12 so that we have 12 bikes with full fuel tank. Leave 1 bike with half filled fuel tank and repeat above.
So for every 50 km distance, half of bikes are eliminated as -
50 ---> 25 ---> 12 ---> 6 ---> 3 ---> 1
The last bike left with it's tank full can go 100 km. So. the total distance that can be traveled in the case is 5 x 50 + 100 = 350 km.
However, we have wasted 1/2 fuel each whenever odd number of bikes are left i.e. at 25 and at 3.
-----------------------------------------------------------------------------------------------
SOLUTION 4 :
Let's optimize little further so that the 1/2 fuel is not wasted whenever odd bikes are left.
1. Take all 50 bikes to 50 km so that tank of each is at half.
2. Pour fuels of 25 bikes (half filled) into other 25 bikes so that their tanks are full.
3. Now take these 25 bikes to another 20 km using 1/5th (20/100) fuel of each.
4. Make 5 groups of 5 bikes each. From each group, use 4/5th fuel of 1 bike to fill tank 1/5th emptied tanks of other 4 bikes.
5. Leave bike with empty tank and take 20 bikes to next 50 km. And again after 50 km, pour fuel of 10 bikes into other 10 to eliminate 10.
6. After moving 10 bike for another 50 km, again pour fuel of 5 bikes into another 5.
7. Now take these 5 bikes to another 20 km using 1/5th (20/100) fuel of each.
8. Use 4/5th fuel of 1 bike to fill tank 1/5th emptied tanks of other 4 bikes.
9. Now these 4 bikes again taken to another 50 km where 2 more are eliminated by taking half of their fuel to fill tanks of other 2.
10. After taking those 2 bikes for another 50 km distance, 1 can be eliminated by taking away it's half fuel to fill up the tank of other bike.
11. The last bike can now go another 100 km distance as it's tanks is full.
To summarize,
50 ---50km---> 25 ---20km---> 20 ---50km---> 10 ---50km--- > 5 ---20km--- > 4 ---50km --->
--->2 ---50km---> 1 ---100km ---||
Total distance that can be traveled = 5 x 50 + 2 x 20 + 100 = 390 km.
-----------------------------------------------------------------------------------------------
SOLUTION 5 :
Now we have got the idea from SOLUTION 4 how to maximize the distance further.
Instead of waiting for tanks to be at half or 4/5th we should empty the tank of 1 bike into others at the point where that bike has sufficient fuel for this process.
For example, to have 49/50th fuel in tank of 1 bike at some point, all bikes need to be taken so that 1/50th of each is used up. Since the bike goes 100 km with full tank, with 1/50th fuel it can go 100 x 1/50 = 2km distance.
In short, after 2km distance 49/50th fuel of 1 bike can be used to fill 1/50th empty tanks of other 49 bikes. Now, that 1 bike with empty tank can be left there.
For next phase, we have, 49 bikes. Now, after using up another 1/49th fuel for another distance of (1/49) x 100 = 100/49 km, the 48/49th fuel left in any one bike can fill up the tanks of other 48 bikes (each with 1/49th part is empty). Then, these 48 bikes can be taken for the next phase.
Now, again after consuming 1/48 fuel for another distance of 100/48km, 47/48th of fuel from 1 bike can be used to fill tanks of other 47 bikes (each bike with 1/48th tank empty after traveling 100/48km). So, now 47 bikes can be taken for the next phase.
This way, we are making sure that at each phase 1 bike uses it's all fuel to make tanks of other full.
Repeating this process, till 1 bike left which can go further 100km with full tank.
So the total distance that can be covered is -
100/50 + 100/49 + 100/48 +.................100/1 = 449.92 km.
And this is the maximum distance that we can go with 50 bikes.
-----------------------------------------------------------------------------------------------