M.Gardner in some of his books describes the puzzle: there is a set of squares, each divided into 4
triangular sectors — and these triangles are painted in 3
colors. There exists 24
different squares and it is possible to arrange them into 6*4
rectangle, so that:
- all triangles touching the border of the rectangle have the same color;
- each two neighbor squares have triangles of the same color on their common edge.
To make it more clear, here is an illustration of the solution:
You can try to play with the puzzle at this page.
Gardner told that the author is Percy Alexander MacMahon.
Though it is not easy to find solution at once, there exist many of them. Gardner wrote that some of his readers counted analytically and other with the help of computer the number about 12 thousands.
This phrase made me curious how to write a program to count these solutions.
I have no other idea except to play with puzzle and find out some "laws" about placing some specific squares — and then to write brute-force limited with these laws. But it looks complicated.
So my question is whether there exist easier methods to limit the brute-force or some more cunning approaches?