3

Distance from city $x$ to $y$ is 1000 kms. A merchant has 3 elephants and 3000 bananas. The merchant wants to transport bananas from $x$ to $y$. The maximum capacity of an elephant is 1000 bananas, and it consumes 1 banana per km. What is the maximum number of bananas the merchant can transport?

Regret
  • 3,817
savitha
  • 51

1 Answers1

3

Put 1000 bananas on each elephant. Start walking.
333km later, your elephants have consumed 999 bananas.
Each elephant has 667 bananas.
From one of the three elephants, distribute all his bananas among the other two elephants.
There is one banana left over. Throw it away.
Throw away the useless elephant.
You now have two elephants with 1000 bananas each.
Have both elephants walk 500km.
Now both elephants have 500 bananas each.
Your elephants have now walked 833km.
Take all the bananas from one elephant and put them on the other elephant.
Throw away the useless elephant.
You now have one elephant with 1000 bananas.
Have your elephant walk the remaining 167km.
Your elephant arrives with 833 bananas.

This is assuming that (a) the merchant is not interested in saving all his elephants (this would be clearly impossible) and (b) there is no postal service.

Newb
  • 17,672
  • 13
  • 67
  • 114
  • Can you prove it is the maximum possible number of bananas left? – Regret Jan 13 '15 at 07:06
  • @Regret A theoretical proof is not immediately obvious to me (though I'm quite confident that I'm right). I can run a simulation to check all possible algorithms... – Newb Jan 13 '15 at 07:12