T.R | Title | User | Personal Name | Date | Lines |
---|
1850.1 | Easy. | CADSYS::COOPER | Topher Cooper | Fri Mar 11 1994 12:15 | 6 |
| He takes along and consumes 4 quarts (depending on exactly what
"consumes one quart for every mile" means he might get away with 3).
Or were you assuming he would survive the task? :-)
Topher
|
1850.2 | | AFSRTL::GILBERT | | Fri Mar 11 1994 18:45 | 1 |
| My fault. I neglected to mention that the servant must _return_. Alive.
|
1850.3 | 12 Quarts | STEVEN::HOBBS | | Fri Mar 11 1994 19:51 | 29 |
| Here is a 14 quart solution.
Start with 5 quarts, go 1 mile, drop 3 quarts, return;
(3 quarts stored 1 mile out).
Start with 5 quarts, go 1 mile, pick up 1 quart, go 1 more mile,
drop 3 quarts, return 1 mile, pick up 1 quart return;
(3 quarts stored 2 miles out, 1 quart stored 1 mile out).
Start with 4 quarts, go 2 miles, pick up 2 quarts (leaving 1),
go 2 more miles, plant flag, return 2 miles, pick up the 1 stored
quart, return 1 more mile, pick up 1 stored quart, return.
There are other 14 quart solutions.
If fractions are allowed then here is a 12 quart solution:
Start with 5 quarts go 1.5 miles drop 2 quarts, return;
(2 quarts stored 1.5 miles out).
Start with 2 quarts, go 0.5 mile, drop 1 quart, return;
(2 quarts stored 1.5 miles out, 1 quart stored 0.5 mile out)
Start with 5 quarts, go 0.5 mile, pick up 0.5 quart, go 1 mile,
pick up 1 quart, go 2.5 miles, plant flag, return 2.5 miles,
pick up 1 quart, return 1 mile, pick up 0.5 quart, return 0.5 mile.
I believe that 12 quarts the minimum solution.
|
1850.4 | 10 quarts | NOVA::FINNERTY | Sell high, buy low | Mon Mar 14 1994 14:45 | 18 |
|
there's a 10 quart solution if the poor wretch doesn't need to drink
until he finishes the mile, assuming that there's plenty of water
to drink at the start point.
go to mile 1, drink a quart & drop a quart; (hold 3 quarts)
go to mile 2, drink a quart & drop a quart; (hold 1 quart)
return to mile 1, drink a quart
return to home, drink up, and gather 5 more quarts.
go 4 miles to the flag, drink 4 quarts
return to mile 3, drink a quart
return to mile 2, drink the quart that's on the ground
return to mile 1, drink the quart that's on the ground
return home, drink up.
|
1850.5 | You're getting there | RTL::GILBERT | | Mon Mar 14 1994 22:47 | 6 |
| Re: .4
Sorry, that's a 12-quart solution, since the 'poor wretch' travels
12 miles thru the desert.
Re: .3
Steve's 12-quart solution is very good. But not quite optimal.
|
1850.6 | 10 | NOVA::FINNERTY | Sell high, buy low | Tue Mar 15 1994 08:40 | 15 |
|
re: -.1 that's 12, not 10
no it's not. Under the assumption that he gets to drink the quart
at the *end* of each mile. Since he ends two of the 12 miles back
at 'home base', he can drink from a well rather than from the water
in a carried bottle.
for example, how much water does the poor wretch need to carry to
go one mile out and come one mile back? just 1, assuming he can
drink from a well when he returns.
...now if you want to allow him to fill his bottles from the well
but not drink from it, that's a different story (and a different
problem).
|
1850.7 | Continuous | WIDGET::KLEIN | | Tue Mar 15 1994 17:40 | 4 |
| I think he consumes water continuously, similar to the way an automobile
consumes gasoline.
-steve-
|
1850.8 | Continuous consumption ==> differential results | VMSDEV::HALLYB | Fish have no concept of fire | Tue Mar 15 1994 20:26 | 11 |
| > I think he consumes water continuously, similar to the way an automobile
> consumes gasoline.
A reasonable restriction but not well stated in .0.
According to an old manuscript I have this disagreement over the rules,
or one like it, has existed in various forms since about 800 A.D.
John
(The DEC solution: 2 guys with 6 quarts instead of 1 guy with 12 :-)
|
1850.10 | Generalize | RTL::GILBERT | | Mon Mar 21 1994 12:43 | 4 |
| Ayup, the 'correct' solution has him consume water continuously.
BTW, there is a fairly elegant solution which generalizes to other
distances, carrying capacities, and consumption rates.
|
1850.11 | 11.5 quarts | STEVEN::HOBBS | | Mon Mar 28 1994 19:06 | 17 |
| All right, here is the minimum solution which I found by working
backwards--computing the last trip first. It requires 11.5 quarts.
Trip 1: Start with 1.5 quarts, go 0.25 mile, drop 1 quart, return 0.25
mile. (1 quart stored 0.25 mile out).
Trip 2: Start with 5 quarts, go 0.25 mile, pick up 0.25 quart, go 1.25
miles, drop 2.5 quarts, return 1.25 miles, pick up 0.25 quart, return
0.25 mile. (0.5 quarts stored 0.25 mile out and 2.5 quarts stored 1.5
mile out).
Trip 3: Start with 5 quarts, go 0.25 mile, pick up 0.25 quart, go 1.25
mile, pick up 1.25 quarts, go 2.5 miles, plant flag, return 2.5
quarts, pick up 1.25 quarts, return 1.25 miles, pick up 0.25 quart,
return 0.25 mile.
I now believe that 11.5 quarts is the minimum.
|
1850.12 | Right! (now how about the general case?) | RTL::GILBERT | | Tue Mar 29 1994 12:54 | 0
|