Solution

The game of Oxflip is for one player and involves circular counters, which are white on one side and black on the other, placed in a grid. During a game, the counters are flipped over (changing between black and white side uppermost) following certain rules.

Given a particular size of grid and a set starting pattern of whites and blacks, the aim of the game is to reach a certain target pattern. Each “move” of the game is to flip over either a whole row or a whole column of counters (so one whole row or column has all its blacks swapped to whites and vice versa). …

  1. Consider the two-by-two version of the game with starting pattern

    Pattern of 4 counters with 2 black; the top-left and the bottom-right.

    Draw the eight different target patterns (including the starting pattern) that it is possible to obtain.

All eight patterns. They are all of the patterns with one row black, all of the patterns with one column black, the all-white and all-black patterns, and both patterns where one diagonal is black.

What are the possible numbers of white counters that may be present in these target patterns?

The possible numbers of white counters are \(0, 2, 4\). Every go starts with an even number of whites, and does not alter the parity (odd or evenness) of the count.

We either turn two whites to two blacks, or two blacks to two whites, or a white and a black to a white and a black.

  1. In the four-by-four version of the game, starting with pattern

    4 by 4 pattern where counting left to right along each row from top to bottom, the second, fourth, sixth, eighth, tenth, twelfth, fourteenth and sixteenth tiles are black.

    explain why it is impossible to reach a pattern with only one white counter.

    [Hint: don’t try to write out every possible combination of moves.]

The starting pattern has an even number of white counters.

Each time a row or column is flipped, the number of whites in that row or column goes from \(i\) to \(4-i\).

This means that if we start with an even number of white counters in the row or column, there’ll still be an even number after flipping.

And similarly, if we start with an odd number, there’ll still be an odd number afterwards. Each flip preserves the parity of the white counters.

Therefore, as we started with an even number of white counters, there can only ever be an even number of white counters, so we can never just have one counter.

  1. In the five-by-five game, explain why any sequence of moves which begins

    5 by 5 pattern where counting the same way as in the previous pattern, all odd-numbered tiles are black.

    and ends with an all-white pattern, must involve an odd number of moves.

When any row or column is flipped, the number of white counters goes from \(i\) to \(5-i\).

So if we start with an even number of whites in a row or column, there’ll be an odd number of whites in that row or column after flipping.

Similarly, if we start with an odd number of whites in a row or column, there’ll be an even number afterwards.

So, as we start with an even number of white counters in total, and our target contains an odd number of white counters in total, there must be an odd number of moves to reach the target.

What is the least number of moves needed? Give reasons for your answer.

We can easily see that it is possible to get to an all-white grid in \(5\) moves; for example, we can flip columns \(1, 3, 5\) and then flip rows \(2\) and \(4\).

As we know we need an odd number of moves, to show it can’t be done in less than \(5\) moves, we just need to show that it can’t be done in \(3\).

We can see that we cannot reach all the black counters in only \(3\) moves.

There are a maximum of \(3\) black counters in any row or column, so we can touch at most \(9\) black counters in \(3\) moves, but there are \(13\) black counters altogether.