Four Gallons in a Five Gallon Bucket.
Solution by The Fallible Fiend
Once again I don't know where I first heard of this problem. It may
have been way back in the late seventies or early eighties in one of
James Fixx's books. I don't remember. It really doesn't seem to be
much of a problem. I kinda think it's only good as a real quickie.
That's probably because it's become ingrained in my consciousness.
You are given two buckets. One holds precisely 3 gallons and the other
holds precisely 5 gallons. You are also given a reservoir of water, say
a hose attached to the house spigot. Your mission is to fill the 5 gallon
bucket with precisely 4 gallons of water.
You probably cannot eyeball this and get it very close, and if you can't
then you can do the following to accomplish the task:
5G = The five gallon bucket.
3G = The three gallon bucket.
R = The reservoir.
+---------+
| |
+---------+
| |
+---------+ +---------+
| | | | State 0. Start with both buckets empty.
+---------+ +---------+
| | | |
+---------+ +---------+
| | | |
+---------+ +---------+
Step 1. Fill the 5G from R.
+---------+
|xxxxxxxxx|
+---------+
|xxxxxxxxx|
+---------+ +---------+
| | |xxxxxxxxx|
+---------+ +---------+
| | |xxxxxxxxx|
+---------+ +---------+
| | |xxxxxxxxx|
+---------+ +---------+
Step 2. Fill 3G from 5G.
+---------+
| |
+---------+
| |
+---------+ +---------+
|xxxxxxxxx| | |
+---------+ +---------+
|xxxxxxxxx| |xxxxxxxxx|
+---------+ +---------+
|xxxxxxxxx| |xxxxxxxxx|
+---------+ +---------+
Step 3. Empty 3G.
+---------+
| |
+---------+
| |
+---------+ +---------+
| | | |
+---------+ +---------+
| | |xxxxxxxxx|
+---------+ +---------+
| | |xxxxxxxxx|
+---------+ +---------+
Step 4. Empty 5G into 3G.
+---------+
| |
+---------+
| |
+---------+ +---------+
| | | |
+---------+ +---------+
|xxxxxxxxx| | |
+---------+ +---------+
|xxxxxxxxx| | |
+---------+ +---------+
Step 5. Fill 5G from R.
+---------+
|xxxxxxxxx|
+---------+
|xxxxxxxxx|
+---------+ +---------+
| | |xxxxxxxxx|
+---------+ +---------+
|xxxxxxxxx| |xxxxxxxxx|
+---------+ +---------+
|xxxxxxxxx| |xxxxxxxxx|
+---------+ +---------+
Step 6. Fill 3G from 5G.
+---------+
| |
+---------+
|xxxxxxxxx|
+---------+ +---------+
|xxxxxxxxx| |xxxxxxxxx|
+---------+ +---------+ Final State. 4G in the 5G bucket.
|xxxxxxxxx| |xxxxxxxxx|
+---------+ +---------+
|xxxxxxxxx| |xxxxxxxxx|
+---------+ +---------+
----------------------------
Note: There's at least one other solution, but the one I know takes
more steps than this.
               (
geocities.com/athens)