English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

the pow is the follow:

Pow 13 - Corey Camel

Consider the case of Corey Camel - the enterprising but eccentric owner of a small banana grove in a remote desert oasis. Corey's harvest, which is worth its weight in gold, consists of 4000 bananas. The marketplace where the harvest can be sold is 1000 miles away. However, Corey must walk to the market, and she can carry at most 1000 bananas at a time. Furthermore, being a camel, Corey eats one banana during each and every mile she walks (so Corey can never walk anywhere without bananas).

The question is this:
How many bananas can Corey get to the market?

2007-11-22 12:42:15 · 3 answers · asked by hect100 1 in Science & Mathematics Mathematics

3 answers

It is 1 banana.

She can carry 1000 and eats one during every mile she walks, and she's walking 1000 miles:
So
During Mile Banana eaten
1 1
2 2
3 3
.
.
.
999 999

Once you reach 1000 miles, you aren't going anywhere, so there is no during the 1000th mile, the last mile you walk during is the 999th miles. This leaves 1 banana left because Corey ate 999

2007-11-22 12:52:25 · answer #1 · answered by McDudette 3 · 0 0

This is one of the old-chestnut logistics problems (similar to the US Army fuel-truck depot question).

At each step if she carries 1000 bananas and plans to walk a distance d and return, she needs 2d bananas as overhead for feed and thus can only deliver (1000-2d) bananas.
(In the last step she does not need to return and can thus deliver (1000-d) bananas.)

So the solution will involve dropping depots of bananas at some distance (distances not necessarily symmetrical or uniform).

