Edgematching to the Stars

The best known combinatorially complete set of edgematching tiles are the 24 squares with 3 edge colors discovered by Percy MacMahon. These can be rotated, but not flipped over. I showed an illustration of them when I first discussed edgematching puzzles on this blog. And now I’ll do it again!

Can we find an even more basic set? After all, 3×3 square edgematching puzzles were common as advertising promotions in the first half of the 20th century. A set of 24 tiles seems excessive. And surely 2 edge colors would be simpler than 3.

The problem is that with 2 colors, you get only 6 tiles, and they don’t make an interesting puzzle at all. But if you use tiles with fixed orientation, you get 16 tiles. Per David Singmaster’s Sources in Recreational Mathematics, this set was described by J. J. M. Verbakel in 1975. We’ll use a line pointing out of a side to represent one of the colors, and a blank edge to represent the other, as this convention will help us to make better visual sense of some of the later figures.

They still don’t make a very good puzzle, as the above solution is basically trivial, so even adding the restriction that only one color can touch the border adds no challenge. But as a starting point for further exploration, they lead in some very interesting directions. Christian Freeling shows some of these on his page on the “BackSlide” puzzle, which turns the pieces into a double-sided sliding 15-puzzle. (Freeling’s site also contains information about variations of these puzzles using hexagons as well as squares with diagonal connections.)

The binary nature of the colors allows us break out of the 4×4 square. Instead of both colors matching themselves, we can arrange the tiles into sets of polyominoes where one color matches itself, and the other matches an outer edge. Freeling calls these “transcendental” solutions. Finding these is still not much of a puzzle, but any unusual polyomino recreation is appreciated around here!

Breaking up the tiles further leads to the “starmaps” discovered (in the hexagonal context) by Martin Medema. Here, we place these tiles on an 8×8 board. A line pointing out of a piece must connect, at some distance, to one pointing out of another piece. An empty edge must see only empty space in its direction. Conveniently, there are 32 empty edges, exactly as many as edges in the perimeter of the board. Freeling states that it is “considered good form” for no tiles to be adjacent. If we don’t use good form, it is not hard to transform a regular transcendental solution into a starmap by breaking it apart until no empty edges see each other. Finding a good form starmap isn’t a trivial puzzle at all.

My impetus for this post was an idea I had for a new type of starmap. We might require one edge type to match an adjacent instance of itself, and have an additional edge type that must see itself from more than one square away, enforcing “good form” for that type. The third edge type must see only empty space as before. There would be 81 fixed orientation pieces with three edge types, which is way more than I want to deal with. Surely there must be some better set with three edge types.

Right, the MacMahon tiles! There are 32 instances of each edge type, so we can use an 8×8 board again. I found this puzzle to be quite challenging.

Puzzles with sparse (or sparse-but-clumpy) piece placements are unusual and visually distinctive, and I hope to encounter more like these.

Edgematching with Catalan number patterns

Edgematching puzzles are a genre that I haven’t previously explored very deeply. A classic example is the MacMahon squares puzzle. If you subdivide a square diagonally into four triangles, there are 24 ways to color the triangles using three colors. Using a set of 24 squares with all of the possible colorings, it is possible to make a 6×4 rectangle where all of the edges match.

As I was pondering the possibility of designing my own edgematching puzzle, I considered that pieces with multiple colors are a bit of a pain to make with a laser cutter. However, engraving lines is relatively easy. And I found a promising set of line patterns related to the Catalan numbers. The Catalan number sequence (1, 2, 5, 14, 42, 132…) is one that comes up in a surprising variety of contexts. For example, Catalan(n) is the number of distinct ways that n pairs of matched parentheses can occur in a string. For n = 3, we have ()()(), (()()), ((())), ()(()), and (())().

Replacing the parentheses with diagonal lines, and stretching them until they connect, we can make the following figures:

We can place these figures around the edges of a square, and use them to do edgematching— but with a new twist as to what counts as a match. Looking at the patterns that are made when two of these figures meet at an edge, we see that one thing that distinguishes them is the number of loops they make. One, two, or three loops can be made. This gives us three different puzzle objectives: place the pieces of the puzzle so that all internal edges have the same number of loops, where that number can be one, two, or three. The fact that there are three loop numbers is promising because it means that, on average, the probability of an edge in these three puzzles being a match will be one-third, the same as in the MacMahon Squares puzzle. This table shows the possible edge patterns, colored according to the number of loops:

From the perspective of puzzle design, it’s convenient that the proportion of pattern matches of each type is different; this seems likely to result in puzzles that are correspondingly different in difficulty, which is desirable. The table also reveals symmetries in how the edge figures form the different types of patterns. If you swap both the rows and the columns of the mirror pair of figures, you get a table with the same loop numbers in the same places, as we would expect. Perhaps more surprisingly, this also works with the first and second rows and columns. Thus those two edge figures form a sort of hidden symmetric pair. If you swap all instances of one in a puzzle solution with instances of the other, you will get a second solution.

There’s still one task remaining before we have a puzzle design: choosing the pieces. The MacMahon squares puzzle used every possible piece. Since we have five edge types here, instead of three, that would give us more pieces than we’d really want for a good manual puzzle. There are probably several reasonable options here, but in the interest of prototyping, I wanted to start with a small piece set, so I decided to explore a set of nine pieces with bilateral symmetry. Here’s a solution with single loops:

And here’s a double loop solution for comparison:

I’ve already had prototypes made of this puzzle, and it feels promising. I hope to have at least one more post about variations on this design, but for now I’ll stop here.