Barycentric coordinates, three jugs application . We are given three glasses A,B,C of respective capacities 8,5, and 3 oz. The first glass is full of water. The grid on the right represents points with all three coordinates non-negative integers.
Strings correspond to the coordinate values.
To account for limited capacities of the given vessels, note that under no circumstances it is possible to arrive at the water distribution represented by, say, 134. For the third glass is only capable of holding 3 oz of water. The region of feasible configurations is bounded by the red parallelogram. Since the only way to measure an exact quantity is by either completely filling or completely emptying one of the glasses, we always move up to the boundary of the red parallelogram. Consider, for example, point 431 - the blue dot on the diagram.