Books · The Fiddler: Solutions
Chapter 4
Can You Tile the Hexagon?
I am relaying my kitchen floor. The floor is marked out as small equilateral triangles, fitted together into a regular hexagon with two triangles along each side. My tiles are rhombuses, each one made of two of those triangles joined along a shared edge, and a tile may be laid in any of its orientations. In how many distinct ways can I cover the hexagon with these rhombuses, leaving no gaps and no overlaps?
For extra credit, my patio is a larger regular hexagon of the same kind, this time triangles, three to a side. In how many distinct ways can I tile that one?
The Fiddler, Zach Wissner-Gross, June 26, 2026(original post)
Solution
A rhombus built from two triangles can lie in three orientations, one for each direction its shared edge can take. Colour those three orientations differently and something happens to any finished tiling: it stops looking flat. The hexagon reads as the inside corner of a room, and the rhombuses become the top and two visible walls of little cubes stacked into that corner (Figure 4.2). This is not a trick of the eye. It is a genuine correspondence, and it is the whole puzzle.
Here is the correspondence stated plainly. Seen corner-on, a heap of unit cubes packed into an box projects to exactly one rhombus tiling of the regular hexagon of side , and every tiling of that hexagon comes from exactly one heap. The heap has to be stable, with no cube left floating: reading the cube heights off the floor of the box as an grid, the heights can only fall as you move away from the back corner, never rise. An array of heights that is weakly decreasing along both directions, with each entry between and , is what combinatorialists call a plane partition in the box. Tilings, stable heaps, and plane partitions are three names for one set of objects, so to count the tilings it is enough to count the plane partitions.
That count was settled by MacMahon a century ago. The number of plane partitions fitting in an box is the product For the kitchen floor the box is . Grouping the eight factors by the value of , which runs from to , the product unrolls into a short cascade, The outlined floor is nailed to one spot, so all of these heaps are genuinely different layouts. Only if you agreed to treat two layouts as the same whenever one is a rotation or reflection of the other would the collapse, and then into essentially different tilings.
Extra credit
Nothing changes for the patio except the size of the room. A regular hexagon of side is the corner-on view of a box, so the same formula applies with the sum now running from to , The exponents are the numbers of ways to hit each sum with three parts from to , namely , and the cascade telescopes to . Up to the hexagon’s rotations and reflections these heaps fall into classes.
The computation
The formula leans on the cube correspondence, so the honest check throws it away and counts the tilings the way the puzzle poses them, as rhombuses dropped onto triangles. Model the hexagon as its set of unit triangles; two triangles that share an edge can be capped by a single rhombus; and a full tiling is a way to pair off every triangle with such a neighbour. That is a perfect matching of the triangle-adjacency graph, and each matching is one tiling.
Build the side- hexagon as the lattice rhombus with its two opposite corners cut off, keeping every unit triangle whose three vertices survive the cut.
Join two triangles whenever they share exactly two vertices, that is, an edge.
Backtrack: take the first triangle not yet covered, pair it with each still-free neighbour in turn, recurse, and count the pairings that cover everything.
from fractions import Fraction
# Regular hexagon of side n = the 2n x 2n lattice rhombus with its two opposite
# corners cut. Vertex (p,q) is IN iff 0<=p<=2n, 0<=q<=2n, n<=p+q<=3n.
# Up-triangle U(p,q): (p,q),(p+1,q),(p,q+1); Down D(p,q): (p+1,q),(p,q+1),(p+1,q+1).
def hexagon(n):
inside = lambda v: 0 <= v[0] <= 2*n and 0 <= v[1] <= 2*n and n <= v[0]+v[1] <= 3*n
tris = []
for p in range(2*n+1):
for q in range(2*n+1):
for vs in [((p,q),(p+1,q),(p,q+1)), ((p+1,q),(p,q+1),(p+1,q+1))]:
if all(inside(v) for v in vs):
tris.append(frozenset(vs))
return tris
def count_tilings(n):
tris = hexagon(n); N = len(tris)
adj = [[] for _ in range(N)]
for i in range(N): # neighbours share exactly one edge (2 vertices)
for j in range(i+1, N):
if len(tris[i] & tris[j]) == 2:
adj[i].append(j); adj[j].append(i)
covered = [False]*N
def rec(): # perfect matchings = rhombus tilings
u = next((k for k in range(N) if not covered[k]), -1)
if u == -1:
return 1
total = 0; covered[u] = True
for v in adj[u]:
if not covered[v]:
covered[v] = True; total += rec(); covered[v] = False
covered[u] = False
return total
return N, rec()
def macmahon(a, b, c): # plane partitions in an a x b x c box
prod = Fraction(1)
for i in range(1, a+1):
for j in range(1, b+1):
for k in range(1, c+1):
prod *= Fraction(i+j+k-1, i+j+k-2)
return int(prod)
for n in (2, 3):
N, t = count_tilings(n)
print(f"side {n}: {N} triangles | tilings = {t} | MacMahon = {macmahon(n,n,n)}")
# side 2: 24 triangles | tilings = 20 | MacMahon = 20
# side 3: 54 triangles | tilings = 980 | MacMahon = 980
The direct rhombus count agrees with MacMahon’s product in both cases: ways to tile the kitchen, to tile the patio.