TransWikia.com

A camel transporting bananas

Puzzling Asked by user88 on May 22, 2021

A somewhat well-known puzzle is described as such:

You have a pile of 3,000 bananas. You wish to transport them to a place 1,000 miles away on the back of a camel; however, the camel can only carry a maximum of 1,000 bananas, and will eat one banana every mile it travels (and will not go anywhere if it does not have any bananas). However, you can load and unload as many bananas as you want anywhere. What is the most bananas you can bring over to your destination?

Obviously you can’t just load up 1,000 bananas and go, because the camel will have eaten them all by the time you get there.

I’d never figured out the answer by myself before. Does anybody have any insights into how to solve this problem and other problems like it?

15 Answers

Solution for $n$ bananas, where $n$ is the number of bananas you own, and $c$ is the number of bananas the camel can carry:

This is because, if the camel moves the bananas 1 mile at a time, he needs to make two trips for each load beyond his current capacity.

Define $t = lfloorfrac{n}{c}rfloor$ Therefore, the total number of miles the camel can reach is:

In particular, plugging in the given $n = 3000$ and $c = 1000$, we have that the camel can travel

To figure out how many bananas remain for a given distance,

For the first $1000$ miles, this number is just the distance beyond the total capacity:

Correct answer by durron597 on May 22, 2021

First of all, the brute-force approach does not work. If the Camel starts by picking up the 1000 bananas and try to reach point B, then he will eat up all the 1000 bananas on the way and there will be no bananas left for him to return to point A.

So we have to take an approach that the Camel drops the bananas in between and then returns to point A to pick up bananas again.

<---p1---><--------p2-----><-----p3---->
A---------------------------------------->B
-----> ------> -------->
<----- <------
-----> ------>
<-----
----->

Since there are 3000 bananas and the Camel can only carry 1000 bananas, he will have to make 3 trips to carry them all to any point in between.

When bananas are reduced to 2000 then the Camel can shift them to another point in 2 trips and when the number of bananas left are <= 1000, then he should not return and only move forward.

In the first part, P1, to shift the bananas by 1Km, the Camel will have to

  1. Move forward with 1000 bananas – Will eat up 1 banana in the way forward
  2. Leave 998 banana after 1 km and return with 1 banana – will eat up 1 banana in the way back
  3. Pick up the next 1000 bananas and move forward – Will eat up 1 banana in the way forward
  4. Leave 998 banana after 1 km and return with 1 banana - will eat up 1 banana in the way back
  5. Will carry the last 1000 bananas from point a and move forward – will eat up 1 banana

Note: After point 5 the Camel does not need to return to point A again.

So to shift 3000 bananas by 1km, the Camel will eat up 5 bananas.

After moving to 200 km the Camel would have eaten up 1000 bananas and is now left with 2000 bananas.

Hence the length of part P1 is 200 Km.

Now in the Part P2, the Camel needs to do the following to shift the Bananas by 1km.

  1. Move forward with 1000 bananas - Will eat up 1 banana in the way forward
  2. Leave 998 banana after 1 km and return with 1 banana - will eat up this 1 banana in the way back
  3. Pick up the next 1000 bananas and move forward - Will eat up 1 banana in the way forward

Note: After point 3 the Camel does not need to return to the starting point of P2.

So to shift 2000 bananas by 1km, the Camel will eat up 3 bananas.

After moving to 333 km the camel would have eaten up 1000 bananas and is now left with the last 1000 bananas.

Because it is a multiple of 3, after 333 times there is 1001 bananas left. Therefore, the camel must take 1000 bananas and then take 1 back with him to pick up the last banana, leaving him with 999 bananas. This would leave the camel at 334 km + 200 km, so the merchant only needs to travel 466 km, eating 1 banana for every km.

999 bananas - 466 bananas for each remaining km equals 533 bananas left at point B. Therefore, the merchant has 533 bananas to sell at point B.

Answered by skateboard34 on May 22, 2021

While the amount of bananas is larger than 2000, the camel will have to make 5 trips to shift them. At a cost of 1 banana per mile, this will cost 5 bananas per mile in total.
While the amount of bananas is larger than 1000, it takes 3 trips to shift them, so a total cost of 3 bananas per mile.
For the final stretch, it just takes a single banana per mile.

  1. 3000 - 2000 bananas (numbers given for first mile)
    1. Move 1000 bananas, feed 1, 2999 left.
    2. Go back, feed 1, 2998 left.
    3. Move 1000 bananas, feed 1, 2997 left.
    4. Go back, feed 1, 2996 left.
    5. Move 998 bananas, feed 1, 2995 left.
  2. 2000 - 1000 bananas (numbers given for first mile)
    1. Move 1000 bananas, feed 1, 1999 left.
    2. Go back, feed 1, 1998 left.
    3. Move 999 bananas, feed 1, 1997 left.
  3. 1000 bananas (numbers given for first mile)
    1. Move 1000 bananas, feed 1, 999 left.

