Note the process could be run in reverse: remove two of the same color and replace with one each of the other two.
So we could begin with the goal 0,0,12 and see from what starting positions it can be reached.
They are
0,0,12
1,1,10
2,2,8
0,3,9 3,3,6
4,4,4 1,4,7 1,1,10
2,5,5 2,2,8
0,6,6
The list doesn't contain 3,4,5 so that starting condition will not work.
But Paul's solution is much more elegant.
|
Posted by Jer
on 2015-07-29 18:56:37 |