Abstract
The two jugs problem is a classic problem in mathematics and computer sciences. In this paper, we introduce a new algorithm to solve the general two jugs problem. This algorithm has the advantage that one can easily apply it to determine all measurable amounts by the given jugs and provides us insight on the hidden relationship between the two different approaches to tackle the problem, namely the attempt to fill the smaller jug or the larger jug first. We also discuss how to implement this algorithm in Excel and visualize the generated outputs by means of staircase diagrams. Some basic properties of the measurable amounts by the jugs will also be described, together with some examples. Copyright © 2015 Springer International Publishing.
Original language | English |
---|---|
Pages (from-to) | 453-459 |
Journal | Mathematics in Computer Science |
Volume | 9 |
Issue number | 4 |
Early online date | Oct 2015 |
DOIs | |
Publication status | Published - Dec 2015 |
Citation
Man, Y.-K. (2015). On computing the measurable amounts of the two jugs problem. Mathematics in Computer Science, 9(4), 453-459.Keywords
- Mathematical algorithm
- Jugs filling problem
- Measurable amounts
- Diophantine equation
- Staircase diagram
- Primary 68U05
- Secondary 68W01
- Tertiary 97F60