Solving the water jug problem
- by Amit
While reading through some lecture notes on preliminary number theory, I came across the solution to
water jug problem (with two jugs) which is summed as thus:
Using the property of the G.C.D of two numbers that GCD(a,b) is the smallest possible linear combination of a and b, and hence a certain quantity Q is only measurable by the 2 jugs, iff Q…