You have a 12 litre jug, an 8 litre jug, and a 5 litre jug. None of the jugs have any markings on them. The 12 litre jug is full, and the other two are empty.
How can you divide the 12 litres of water in such a way that two of the jugs (the 12 litre and the 8 litre jugs) have exactly 6 litres of water in them, and the third (the 5 litre jug) is empty?
Let us denote the three jugs as P, Q, and R.
P contains 12 liters, Q contains 8 liters, and R contains 5 liters.
Then, the procedure culminating in the desired allotment is furnished hereunder as follows:
P(12 liters) Q (8 liters) R (5 liters) Transfers
----------------- ----------------- ----------------- ----------------
12 0 0 (P-->Q)
4 8 0 (Q-->R)
4 3 5 (R-->P)
9 3 0 (Q--> R)
9 0 3 (P--> Q)
1 8 3 (Q--> R)
1 6 5 (R-->P)
6 6 0