Camels and Bananas
Moderators: jestingrabbit, Moderators General, Prelates

 Posts: 12
 Joined: Sun May 31, 2009 7:20 pm UTC
Camels and Bananas
You have 3,000 bananas and a camel which can carry at most 1,000 bananas at a time. The camel eats a banana before moving a unit. You want to transport the bananas 1,000 units. What is the maximum number of uneaten bananas that you can move 1,000 units?
Last edited by uzurpatorul on Sun May 31, 2009 11:11 pm UTC, edited 1 time in total.

 Posts: 77
 Joined: Mon Apr 20, 2009 7:56 pm UTC
Re: Camels and Banans
can you drop the bananas like half way? and go back for the rest? like take 1000, walk 2 units, drop, go back for another 1000 ect?

 Posts: 13
 Joined: Sun May 31, 2009 9:27 pm UTC
Re: Camels and Banans
assuming that you can drop the bananas and come back like silvermace said, i think i have solved it:
Spoiler:

 Posts: 12
 Joined: Sun May 31, 2009 7:20 pm UTC
Re: Camels and Bananas
You can create "refueling" station along the path, like take 1000 bananas, move 250 unites, leave 500 bananas and go back for more

 Posts: 286
 Joined: Tue Aug 22, 2006 10:35 pm UTC
 Contact:
Re: Camels and Banans
EricSeverson wrote:assuming that you can drop the bananas and come back like silvermace said, i think i have solved it:Spoiler:
You have forgotten the fact that the camel does not move backwards for free.
GENERATION 1i: The first time you see this, copy it into your sig on any forum. Square it, and then add i to the generation.
Re: Camels and Bananas
Spoiler:
edit: I think I got it wrong the first time around .
Last edited by Poohblah on Mon Jun 01, 2009 5:02 am UTC, edited 2 times in total.

 Posts: 13
 Joined: Sun May 31, 2009 9:27 pm UTC
Re: Camels and Bananas
Greedy you are right. I thought the camel just ate a banana as a result of carrying it, but its more like the bananas are the fuel that makes the camel move.
Anyhow, I still use the same method and I got to what should be the correct answer.
Anyhow, I still use the same method and I got to what should be the correct answer.
Spoiler:
Last edited by EricSeverson on Mon Jun 01, 2009 4:59 am UTC, edited 1 time in total.
Re: Camels and Bananas
EricSeverson wrote:Spoiler:
I just realized that after I posted. fixed and now I have the same answer as you
Seems that lordatog has a better answer though.
 jestingrabbit
 Factoids are just Datas that haven't grown up yet
 Posts: 5963
 Joined: Tue Nov 28, 2006 9:50 pm UTC
 Location: Sydney
Re: Camels and Bananas
I'm pretty sure that we've done something very like this before, but my searching isn't up to scratch today. Anyway,
Note that I've assumed the existence of fractional bananas.
Spoiler:
Note that I've assumed the existence of fractional bananas.
ameretrifle wrote:Magic space feudalism is therefore a viable idea.
Re: Camels and Bananas
EricSeverson wrote:it takes you 6 bananas for every unit you move because you are going there and back 3 times.
no. It takes you five bananas for every unit because you are going forward three times, but only back twice. If you go back a third time, you end up where you started and you would have to go forward again (requiring an additional banana, to make 7) but you don't need to do that because you already moved all of the bananas one unit.
once you have less than 2000 bananas it will only take 3 to move them all (up, back, up)
you must always make an odd number of moves or you will end up back where you started.
 Cosmologicon
 Posts: 1806
 Joined: Sat Nov 25, 2006 9:47 am UTC
 Location: Cambridge MA USA
 Contact:
Re: Camels and Bananas
So, assuming fractional bananas can be consumed, the farthest the camel can travel, starting with 3000 bananas, is:Approximately (to the nearest 1000 is fine) how many bananas does the camel need to start with in order to travel 4000 units? The camel doesn't need to have any bananas left over.
Spoiler:
 skeptical scientist
 closedminded spiritualist
 Posts: 6142
 Joined: Tue Nov 28, 2006 6:09 am UTC
 Location: San Francisco
Re: Camels and Bananas
Spoiler:
I'm looking forward to the day when the SNES emulator on my computer works by emulating the elementary particles in an actual, physical box with Nintendo stamped on the side.
"With math, all things are possible." —Rebecca Watson
"With math, all things are possible." —Rebecca Watson

 Posts: 13
 Joined: Sun May 31, 2009 9:27 pm UTC
Re: Camels and Bananas
aduubian pointed out yet another flaw with the numbers i was crunching...
Spoiler:
 jestingrabbit
 Factoids are just Datas that haven't grown up yet
 Posts: 5963
 Joined: Tue Nov 28, 2006 9:50 pm UTC
 Location: Sydney
Re: Camels and Bananas
Okay, question that I do not know the answer to.
Same situation: the destert is 1000 units of distance to cross, there is one camel and it takes 1 banana to travel one unit of distance (I assume that the camel is skating on the skins of the bananas as I'm pretty sure they don't eat them (banana=jungle, camel=desert)), furthermore it takes the camel 1 day to travel 1000 units of distance, and the side that the camel starts on has an infinite supply of bananas.
What is the best way to transport bananas across the desert? Here, best is measured as bananas that are left on the far side of the desert per day.
So, for instance, the solution that we have now is such that it takes 2 7/15 days to travel the distance, and 533 1/3 bananas are delivered, so it has a rate of 8000/37 bananas per day when it arrives on the far side of the desert. But it can't get back, so its rate of bananas delivered per day slowly drops to 0 ie this sucks for the long term banana trade.
Same situation: the destert is 1000 units of distance to cross, there is one camel and it takes 1 banana to travel one unit of distance (I assume that the camel is skating on the skins of the bananas as I'm pretty sure they don't eat them (banana=jungle, camel=desert)), furthermore it takes the camel 1 day to travel 1000 units of distance, and the side that the camel starts on has an infinite supply of bananas.
What is the best way to transport bananas across the desert? Here, best is measured as bananas that are left on the far side of the desert per day.
So, for instance, the solution that we have now is such that it takes 2 7/15 days to travel the distance, and 533 1/3 bananas are delivered, so it has a rate of 8000/37 bananas per day when it arrives on the far side of the desert. But it can't get back, so its rate of bananas delivered per day slowly drops to 0 ie this sucks for the long term banana trade.
ameretrifle wrote:Magic space feudalism is therefore a viable idea.

 Posts: 286
 Joined: Tue Aug 22, 2006 10:35 pm UTC
 Contact:
Re: Camels and Bananas
Spoiler:
That's 11 days for 2 bananas, or 2/11 bananas per day, sustainable. And it scales directly to a 1000camel in a 1000desert.
GENERATION 1i: The first time you see this, copy it into your sig on any forum. Square it, and then add i to the generation.
Re: Camels and Bananas
I was too lazy to verify your day count or to look for the differences between your method and mine, but I get a better ratio.
That's 7.5 days for 2 bananas.
Spoiler:
That's 7.5 days for 2 bananas.
Re: Camels and Bananas
EricSeverson wrote:aduubian pointed out yet another flaw with the numbers i was crunching...Spoiler:
I confirm this reasoning is optimal. However, if fractional bananas are not allowed, I have a method that gets one more banana moved 1000 places than you claim to. Basically, it's leapfrog.
Spoiler:
wee free kings
 skeptical scientist
 closedminded spiritualist
 Posts: 6142
 Joined: Tue Nov 28, 2006 6:09 am UTC
 Location: San Francisco
