# Recursion – Solution (Solitaire XXVI)

To keep this week’s frustration to the necessary minimum, here is a discussion of last week’s recursion puzzle:

I first asked to assemble any of the 30 squares whose sides are colored in four distinct colors out of five from four smaller squares so that edge colors match, and we don’t use the square we start with, like so: As we can see, there are seven different solutions. It doesn’t matter which square you start with, permuting the colors will reduce everything to this example. Next we need to pick one of these seven solutions, and assemble each of the four sub-squares using 16 of the the remaining squares. It turns out that

1. this is only possible for the fifth solution above;
2. each subsquare can be assembled in two distinct ways: But only two of the 16 possible choices satisfies the condition that we are not allowed to reuse squares, namely these two: Pretty? Now the remaining squares 9 can be, in each case, assembled into a 3×3 square in exactly one way: Here are a few hints about this: First note that the dark green color has to occur an even number of times, the other colors an odd number each. This forces the other colors to constitute the boundary, so dark green is confined to the interior. A bit trial and error shows that the only green-free square has to be at the center, and the green edges assemble in a pattern as above.