Squares of an $8\times8$ grid are coloured black or white. How many colourings of an $8\times8$ grid are there?

888 Views Asked by At

The squares of an $8\times8$ grid are coloured black or white. A colouring is called balanced if each $2\times2$ subgrid contains exactly two squares of each colour (i.e. Any $2\times2$ subgrid can't have 3 of white and 1 of black or full colour.)


Counting the rotations and reflections of a pattern as different, how many balanced colourings of the $8\times8$ grid are there?

Any help would very much be appreciated. This question is doing my head in.

1

There are 1 best solutions below

6
On BEST ANSWER

You can produce $2^8$ balanced colorings by choosing the first row arbitrarily, then making each column alternate black and white. You can also produce $2^8$ balanced colorings by choosing the first column arbitrarily, then making each row alternate black and white. That would make $2^8 + 2^8$ colorings, except I counted the two chessboard colorings twice, so that makes $2^8 + 2^8 - 2 = 510$ colorings total.

Claim: there are no other colorings.

Proof: Assume there is another coloring that hasn't been listed yet. It's not a chessboard coloring, so there must be two adjacent squares of the same color.

Suppose wlog. they're adjacent horizontally. Then what can we say about the two columns these squares are in? The two squares above these squares have the opposite color, and the two squares above those have the opposite color again, and so on. So these two columns are identical, alternating black and white.

What about the columns next to those alternating colums? They must also alternate black and white, since if they weren't at some point, that point would be part of an unbalanced 2x2 square. The same goes for the next columns, and by induction you see that each column is alternating black and white.

But wait, now this coloring we chose is one of the colorings listed in the first paragraph. Contradiction! So the assumption is false and the claim is true.