| Cooler | 7-quart jug | 5-quart jug | Action
|
|---|
| 120 | 0 | 0 | Initial conditions
|
| 113 | 7 | 0 | Fill the 7
|
| 113 | 2 | 5 | Transfer as much as possible from the 7 to the 5
|
| 106 | 7 | 2 | Dump the 5, transfer the 7 to the 5, and fill the 7
|
| 106 | 4 | 5 | Transfer as much as possible from the 7 to the 5
|
| 99 | 7 | 4 | Dump the 5, transfer the 7 to the 5, and fill the 7
|
| 99 | 6 | 5 | Transfer as much as possible from the 7 to the 5
|
| 99 | 1 | 5 | Dump the 5, and transfer as much as possible from the 7 to the 5
|
| 99 | 1 | 0 | Dump the 5
|
Since I just took about five minutes to figure that out, someone tell me if they have a better answer (i.e. one that wastes less water)