A farmer needs 8 gallons of water. He has only three unmarked buckets, two 6 gallon and one 11 gallon bucket.
How can he collect 8 gallons of water using three unmarked buckets? Provide solution with minimal water wastage.
(In reply to
Quenched by Nick Hastings)
Following this through I make it that you wasted 16 gallons: 5 gallons the first time the 11 gallon bucket is emptied and all 11 gallons the second time it's emptied. This can be reduced to only wasting 10 gallons. For simplicity I'll represent each step with four numbers showing the total in each bucket and the amount wasted so far as follows:
6G1;6G2;11G;waste
0;0;0;0
6;0;0;0 - fill 6G1
0;0;6;0 - empty 6G1 into 11G
6;0;6;0 - refill 6G1
1;0;11;0 - fill 11G from 6G1 leaving 1gall in 6G1
1;6;5;0 - fill 6G2 from 11G leaving 5gall in 11G
1;6;0;5 - waste contents of 11G
1;0;6;5 - empty 6G2 back into 11G
1;6;6;5 - refill 6G2
1;1;11;5 - fill 11G from 6G2 leaving 1gall in 6G2
2;0;11;5 - transfer contents of 6G2 to 6G1
2;6;5;5 - fill 6G2 from 11G
2;6;0;10 - waste contents of 11G
0;0;8;10 - pour contents of 6G1 and 6G2 into 11G
Hey presto, 8 gallons in the 11 gallon bucket and only 10 gallons wasted.
|
Posted by fwaff
on 2003-07-09 06:18:16 |