You have a five cup mug, a three cup mug, a water supply, a sink with a drain, and a packet of instant coffee which when dissolved in one cup of water produces coffee of strength 100%.
The packet may be used at any time, but the entire contents of the packet must be dissolved into a single mug when it is used.
Your task is to fix 4 cups of coffee at exactly 16% strength.
For simplicity sake, let's pretend there are 100 grains of instant
coffee in the packet. The notation below is the number of cups of
water in each mug with the number of instant coffee grains in
parentheses.
Whenever we "pour" from one mug into the other, we pour as much as we can without spilling.
5-cup mug 3-cup mug
0 (0) 0 (0) (Start)
0 (0) 3 (0) (fill up the 3-mug)
3 (0) 0 (0) (pour 3-mug into 5-mug)
3 (0) 3 (0) (fill up the 3-mug)
5 (0) 1 (0) (pour 3-mug into 5-mug)
0 (0) 1 (0) (empty the 5-mug)
1 (0) 0 (0) (pour 3-mug into 5-mug)
1 (0) 3 (0) (fill up the 3-mug)
4 (0) 0 (0) (pour 3-mug into 5-mug)
4 (100) 0 (0) (use coffee in 5-mug)
4 (100) 3 (0) (fill 3-mug)
5 (100) 2 (0) (pour 3-mug into 5-mug)
4 (80) 3 (20) (pour 5-mug into 3-mug)
4 (80) 0 (0) (empty the 3-mug)
4 (80) 3 (0) (fill up the 3-mug)
5 (80) 2 (0) (pour 3-mug into 5-mug)
4 (64) 3 (16) (pour 5-mug into 3-mug)
And now we've got what we wanted in the 5-cup mug.
Perhaps there is a more efficient way to do it.
|
Posted by Thalamus
on 2004-06-25 14:24:12 |