Consider a general solution using n depots.
(the 0'th depot is D0 = 4000 at distance 1000)
Call S the maximum number of bananas finally delivered for sale.

Let the location of the i'th depot (Di) be x_i.
Then the distance y_i between the i'th and (i-1)'th depots is x_i - x_(i-1) = y_i.

The i'th leg involves making several trips to move the entire (i-1)'th depot D_i-1 to the i'th depot Di will take
t_i = ⌈ D_(i-1) / 1000 ⌉ trips (can only carry 1000 at a time), which will involve traversing the distance between them (2t_i -1) times, and that distance is y_i.

Thus D_i = D_(i-1) - (2t_i -1) y_i

We could use this to solve for y_i if we knew D_i, D_(i-1), t_i:
y_i = (D_i - D_(i-1)) / (2t_i -1)

Then consider D_i / D_(i-1) = 1 - ((2t_i -1) y_i /D_i)
and let us define the quantity r_i = y_i/D_i
Each r_i is a number of our choosing from 0 to ∞

So for the case of 1 trip on the i'th leg: 0< t_i ≤1,
D_i / D_(i-1) = 1 - ((2(1) -1) y_i /D_i)
= 1 - r_i

For the case of 2 trips: 1< t_i ≤2,
D_i / D_(i-1) = (1 - 3r_i)

For the case of 3 trips: 2< t_i ≤3,
D_i / D_(i-1) = (1 - 5r_i)

For the case of 4 trips on the i'th leg: 3< t_i ≤4,
D_i / D_(i-1) = (1 - 7r_i)

So to summarise, for the first few legs, we start off by needing t_i=4 trips between depots for as long as each depot D_i>3000. Then when the depot size falls to 3000≥D_i≥2000, we only need t_i=3 trips. For 2000≥D_i≥1000, we need t_i=2 trips. Finally for 1000≥D_i, we only need t_i=1 trip to finish.

_____________________________________________
[ALGEBRAIC METHOD]

Now since we know the individual ratios, we can compute the the final quantity brought to market (S) :
S/D0 = Product_i=1_n ( D_i / D_(i-1) )
= Π_i=1_n ( D_i / D_(i-1) )
So note as above, we said the rightmost factors ( D_i / D_(i-1) ) corresponding to the first few trips require t=4 legs, thus they have the form (1 - 7r_i).
Then we have some factors (1 - 5r_i), then some factors (1 - 3r_i), then on the left some factors (1 - r_i).

Thus S/D0 = Π_i=1_n ( D_i / D_(i-1) )
=(1-r_n)...(1-r_i''''') * (1-3r_i'''')...(1-3r_i''') * (1-5r_i'')...(1-5r_i') * (1-7r_i)...(1-7r_1)
where we don't know the indices, i.e. we don't know how many factors of each type we have.

Now we also have the total distance constraint that Σ y_i = 1000

So we are trying to maximize
S/D0 = Π_i=1_n ( D_i / D_(i-1) )
subject to the constraint
Σ y_i = Σ D_i * r_i = 1000

_____________________________________________
[HEURISTIC METHOD]

I think it is best to solve this iteratively, i.e. first calculate how much distance we can cover before we are down to D_a≤3000 bananas at the a'th depot?
This covers (say) the first m legs, i.e. the first m factors in our product.
It actually turns out it really doesn't matter how many individual legs are involved within each segment of legs where each leg has 4 trips.
All that matters is the eventual size of the depot D_a at the total distance y_a over all those 4-leg trips:
(D_0 -D_a)/7 = (D_(a-1)-D_a)/7 + ... + (D_-D_2)/7 + (D_0-D_1)/7

So the net result for the 4-leg trips is:
(D_0 -D_a)/7 = y_a (where y_a = Σ y_i over those legs)

.. the net result for the 3-leg trips is:
(D_a -D_b)/5 = y_b

.. the net result for the 2-leg trips is:
(D_b -D_c)/3 = y_c

.. the net result for the final 1-leg trip is:
(D_c -S)/1 = y_d

Substituting Σ y_i = 1000 gives
y_a + y_b + y_c + y_d = 1000
= (D_c -S)/1 + (D_b -D_c)/3+ (D_a -D_b)/5 + (D_0 -D_a)/7
= -S + 2D_c/3+ 2D_b /15 + 2D_a /35 + 2D_0 /7
1000 = -S + 2D_c/3+ 2D_b /15 + 2D_a /35 + 2D_0 /7

As noted we can determine the total distance (y_a) covered by all the 4-leg trips where D_a=3000, D_0=4000
y_a = (D_a - D_0) / (2t_i -1)
= (4000-3000) / 7 = 1000/7 = 142.9
This gives D_a=3000 @ 1000/7 ml

... and the total distance (y_b) covered by all the 3-leg trips where D_b=2000, D_a=3000
y_b = (D_b - D_a) / 5 = 1000/5 = 200ml
This gives D_b=2000 @ 1000(1/5 +1/7) ml from start

... and the total distance (y_c) covered by all the 2-leg trips where D_c=1000, D_b=2000
y_c = (D_b - D_c) / 3 = 1000/3 = 333ml
This gives D_c=1000 @ 1000(1/3 + 1/5 +1/7) ml from start

Finally the last trip is 1-leg and we have:
where S=?,D_c=1000
y_d = (D_c - S) / 1
S = D_c - y_d = D_c - (1000-1000(1/3 + 1/5 +1/7))
y_d = 1000 - y_c -y_b -y_a
S = 1000(1/3 + 1/5 + 1/7)
= 676 bananas [SOLUTION]

In retrospect we could have found this directly from the above eqn:
1000 = -S + 2D_c/3+ 2D_b /15 + 2D_a /35 + 2D_0 /7
Substituting D_c=1000,D_b=2000,D_a=3000,D_0=4000
S = -1000 + 2(1000)/3+ 2(2000) /15 + 2(3000) /35 + 2(4000)/7
S/1000 = -1 + 2/3+ 4/15 + 6/35 + 8/7
S/1000 = 2/3 + 4/15 + 6/35 + 1/7
S/1000 = 1/7 + 2/3 + 2*2/3*5 + 2*3/5*7
where the 1/7 factor came from (2(D_0/S) - 1)/7

2007-11-22 20:47:16 · answer #2 · answered by smci 7 · 0 0

dude, i have the same POW, and its due on Monday, and i still don't know the answer...

but try ratios.
like, if Corey had 45 bananas, then she would sell 8 bananas. Now, Corey has 4,000 bananas, so she would sell..... 711.111111...

good luck to me and you.

2007-11-24 17:19:19 · answer #3 · answered by bugsandtweety 3 · 0 0

fedest.com, questions and answers