Re: Camels and Bananas
GreedyAlgorithm wrote:Spoiler:
That's 11 days for 2 bananas, or 2/11 bananas per day, sustainable. And it scales directly to a 1000camel in a 1000desert.
You are miscounting. B already includes A, so to do C, you need only do B, then A, then go to distance 3, for a total of 6+2+6=14 units of distance traveled. When you do D, you need only do C, then B, then A, then go to distance 4, for a total of 14+6+2+8=30 units of distance traveled, taking 7.5 days, which is exactly the same as yat's.
I'm looking forward to the day when the SNES emulator on my computer works by emulating the elementary particles in an actual, physical box with Nintendo stamped on the side.
"With math, all things are possible." —Rebecca Watson
"With math, all things are possible." —Rebecca Watson
Re: Camels and Bananas
Yes I suspected both solutions were the same, only in a different order.
Now, for 1000, if I apply the same method...
The global speed of the process, in bananas per day is 1000*998^{1000}/(1000^{1000}998^{1000})
Ok, now I don't know how to calculate this, but as I also solved the thing with non integer bananas quantity, this should be close to e^{2}/(1e^{2})
Now, for 1000, if I apply the same method...
Spoiler:
Ok, now I don't know how to calculate this, but as I also solved the thing with non integer bananas quantity, this should be close to e^{2}/(1e^{2})
Re: Camels and Bananas
Yat wrote:Time for generalisation, for now it founds itself at kilometer n with 998^{n}*1000^{1000n}+1 bananas, leaves one behind, which allow it to bring 998^{n}*1000^{1000(n+1)} cargos at kilometer n+1, where it finds himself with a total of 998^{n+1}*1000^{1000(n+1)}+1 bananas. Recursion: it works, bitches!
Fix'd.
Re: Camels and Bananas
For the original question (assuming whole numbers of bananas only):
If fractions are allowed, then I think that Jestingrabbit's solution is optimal .
Spoiler:
If fractions are allowed, then I think that Jestingrabbit's solution is optimal .
Re: Camels and Bananas
Moonbeam wrote:For the original question (assuming whole numbers of bananas only):Spoiler:
If fractions are allowed, then I think that Jestingrabbit's solution is optimal .
I think you can do it with one more banana, if we assume units and bananas are discrete.
Spoiler:
Oh, and for the 4000 unit question,
skeptical scientist wrote:Spoiler:
Spoiler:
Re: Camels and Bananas
OK, this is going to take shape as I type it, because I haven't worked out the math yet, and working it out while typing will probably be easiest.
Spoiler:
 skeptical scientist
 closedminded spiritualist
 Posts: 6142
 Joined: Tue Nov 28, 2006 6:09 am UTC
 Location: San Francisco
Re: Camels and Bananas
Avin wrote:skeptical scientist wrote:Spoiler:Spoiler:
That's a good point. The euler constant is pretty big relative to 4, as is ln(2), so both make significant contributions here. A better estimate could be gotten from 1+1/3+1/5+1/7+1/9+...+1/(2n1)=H_{2n1}H_{n1}/2≈γ+ln 2n(γ+ln n)/2≈γ/2+ln 2+(ln n)/2. Solving for n, we get n≈e^{8γ2ln 2}≈418.4, so we need about 419,000 bananas.
I'm looking forward to the day when the SNES emulator on my computer works by emulating the elementary particles in an actual, physical box with Nintendo stamped on the side.
"With math, all things are possible." —Rebecca Watson
"With math, all things are possible." —Rebecca Watson
Re: Camels and Bananas
You can do 4000 with
Spoiler:
Don't pay attention to this signature, it's contradictory.
Re: Camels and Bananas
Avin wrote:I think you can do it with one more banana, if we assume units and bananas are discrete.Spoiler:
Yes, and if we make the assumption that the camel can eat multiple bananas ahead of time, storing the energy as camels are wont to do, we can easily get a thousand bananas across the desert in one go.
wee free kings
Who is online
Users browsing this forum: No registered users and 9 guests