swisspig.net - To hell with the pig... I'm going to Switzerland.

The Water Jug Puzzle (Thursday, July 10, 2008)

While reviewing for my PhD qualifying exams, I came across the following puzzle:

In the water-jug puzzle we are given a 4-liter jug, and a 7-liter jug. Initially, both jugs are empty. Either jug can be filled with water from a tap, and we can discard water from either jug down a drain. Water may be poured from one jug into the other. There is no additional measuring device. Explain how to measure out precisely 1, 2, 3, 4, 5, 6, and 7 liters of water.

Obviously, measuring out 4 liters is as easy as filling the 4-liter jug, and measuring out 7 liters is as easy as filling the 7-liter jug. But see if you can figure out how to end up with the other amounts in one of the two jugs. Remember, there is no "half a jug" nor any other place to store water. Leave a comment with your solution!

—Brian (7/10/2008 2:16 PM)
(4 comments)

Comments

Thanks Matt, but it doesn't count if we've already been over the answers!! -- editor

-- anonyMouZ (7/12/2008 11:22 AM)

Did I get it? It's almost 11pm but I couldn't stop!!! Not sure if my math is correct and quite honestly - I'll let you figure that out :)

1) Fill 4L jug
2) Pour 4L into 7L jug
3) Fill 4L jug
4) Pour 4L into 7L jug
5) Now you have 1L in the 4L jug and 7L in the 7L jug
(1L, 4L (from initial fill) and 7L covered)
6) Drain the 7L jug
7) Pour 1L in the 7L jug
8) Fill 4L jug
9) Pour 4L into 7L jug
10) Now you have 5L in the 7L jug and 0 in the 4L jug
(1L, 4L, 5L, and 7L covered)
11) Fill 4L jug
12) Pour 4L into 7L jug
13) Now you have 7L in the 7L jug and 3L in the 4L jug
(1L, 3L, 4L, 5L, 7L covered)
14) Drain 4L jug
15) Drain 7L jug
16) Fill 4L jug
17) Pour 4L into 7L jug
18) Now you have 4L in 7L jug and 0L in 4L jug
19) Fill 4L jug
20) Pour 4L into 7L jug
21) Now you have 7L in 7L jug and 1L in the 4L jug
22) Drain 7L jug
23) Pour 1L into 7L jug
24) Now you have 1L in the 7L jug and 0L in the 4L jug
25) Fill 4L jug
26) Pour 4L in the 7L jug
27) Now you have 5L in the 7L jug and 0L in the 4L jug
28) Fill 4L jug
29) Pour 4L in the 7L jug
30) Now you have 7L in the 7L jug and 2L in the 4L jug
(1L, 3L, 4L, 5L, 6L, 7L covered)
31) Drain 7L jug
32) Pour 4L in the 7L jug
33) Now you have 2L in the 7L jug and 0L in the 4L jug
(1L, 2L, 3L, 4L, 5L, 6L, and 7L covered)

-- Jazzy (8/28/2008 10:40 PM)

Aren't you so talented! I'm proud of you! Yay!

-- Brian (8/29/2008 8:09 AM)

YAY! I rock :)

-- Jazzy (8/29/2008 11:07 AM)

Name
URL
Comment
(no html)
 

Disclaimer: Opinions on this site are those of Brian Ziman and do not necessarily
reflect the views of any other organizations or businesses mentioned.