Consider a 5×5 square grid, where each square can be colored either black or white.

We’re going to impose some rules on this grid.
Rule 1: Each vertex must be adjacent to at least 1 and at most 3 white squares.
Rule 2: No checkerboards (i.e. two white squares and two black squares diagonally opposite each other).
Rule 3: All white squares form one contiguous, orthogonally connected group.
Rule 4: All black squares are contiguously connected to the edge, though not necessarily all to each other.
Here’s some examples for what breaks each of these rules (and one that follows all of them):

Now it’s your turn! Try and come up with a 5×5 grid that follows all 4 of those rules. Then count the number of white squares in your grid.
Did you get 17?
If not, you should probably double check each of the rules, because any 5×5 grid that follows all of them will always have exactly 17 white squares.
Why is that? Well, since there’s only 1 contiguous white region, look at its boundary.

Now, the boundary has to touch every vertex. If it didn’t, either the vertex would be completely separate from the white region, and break rule 1 by being next to 0 white squares, or it would be entirely inside the white region, and break rule 1 by being next to 4 white squares.
So now let’s shift our focus to the 6×6 grid of vertices. The boundary of the white region is a closed loop that goes through all 36 vertices exactly once.

The total number of white squares is the area enclosed by this loop.
Now that I think about it, once we get to this step, we could just use Pick’s Theorem and be done with it. But I’m going to continue the way I originally solved this.
We know the number of vertices. It’s 36. But each grid square is touching 4 different vertices. Fortunately, there’s a very simple way to fix that.

Just divide each square into quarters. Now each quarter square is touching only 1 vertex.
However, each vertex can be touching more than 1 quarter square. That’s fine. We can work with that.
The vertices on straightaways each have 2 white quarter squares touching them. The vertices in outside corners have 1 white quarter square, and the vertices in inside corners have 3.

Adding it all up, the area inside the loop is (2*[straightaways] + 1*[outside corners] + 3*[inside corners])/4, or, because the total number of vertices is 36, we can rewrite [straightaways] as (36 – [inside corners] – [outside corners]) to get 18 – ([outside corners] – [inside corners])/4.
Now how many corners are there? Suppose you’re walking clockwise around the loop. Each outside corner is a right turn, and each inside corner is a left turn.
You need to make 4 right turns, at least, to make it back to where you started. You could also make 4 left turns. but if you did that, you would be walking counterclockwise instead. But for each left turn you make, you need to make a matching right turn to correct your course, so the number of right turns minus the number of left turns is 4, right?
It’s not quite that simple. Why couldn’t it be 8 right turns? Or 12?
Well, let’s say the loop was like a rubber band, and you stretched it out until it was just a circle. Then the total rotation going around it is definitely just 360°. And because stretching it out preserves the total rotation, it does in fact have to be exactly 4 right turns.
Alternatively, if you still don’t believe me, here’s an exhaustive list of every way you can add a square to a polyomino without any holes. They all preserve the total rotation (in other words, blue – red).

Anyways. I think I kind of lost the plot a bit. We were trying to find the value of [outside corners] – [inside corners]. It’s always 4. So that means the area enclosed by the loop, 18 – ([outside corners] – [inside corners])/4, is 18 – 4/4 = 17. And since the area enclosed by the loop is the number of white squares in the 5×5 grid, that must be 17 as well!
As a general rule, for a (2n+1)x(2n+1) grid following those 4 rules, the number of white squares will always be 2n^2 – 1. Because you can’t make a closed loop going through all the vertices in an odd length square grid, for parity reasons, you can’t make any even grid follow those 4 rules at all.
Leave a Reply