You have three jugs with volumes of 12, 8, and 5 liters. The 12L jug is full of water, while the other two jugs are empty. You have no other source of water.
Using these jugs, how can you obtain exactly 6 liters of water in the 12L jug?
You have three jugs with volumes of 12, 8, and 5 liters. The 12L jug is full of water, while the other two jugs are empty. You have no other source of water.
Using these jugs, how can you obtain exactly 6 liters of water in the 12L jug?
12j-12, 8j-0, 5j-0
12j-4, 8j-8, 5j-0
12j-4, 8j-3, 5j-5
12j-9, 8j-3, 5j-0
12j-9, 8j-0, 5j-3
12j-1, 8j-8, 5j-3
12j-1, 8j-6, 5j-5
12j-6, 8j-6, 5j-0 (done!)
Ends up with 6 inches of water in the 12-inch jug with no water wasted!
Fill the 8L jug from the 12L jug, then fill the 5L jug from the 8L jug. This leaves 3L in the 8L jug. Discard that 3L. Empty the 5L jug into the 12L jug. Repeat.
This discards 6L and leaves 6L in the 12L jug.
here is another way of doing this:
12j-12, 8j-0, 5j-0
12j-0, 8j-8, 5j-4
12j-8, 8j-4, 5j-0
12j-3, 8j-4, 5j-5
12j-3, 8j-8, 5j-1
12j-11, 8j-1, 5j-0
12j-6, 8j-1, 5j-5(Done!)