PuzzleReels
Sections

The Chipped Board

The maths · Episode 22 · 3:13 · gives the answer

The puzzle

A chessboard has 64 squares. Snap off two opposite corners, which leaves 62. A domino covers exactly two squares that share an edge, and you have 31 of them: 62 squares' worth, exactly. Can you cover the board?

The maths, properly

Name each square by its row and column, counted from 0 at the top left, so the corners removed are (0, 0) and (7, 7). Call a square dark if row plus column is even, and light if it is odd. That is the usual chequering, and the film's corners are dark. A domino is two squares that differ by one in exactly one of row or column.

Route one: keep trying

Place dominoes as well as you can and you end with two squares left over that do not touch. Try again and the same thing happens. The film shows 10 attempts, each a real placement of 30 dominoes:

attemptthe two squares left overtheir colours
1(0, 1) and (0, 7)light, light
2(1, 6) and (7, 2)light, light
3(2, 5) and (7, 4)light, light
4(0, 5) and (4, 3)light, light
5(0, 7) and (6, 3)light, light
6(4, 7) and (7, 0)light, light
7(3, 0) and (7, 2)light, light
8(0, 3) and (5, 2)light, light
9(4, 1) and (6, 5)light, light
10(2, 1) and (3, 6)light, light

Failing, however often, proves nothing: the next try might work. What would settle it is a search that covers every placement. The script runs one, a maximum matching by augmenting paths, which is the standard exact method for the largest set of disjoint dominoes. It returns 30 for the chipped board, so a tiling, which needs 31, does not exist. That is a proof by machine. It does not say why, and it tells you nothing about other boards. The next route does.

Route two: count the paint

Touching squares differ in colour. Moving one square along a row or a column changes row plus column by exactly 1, so it flips the parity. Two squares that share an edge are therefore always one light and one dark. A domino covers two such squares, so every domino covers exactly one light and one dark square, wherever it lies. There are 2×8×7 positions for a domino on the board, which is 112, and the script checks all of them.

An invariant. For any set of squares S, write ℓ(S) for the number of light squares in it and d(S) for the number of dark ones. A domino has ℓ−d=0. Squares covered by disjoint dominoes are a union of them, so for any placement the covered squares satisfy

ℓ−d=0

Nothing a player does can change this. A tiling of a board would cover all of its squares, so a board can be tiled only if it has ℓ=d.

The corners are the same colour. Corner (0,0) has row plus column equal to 0, and the opposite corner has 7+7=14. Both are even, so both are dark. The whole board has 32 light and 32 dark squares, because each row alternates and so holds four of each. Take away two dark squares and the board has 32 light and 30 dark, which is ℓ−d=2. It cannot be tiled. The same argument rules out removing any two squares of one colour, not only the corners.

A better bound. Every domino in a placement needs its own dark square, and only 30 are left, so no placement has more than 30 dominoes. The script's search finds a placement of exactly 30, so that bound is reached. It also explains what you saw in the attempts. A placement of 30 dominoes covers every dark square and 30 of the 32 light ones, and the two squares left are both light. Two light squares are never next to each other, because touching squares differ in colour. The film's clue, two squares left that never touch, is just the colouring seen from the other side.

The control: Gomory's theorem

If one removed square is dark and the other light, the board can always be tiled. Ralph Gomory proved this. Here is the standard argument.

A tour of the board. There is a closed walk through all 64 squares that visits each exactly once and moves between touching squares each step. Start at (0,0) and go along the top row to (0,7). Then snake through rows 1 to 7, using only columns 1 to 7: row 1 from column 7 down to column 1, row 2 back up to column 7, and so on, so that row 7 ends at (7,1). Step to (7,0), then walk up column 0 to (1,0), which touches (0,0) to close the loop. That is 8+7×7+7=64 squares.

The tour alternates colours. Number the squares of the tour 0,1,…,63 from (0,0). Consecutive squares touch, so they differ in colour, and the colours alternate round the whole loop. Even positions are dark and odd positions light.

Cut the tour at the two removed squares. Say they sit at positions a<b on the tour. They have different colours, so b−a is odd. Removing them cuts the loop into two paths:

  • the squares strictly between them, which number b−a−1, an even number;
  • the squares before a and after b, which number 63−(b−a), also even.

One of them may be empty, if the two removed squares are neighbours on the tour. Each path is a line of squares in which neighbours touch, with an even number of squares. Pair them off along the path: first with second, third with fourth, and so on. Each pair touches, so each pair is a domino. Together the pairs cover every square that was not removed, and the board is tiled. ∎

Only the parity of b−a mattered. If the removed squares had the same colour, b−a would be even, both paths would have an odd number of squares, and the pairing would leave one square over on each. That agrees with the colour count.

A worked case: the film's board and the 4 × 4

The 4 × 4 board. The film counts on a 4 by 4 board with the same two corners gone: 14 squares, 8 light and 6 dark. 7 dominoes would need 7 of each colour. The script finds that at most 6 dominoes can be placed. The film slides one domino to five places on it, and every position covers one of each colour:

