The Camel and the Bananas
The puzzle
A trader has 3000 bananas and a camel. The market is 1000 km away. The camel can carry at most 1000 bananas at a time, and it eats one banana for every kilometre it walks - in either direction.
Bananas may be put down and picked up anywhere. What is the greatest number of bananas that can reach the market?
Stuck?
One at a time, smallest first. Open only as many as you need — the whole point of the puzzle is the part you work out yourself.
Hint 1
With 3000 bananas and a capacity of 1000, how many times must the camel traverse each early kilometre?
Hint 2
The cost per kilometre drops the moment the pile falls below a multiple of 1000. Work out where those moments are.
Show the answer Hide the answer
533 bananas.
How to get there
While more than 2000 bananas remain, moving the whole pile forward one kilometre needs three loads: forward, back, forward, back, forward. That is five kilometres of walking per kilometre of progress, so the pile shrinks by five bananas per kilometre.
Run that until the pile drops to 2000, which costs 1000 bananas and therefore takes 200 km. The trader is now 200 km along with 2000 bananas.
From 2000 down to 1000 the camel needs only two loads, which is three kilometres of walking per kilometre forward - three bananas per kilometre. Going another 333 km costs 999 bananas and leaves 1001 bananas at the 533 km mark.
Here is the step that catches people out. The pile is 1001 and the camel carries 1000, so taking all of it means a second trip - and a second trip costs three bananas for every kilometre it is kept up, to save one banana. Leave the spare behind.
The camel takes exactly 1000 and walks the remaining 467 km in a single load, eating one per kilometre. It arrives with 1000 - 467 = 533. Carrying all 1001 instead arrives with 532, which is the wrong answer you get by not noticing.
The technique worth keeping
The expensive part of the journey is the beginning, where every kilometre is walked five times, and it gets cheaper as the pile shrinks past each multiple of the camel’s capacity. So the thing to find is not a route but the two distances at which the rate changes. And then the last banana: a load of 1001 is far worse than a load of 1000, because the cost of a trip has nothing to do with how full it is.