proposed by | Toby Walsh tw@cs.york.ac.uk |
In a later article, he reports that several people have sent him solutions involving seven transfers of water (some using ingenious graphical solution methods). He asks if this is optimal since it seems rather high.
A simple Prolog program for enumerating solutions shows that 7 pourings is indeed optimal and the solution is unique.
8-0-0,3-5-0,3-2-3,6-2-0,6-0-2,1-5-2,1-4-3,4-4-0
Some LPA Prolog code to solve the problem is also available online.