Measuring with Two Jugs

Initializing live version
Download to Desktop

Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.

This Demonstration shows a graphic solution of the problem of measuring out liters of a liquid using jugs of capacity and liters, with integers. The solution seeks the minimal number of times jugs are to be filled and emptied. So we are looking for a solution (in integers) of the Diophantine equation with minimal . Another method for solving the equation can use two rulers with lengths that are multiples of and . The problem cannot be solved if does not divide .

Contributed by: Izidor Hafner (January 2016)
Code from: Emmanuel Garces Medina
Open content licensed under CC BY-NC-SA




Feedback (field required)
Email (field required) Name
Occupation Organization
Note: Your message & contact information may be shared with the author of any specific Demonstration for which you give feedback.