We have 2 bucket that can be filled with 13kg and 5kg respectively. Certainly, we have a lot of sand. We can use unlimited sand. How can we get 11kg of sand from a huge sand pile?
| Action | b5 | b13 |
|---|---|---|
| start | 0 | 0 |
| fill b5 | 5 | 0 |
| pour b5 => b13 | 0 | 5 |
| fill b5 | 5 | 5 |
| pour b5 => b13 | 0 | 10 |
| fill b5 | 5 | 10 |
| pour b5 => b13 | 2 | 13 |
| pour b13 | 2 | 0 |
| pour b5 => b13 | 0 | 2 |
| fill b5 | 5 | 2 |
| pour b5 => b13 | 0 | 7 |
| fill b5 | 5 | 7 |
| pour b5 => b13 | 0 | 12 |
| fill b5 | 5 | 12 |
| pour b5 => b13 | 4 | 13 |
| pour b13 | 4 | 0 |
| pour b5 => b13 | 0 | 4 |
| fill b5 | 0 | 9 |
| Action | b5 | b13 |
|---|---|---|
| start | 0 | 0 |
| fill b13 | 0 | 13 |
| pour b13 => b5 | 5 | 8 |
| pour b5 | 0 | 8 |
| pour b13 => b5 | 5 | 3 |
| pour b5 | 0 | 3 |
| pour b13 => b5 | 3 | 0 |
| fill b13 | 3 | 13 |
| pour b13 => b5 | 5 | 11 <-- solution found |