positionthe two squarescolours covered
1(1, 1) and (1, 2)dark, light
2(2, 0) and (3, 0)dark, light
3(0, 2) and (0, 3)dark, light
4(2, 2) and (3, 2)dark, light
5(1, 3) and (2, 3)dark, light

One hole moved along. In the control, the film puts back the corner (7, 7) and takes off its neighbour (7, 6) instead. The holes are now (0, 0), which is dark, and (7, 6), where row plus column is 7+6=13, so light.

Run the tour argument on them. The corner (0,0) is position 0 on the tour. The tour covers rows 0 to 6 first, in 8+6×7 squares, so (7,7) is position 50 and (7,6), the next along, is position 51. The two positions differ by an odd number, as the colours said they must. The path between them has 50 squares and the path round the other way has 12. Both are even, and together they are the 62 squares left. Pairing along them gives 25 and 6 dominoes, 31 in all. The film's own tiling, found by the script's matching, is a different one with the same count.

Generalising

Any two squares. On the eight by eight board, removing two squares leaves a tileable board exactly when they have different colours. Same colours fails by the count. Different colours works by the tour. The script checks the second half for all 1024 pairs, which is 32×32.

Other sizes. The tour above is built the same way on any square board with an even side, so the argument gives Gomory's theorem for all of them. Only the eight by eight board is checked by the script. A board with an odd side has an odd number of squares and cannot be tiled at all.

A cleaner view. Tiling a board by dominoes is a perfect matching in the graph whose points are the squares, joined when they touch. That graph has two sides, light and dark, and every edge goes between the sides. Hall's theorem says every light square can be given its own dark neighbour exactly when no set of light squares has fewer dark neighbours than members. The chipped board fails Hall's condition in the simplest way: its 32 light squares have only 30 dark squares between them to be neighbours of. The page does not prove Hall's theorem, and the argument above does not need it.

Checking it

scripts/chessboard.mjs recomputes everything and asserts it, and its --check fails if maths.json is stale. It checks that:

  • the chipped board has 62 squares, 32 of one colour and 30 of the other, and the whole board has 32 of each and takes 32 dominoes;
  • all 112 domino positions cover one light and one dark square;
  • the largest set of disjoint dominoes on the chipped board, by maximum matching, has 30, not 31;
  • the 4 by 4 case has 14 squares, 8 and 6 by colour, and at most 6 dominoes;
  • for every one of the 1024 pairs of differently coloured squares, the rest of the board has a placement of 31 dominoes;
  • the film's seeded best placements each have 30 legal dominoes and two left-over squares that do not touch and are both light, and the five slid dominoes each cover one of each colour;
  • the tiling after one hole is moved is a full tiling with 31 legal dominoes that leaves no square uncovered;
  • the closed tour above visits all 64 squares once, every step moves to a touching square, and the colours alternate along it;
  • for each of the 1024 pairs of differently coloured squares, cutting the tour at the two holes and pairing each path off along itself gives a legal tiling by 31 dominoes, so the proof above is run on every case, not only argued; and for each of the 992 pairs of one colour both paths come out odd;
  • the positions in the worked case and in question 1 below.

So Gomory's theorem on this board is checked twice, by the tour and independently by matching. The maximum matching is trusted to be what the algorithm is known to be. The script does not test boards of other sizes.

Where this shows up

  • The puzzle was popularised by Max Black, in 1946, and by Martin Gardner afterwards. The theorem about differently coloured squares is due to Ralph Gomory.
  • Colouring arguments are a general way to show that something cannot be done: find a count that every legal move leaves unchanged, and show that the target has a different count. The invariant ℓ−d=0 here is one.
  • Automated reasoning. It is a well-known test case for computer proof systems. A person sees the two-line colouring argument at once, but a system that reasons clause by clause, without being told to count colours, has a hard time finding a proof.

Try it yourself

1. Remove the two corners at the ends of the top edge. Can the rest be tiled?

Yes. The corners (0,0) and (0,7) have row plus column equal to 0 and 7, so one is dark and one is light. Gomory's theorem says the board tiles, and the script confirms it, since it checks all 1024 pairs of different colours. With the tour, they sit at positions 0 and 7. The paths between them have 6 and 56 squares, both even, and pair off into 3 and 28 dominoes.

2. Why can no board with two same-coloured squares removed be tiled?

Every domino covers one light and one dark square, so any set of dominoes covers equally many of each. Removing two squares of one colour leaves 30 of that colour and 32 of the other, whichever colour it was, and those are not equal. This is the same count as the film's.

3. In the tour argument, what goes wrong if the two removed squares have the same colour?

The colours alternate along the tour, so squares of the same colour sit at positions of the same parity. Then b−a is even, and each of the two paths between them has an odd number of squares. A path with an odd number of squares cannot be paired off into dominoes.

4. In the film's attempts, why are the two squares left over never next to each other?

A placement of 30 dominoes uses up all 30 dark squares, so the two squares left must both be light. Touching squares always differ in colour, so two light squares never touch.