The division of the twelve pints of ale can be made in eleven
manipulations, as below. The six columns show at a glance the quantity
of ale in the barrel, the five-pint jug, the three-pint jug, and the
tramps X, Y, and Z respectively after each manipulation.
Barrel. 5-pint. 3-pint. X. Y. Z.
7 .. 5 .. 0 .. 0 .. 0 .. 0
7 .. 2 .. 3 .. 0 .. 0 .. 0
7 .. 0 .. 3 .. 2 .. 0 .. 0
7 .. 3 .. 0 .. 2 .. 0 .. 0
4 .. 3 .. 3 .. 2 .. 0 .. 0
0 .. 3 .. 3 .. 2 .. 4 .. 0
0 .. 5 .. 1 .. 2 .. 4 .. 0
0 .. 5 .. 0 .. 2 .. 4 .. 1
0 .. 2 .. 3 .. 2 .. 4 .. 1
0 .. 0 .. 3 .. 4 .. 4 .. 1
0 .. 0 .. 0 .. 4 .. 4 .. 4
And each man has received his four pints of ale.