Pick up 1000, go 467 km, drop 533 banans. You now have 533 bananas in city B and one banana rotting away at 533 km.

Vigor
Thursday, April 08, 2004

very good thats the correct Answer 533

BondofUk
Saturday, April 10, 2004

I'll sketch my thought process.

First, I realized that if you take 1000 bananas and walk 1000 kilometres, you arrive with no banana at all (and the elephant is stuck in city B). So the elephant has to travel shorter distances (but more often).

So, I asked myself, why not carry the bananas kilometre by kilometre. It needs to walk five times one kilometre to move the bananas one kilometre forward (which costs five bananas). At 200 km, you have only 2000 bananas left, so you only need to walk three times to get the bananas one km farther. I arrived with 533 bananas in B (an optimal solution), but the poor elephant! It must feel dizzy of turning around so often.

That's not what I thought at that moment. I was happy that I had found a solution (which I believed to be correct (which it was)) and went to bed.

The next day, I realized that it's not necessary to make the elephant turn around so often. Transporting the bananas two kilometres is the same as transporting them one kilometre twice (as long as you don't cross the 2000 banana line or the 1000 banana line). I have posted the simplified solution above.

The logical explanation for the solution is this one: As long as you have to walk every kilometre five times, each kilometre costs you 5 bananas, so you want to stop that as soon as possible. Which is when you have only 2000 bananas left, which is after 1000 km / 5 = 200 km. Daws' elephant walks the first 250 km five times, wasting some bananas here. (Daws, I hope you aren't offended. I just try to explain why your solution is suboptimal.)

So with only 2000 bananas left, every kilometre costs 3 bananas, which we want to do until you have only 1000 bananas left, and no farther, because with only one way to walk, transportation becomes even cheaper. Now 1000/3 is not an integer, so we lose one banana due to rounding.

That last part sound really odd. People in B will ask: "Why have you left one banana on the road?" - "I couldn't do anything about it; rounding error." - "WHAT?"

so now we have 1000 B at 533 + 1/3 KM
and we dont have to give a B for travelling 2/3 KM at the end

so we reach with 534 B

cool :-)

BondOfUk
Wednesday, April 14, 2004

The puzzle said that the elephant cannot go without bananas to eat.

However, that statement is ambiguous. It needs to specify whether the elephant eats the banana before going 1km, or eats after going 1km, or eats somewhere along the 1km. Does it eat the whole banana in one gulp, or takes little bites.

If one is to find a precise and clear-cut solution, the statements in the problem must be precise. Unless you intend to play tricks on words.

JHY
Wednesday, April 14, 2004

Answer is 833 Bananas

1. Go 1 Km and leave 999 repeat this for another 2 times.
2. Now u were left with 2997 bananas
3. Repeat this process untill u will be left with less than 2000 bananas. ()

4. Now go 1 KM in two sets (1000 + 1000) as u were left with below 2000 bananas
5. Repeat this process untill u will be left with less than 1000 bananas. ()

6. Now keep going the city B at the end you will be left with 833 banas