So at 5 bananas/mile you're down to 2000 bananas after 200 miles. Your total mileage then improves to 3 bananas/mile for the next 333 miles. After that, you're on the home stretch and move at 1 banana/mile for the remaining 467 miles (after which you'll have 533 bananas left).

A few things to note:

  • It is not necessary to move in one mile increments. For the first stretch, you can load up with 1000 bananas, move 200 miles, unload 600, and use 200 for your return trip. You do the same thing again, and after the last trip, you can unload 800, or rather, load 200 to be at a full 1000 again.
  • After completing the 333 mile stretch, you're 467 miles away from your destination, with exactly 1001 bananas. There are now two solutions:
    1. Eat a banana (or leave it to rot) to have a nice, integer solution.
    2. Use it to move for a total of 333⅓ miles. If the camel needs to be fed after walking a full mile, you will now make it to your destination with ⅓ of a mile to spare, which should save you a banana, leaving you with 534 bananas.
      Congratulations, you're now banana king!

Answered by SQB on May 22, 2021

First leg of the journey:

  • Load 1000,
  • Drop 4 bananas every mile for 200 miles, feeding the camel from own supply.
  • The route is primed for 4 passes of the camel:
    • return
    • take another 1000 bananas
    • return
    • take remaining 1000 bananas.

Second leg, starting with mile 200:

  • load 1000
  • drop 1 banana a mile away, then 2 bananas every next mile for another 333 miles, for 534 miles total.
  • return
  • pick 1000 bananas
  • on the first mile eat a banana from own supply, then continue using the ones left.
  • arrive at 534th mile with 999 bananas.

Third leg of the journey:

  • Feed the camel the last banana on the ground, then starting with 535th mile, keep using bananas from your supply of 999.
  • use up 465 bananas from own supply for the remaining 465 miles.

You're left with 999-465 = 534 bananas.

Answered by SF. on May 22, 2021

I have a solution that has a better result than 534. I'm not sure it is the best solution.

Answered by duckman1611 on May 22, 2021

This is the best answer that does not require stopping every mile. Take

go

and drop off

Go back and repeat 2 more times. Now you are on mile

Go back and repeat. Now you are on mile

Answered by Martin on May 22, 2021

  1. Load up camel with 1000 bananas. Travel 500 miles, leaving 500 bananas. Dump them there.

  2. Do same trip again and leave 500 bananas at 500 mile mark.

  3. Do same trip again and pick up one of the 500 banana piles when you hit the 500 mile mark. Now you are at 1000 again.

  4. at 750 mile mark, drop your (now 750) bananas

  5. Go back to mile 500, pick up your 500 bananas

  6. Go to mile 750, and now you have 250 left

  7. Pick up your 750 that you previously left

  8. Now you have 1000 at mile 750

  9. Walk the remaining 250 miles, leaving 750

  10. Eat one for yourself and market the remaining 749 bananas.

749! Woo Hoo!

***Edit: I was basing mine off 538's recent Riddler, which says that the camel can travel w/o bananas as long as he doesn't sniff any bananas. So, whoops!

http://fivethirtyeight.com/features/how-many-bananas-does-it-take-to-lead-a-camel-to-market/

Answered by Phil Wells on May 22, 2021

Here is my solution, where camel arrives with 500 bananas:

  1. Load 1000 bananas, travel 250 miles (point A), unload 500 bananas, use 250 remaining to go back.
  2. Load 1000 bananas, travel 250 miles to point A, load 250 bananas (so camel has 1000 bananas again, with 250 remaining at point A), travel 250 miles more (point B), unload 500 bananas, travel 250 miles to point A, load 250 there, travel back to the starting point.
  3. Load 1000 bananas, go 500 miles to point B, load 500 bananas there, arrive to the destination with 500 bananas.

Now, since the right answer is 534, the question is: where did I lose 34 bananas?

Answered by beetoom on May 22, 2021

  1. Load up 1000 bananas. Go forward 200 miles. Drop down 600 bananas. Go backward 200 miles to start point.
  2. Load up 1000 bananas. Go forward 200 miles, here pick up 200 bananas. Go forward 333.5 miles. Drop down 333 bananas. Go backward 333.5 miles, here pick up 200 bananas. Go backward 200 miles to start point.
  3. Load up last 1000 bananas. Go forward 200 miles, here pick up last 200 bananas. Go forward 333.5 miles here pick up last 333 bananas. Go forward 466.5 miles to finish, and here drop down last 533 bananas.

You will made 7 loads, 3 unloads and 2 come backs.

Answered by Виктор Хорошилов on May 22, 2021

The traditional text of the problem is that the camel will eat 1 banana per mile if there is banana to eat. In this case...

Answered by jorge sampaio on May 22, 2021

Short and Concise solution,



Finally,


Answered by Saurav on May 22, 2021

to move 3000 bananas by 1 km, camel consumes 5 bananas which with five trips. so not when number of bananas are less than or equal to 2000 the trips required is 3. so to consume 1000 bananas 5x = 1000 move 3000 bananas for x=200 miles ( 5 trips). we are left with 2000 bananas.

now we have 2000 bananas and we can move bananas in 3 trips

3x =1000 move 2000 bananas for x=333 miles. we are left with 1000 bananas again.

now total distance traveled is 533 miles and left with 467 miles. we are left with 1000 bananas. camel can take these bananas in 1 trip. so 1000-467=533

Answered by user64643 on May 22, 2021

  1. Load 1000 bananas, go 400 miles, leave 200 bananas, and return.
  2. Repeat #1. Now you have 400 bananas 600 miles from market.
  3. Load the last 1000 bananas and stop to pick up 400 bananas. Now you have 600 miles to go with 1000 bananas. You have 400 bananas to sell, unless you want to give your camel a treat.

or

  1. Load 1000 bananas, go1 mile leave 998 bananas, and return.
  2. Repeat #1. Now you have 1996 bananas 999 miles from market.
  3. Load the last 1000 bananas and stop at mile 1. Now you have 999 miles to go and 2995 bananas.

1 mile cost you 5 bananas or set up as a ratio - miles:bananas or 1:5.

Subtract 1000 bananas off the top because that's the most your camel can carry on the last load. Use the 2000 bananas to make a ratio equivalent to 1:5 or 1/5 = x/2000 x = 400 miles.

So if you repeat steps 1 - 3 till you only have 1000 bananas left, you will have covered 400 miles. Now you have 600 miles to go with 1000 bananas. You have 400 bananas to sell, unless you want to give your camel a treat.

Answered by user69912 on May 22, 2021

$533.(3)$

Let's do it as follows: Last span will be $x$ miles, and final answer is $1000-x$ bananas delivered. Next to last span will be $y$ miles, we would do best if each ride starts with 1000, i.e. $2000 -3y = 1000$ should hold to get to 1000 left for the last span. Hence $y = frac{1000}{3}$.

Now to get to 2000 from 3000 we will need 3 trips on path of length $z$, doing it optimally (starting with 1000 each trip), gets us to $3000-5z = 2000$, i.e. $z = frac{1000}{5} = 200$.

Answered by az20019 on May 22, 2021

Its pretty sure that, If the camel takes all the 1000 bananas at once to the end point,he would be left with 0 bananas at the end. So, there needs to some Intermediate Points that are in between O km and 1000 km.

So, to prove my point, Let us assume 4 points.

let's called point A------>Beginning Point point B------> End Point point Q------>First Intermediate Point point W------>Second Intermediate Point

3000 2000 1001 533
<------5X----------> <----3Y-----> <------------Z---------------------> A--------------------Q-------------W------------------------------------B

If we take 1000 bananas at once to 1km,then there will be 3 trips forward, and 2 trips backward, so , there will be a total of 5 trips.

A<----------5x---->Q so, When we take 1000 bananas, we are only left with 600 bananas and similarly for the other one, but for the last one, there will be only 1 forward trip and so, its a total of 5 trips. Let's prove that with a simple equation,

3000-5X=2000 X=200 So, Point Q is 200km away from the begining.

Now, we are only left with 2000 bananas, and taking it to W, As we are only left with 2000 bananas, we can make a maximum of 2 trips forward, and 1 trip backward.

Q<-----3Y------>W It can be understood as we have only 2000 bananas left, and the camel can take 1000 bananas a time.

Let's find the distance with the Equation, 2000-3Y=1000 So, Y=333. But as the Camel is eating 1 banana per km,so, it can't be in fraction, thus, Y=333 As we reduced the term, so, will increase 1 banana,i.e, 1000+1=1001.

Again,there will only be 1 last trip, with the remaining distance, 1000-200-333=467. So, Remaining Distance=467. And 1000-467=533

Thus, total Bananas reached at destination=533.

Answer->533

Answered by Zenith Peterburg on May 22, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP