Solution

The Camel and the Bananas

Show the problem again

A camel must transport 3000 bananas across 1000 kilometers of desert. It can carry at most 1000 bananas at a time and eats 1 banana per kilometer traveled (in either direction). Bananas may be cached anywhere along the way. What is the maximum number of whole bananas that can reach the destination?

Worked solution

The answer is 533. While hauling 3000 bananas, moving the whole stockpile 1 km requires 3 forward trips plus 2 returns = 5 bananas/km; ship in this mode until 1000 bananas are consumed, i.e., 200 km. With 2000 bananas, the rate is 3 bananas/km for the next 333⅓ km (consuming another 1000). The final 1000 bananas travel the remaining 466⅔ km at 1 banana/km, delivering 1000 − 466⅔ = 533⅓ → 533 whole bananas.

Source: Classic transport-optimisation puzzle in wide circulation, often called the jeep or camel-and-bananas problem. Statement written for AxiomIQ.