Tricky math puzzle

Started by
31 comments, last by Devnull 18 years, 6 months ago
This was a bonus question for one of my classes, i.e. I've already submitted my answer. I'm curious to see what the math wizzes here can get. There is a plantation on one end of a desert, and a town on the other. The precise distance between them is 1000 miles. A farmer of the plantation aspires to sell the bananas he grows to the town, which requires him to make that trip by camel. His camel can carry at once no more than 1000 bananas, and must eat 1 banana for every mile to keep going. The plantation has produced 3000 bananas. Question: what is the maximum amount of bananas which can be delivered?
Advertisement
Part of the trick here is that the camel has to make it's way back, and there for needs a bana every mile. But it's stupid because the camel only has enough bananas to go 1000 miles, then the camel will get stuck in the town because it has no more bananas left, what a cruel joke really.
Black Sky A Star Control 2/Elite like game
Quote:Original post by ViperG
But it's stupid because the camel only has enough bananas to go 1000 miles, then the camel will get stuck in the town because it has no more bananas left, what a cruel joke really.


Ahh, but who said the camel has to go all the way in one go? [smile]

Quote:Original post by ViperG
Part of the trick here is that the camel has to make it's way back, and there for needs a bana every mile.


Right.

My strategy was to subdivide the initial 1000 mile distance into n sub-distances. Suppose n = 3.

The distance from the start to the end of the first subdivision is then 333.

This means if we pick up 1000 bananas, 333 will be eaten there, and 333 will be eaten on the way back. This leaves 1000 - 2*333 = 334 bananas at the end of subdivision 1.

We then repeat for the remaining 2000 bananas. The second 1000 gets us a total of 668 bananas. For the final set, however, there's no need to go back, so we get a woppin' 1000 - 333 = 667 bananas, leaving 1335 bananas at the end of the first subdivision.

For the first to second subdivision, we start out with 1335 bananas. We go to the end of the second subdivision taking with us 1000 bananas. We eat 333, leaving 667. We have 335 back at the beginning of subdivision 1. Should we go get them? No. We'd eat another 333 bananas, get 335, and then eat 333 more, leaving only 2 bananas at the end of subdivision 2. So we stick with 667.

Now we take the 667 all the way home, a distance equal to 334 miles. This means we get 667 - 334 = 333 bananas to the town with n = 3.

The difficult part is choosing the correct number of subdivisions.

[Edited by - nilkn on September 18, 2005 5:43:40 PM]
I see you've already replied with the subdivision clue while I was typing [smile].

The solution I've tried first involves n = 4, like this:

The camel takes 1000 bananas a quarter of the way, leaving 500 and eating 250 on the way there and 250 on the way back.

The camel then takes another 1000 bananas, travels 1/4 of the way (eating 250 bananas), picks up 250 bananas to bring the total back to 1000, travels another 1/4 to the halfway point (eating 250), drops 250 bananas, and heads back (eating the 500 bananas left).

The camel then picks up the remaining 1000 bananas, travels to the 1/4 point (eating 250 bananas), picks up the 250 bananas left, travels on to the halfway point (eating 250), picking up the 250 bananas left there (bringing the total back to 1000), then travels the remaining 500 miles, eating 500 bananas, so there's 500 bananas left to sell when you reach the village.

Of course, you have to sell the camel in the village too!

I'm not sure if this is the best way, though, as I haven't done a formal proof.



TrapperZoid:

Your strategy is very similar to mine, so I worked out the math just for the sake of comparison:

Subdivision 1
-------------
* We initially have 3000 bananas
* We take 1000 and go to the 250 mile mark. We eat 250 on the way, leaving 750.
* We drop 500, and go back, leaving 0.
* We pick up another 1000, go back, drop another 500, and come back.
* We get the final 1000, go back and drop all we have (because we don't need to go back again), giving 1750 bananas at the 250 mark.

Subdivision 2
-------------
* We initially have 1750 bananas
* We take 1000 and go to the 500 mile mark. We eat 250 on the way, leaving 750 in our possesion.
* We drop 500, go back, giving us 0 in our possession.
* We pick up the remaining 750, go forward 250 miles, and drop all we have (500). This puts 500 + 500 = 1000 bananas at the half-way mark.

Subdivision 3
-------------
* We initially have 1000 bananas
* We take them all forward 250 miles, and drop the 750 remaining at the 750 mark.

Subdivision 4
-------------
* We initially have 750 bananas.
* We take them all forward 250 miles, ultimately giving us 500 bananas at the town.

Whew! So our methods are, at least for n = 4, equal.

The question, however, is if the delivered bananas increases with the number of subdivisions (it does).
I probably shouldn't be skiving off to do maths puzzles, but I just can't resist them...

I think I was wasting bananas with my n = 4 attempt with travel times, so I'll set n to be the maximum it can possibly be: 1000.

So the camel will travel one mile, drop off 998 bananas, and travel back. Repeating this way three times will leave us at the one mile mark with a cache of 1996 bananas with the camel carrying 999 bananas, giving us a grand total of 2995 bananas.

I was thinking that every subsequent mile will cost us 5 bananas to move the bananas, which means the cost will be 5 times 1000 miles, which is too many bananas. However, we won't have to make three trips for every mile, as the stock is decreasing.

After 200 miles, the camel will have eaten 1000 bananas (so there's 2000 left), so we only need to make two trips, for a cost of three bananas.

After 333 1/3 more miles (533 1/3 miles), the camel will have eaten another 1000 bananas. Now there's no point leaving a cache, so the camel should just go for the village. I probably should round this up to 334 miles, so that's 534 miles total with 1002 bananas eaten this leg: 998 left, 466 miles to go.

The camel will eat 466 bananas on the final leg, so that's 532 bananas when the camel reaches the village. That's 32 bananas better than last time!
Quote:Original post by Trapper Zoid
The camel will eat 466 bananas on the final leg, so that's 532 bananas when the camel reaches the village. That's 32 bananas better than last time!


Yep. That's the answer I submitted, 532. [smile]

(though, I cheated a bit and wrote up a quick Python function to calculate it for me [grin])
Quote:Original post by nilkn
Yep. That's the answer I submitted, 532. [smile]

(though, I cheated a bit and wrote up a quick Python function to calculate it for me [grin])


Good to see our answers matched. I used to collect (and sometimes write) questions like this for an after school maths class, although they weren't quite as detailed as this one. Maybe I should post a few of my favourites...
Quote:Original post by nilkn
Quote:Original post by Trapper Zoid
The camel will eat 466 bananas on the final leg, so that's 532 bananas when the camel reaches the village. That's 32 bananas better than last time!


Yep. That's the answer I submitted, 532. [smile]

(though, I cheated a bit and wrote up a quick Python function to calculate it for me [grin])

Using n=1000, I conclude that no bananas will make it to town since they will all rot in the amount of time required to make it to town. [grin]
If I'm following your answer correctly, I think I found a way to get 533 bananas back to town. I think according to what you said, at mile 533 you have 1001 bananas left. Then instead of going back and forth to bring all your bananas, leaving you with 998 bananas, leave one banana behind and go from mile 534 with 999 bananas.

This topic is closed to new replies.

Advertisement