It's appropriate now to ask a question "What's so special about the four numbers - 3, 5, 8, and 4?" Indeed, is it possible to modify any of these parameters and still have a meaningful puzzle?
For example, the way I solved the original puzzle can be represented by the following table where in each row three numbers indicate quantities of water in the glasses:
You may notice that all numbers between 0 and 8 appear in the table with the exception of 6. Is it possible to get 6 also?
Try it with the target of 6.
We are now in the realm of Experimental Mathematics. Playing with different combinations of four numbers you may come up with a plausible hypothesis. You may try to validate it with a few more quartets of numbers. See if it works. If it does, try to prove it rigorously. On this page, immediately after the puzzle I give two examples of such statements (one with a proof) at which I arrived after playing with the puzzle for a while.
Here is one simple example where I use letters a, b, c, d to denote three capacities and the target volume, respectively:
Prove that for every target volume d such that 1 < d < c the puzzle has a solution.
Proof:
I'll proceed in several steps. For convenience, I'll use a triplet (x, y, z) to describe the current state of the puzzle such that x is the quantity of water in the first glass (the one with capacity a), y - the volume of water in the second glass, and z - in the third.
Step 1.
To solve the puzzle suffice it to get (0, 1, c-1). Indeed, pouring from the third glass into the first glass you come up with (a, 1, c-a-1) which solves the puzzle for, by the conditions of our proposition, c-a-1 = c-(c/2-1)-1 = c/2 = d.
Step 2.
Having replaced the goal with (0, 1, c-1), I am going to do some magic, i.e., I am going to produce a couple of numbers without explaining why I want these two and no others. The only reason I may give is that after I played with the puzzle with capacities 3, 5, 8 and then with 5, 7, 12, I noticed something that allowed me to form a very plausible, general conjecture which later became the Proposition I am proving. The fact I have noticed is exactly how to select the two numbers I need at this stage.
Thus, let X = c/4 and Y = c/4-1. Then the following is, of course, true
a*X - b*Y = 1.
Step 3.
Now the constructive part. Keep pouring from the third glass into the first and from the first into second. When the second glass becomes full, empty it into the third one. After this happened Y (the number from Step 2) times, the first glass will contain 1 oz of water, the second 0 oz and the third (c-1) oz. This is a consequence of the equality above. Now, empty the first glass into the second and apply Step 1.
Q.E.D.
Remark.
Equality a*X-b*Y = 1 is very well known from the Number Theory. It claims existence of X and Y for every pair of a and b with no common factors.
One related problem.
For a perfect breakfast, a fellow decides to boil an egg exactly 15 minutes. He has two hour glasses - one for 7 minutes, another for 11.
How should he go about preparing his breakfast? How many times will he have to turn hour glasses? What would be the minimal required number of glass turns?
Solution
Remark
Recently I ran into this problem in the M. Gardner's Mathematical Circus. He also cites a similar problem from
Howard P. Dinesman's Superior Mathematical Puzzles (London: Allen and Unwin, 1968).
What is the quickest way to measure 9 minutes with a 4-minute hourglass and a 7-minute hourglass?