Maths Olympiad Prep

Library / /2 of 3

Combinatorics Difficulty 8.3 Shortlist Prove it Taiwan

Let mm and nn be positive integers greater than 1. In each square of a m×nm \times n grid lies a coin with its tail-side up. A move consists of the following steps:
(1) select a 2×22 \times 2 square in the grid;
(2) flip the coins in the top-left and the bottom-right unit squares;
(3) flip the coin in either the top-right or the bottom-left unit square.

Determine all pairs (m,n)(m, n) of which it is possible that every coin shows head-side up after a finite number of moves.

Solution

The answer is all (m,n)(m, n) satisfying 3mn3 \mid mn.

Construction: Without loss of generality assume 3m3 \mid m. When 2n2 \mid n, we can flip all coins using the method shown in the left figure:
Figure 1

When 2n2 \nmid n, first use the above method to flip all coins in the left m×(n1)m \times (n-1) portion to heads-up, leaving the rightmost column tails-up. Next, let L(i,j)L(i, j) denote the LL-shaped operation that flips the coins at positions (i,j)(i, j), (i+1,j)(i+1, j), and (i,j+1)(i, j+1), and let R(i,j)R(i, j) denote the operation that flips the coins at positions (i,j)(i, j), (i,j1)(i, j-1), and (i1,j)(i-1, j). Then note that the three consecutive operations R(i,n)R(i, n), R(i+1,n)R(i+1, n), L(i,n1)L(i, n-1) will flip the coins at the three positions from (i1,n)(i-1, n) to (i+1,n)(i+1, n) while keeping all other coins unchanged, so we can use this method to also flip the rightmost column to heads-up.

Bound: Assign values to the grid as shown in the figure on the right, and let T(i)T(i) be the total number of heads-up coins in the cells assigned the value ii. Note that initially T(0)=T(1)=T(2)=0T(0) = T(1) = T(2) = 0, and in each move, the parities of T(1)T(0)T(1) - T(0) and T(2)T(1)T(2) - T(1) never change. This means we always have T(0)T(1)T(2)(mod2)T(0) \equiv T(1) \equiv T(2) \pmod{2}. In other words, in order to be able to flip all coins to heads-up, the numbers of cells assigned the values 0, 1, and 2 must have the same parity. However, direct computation shows that:

- When mn1(mod3)mn \equiv 1 \pmod{3}, we have T(0)1=T(1)=T(2)=mn13T(0) - 1 = T(1) = T(2) = \frac{mn-1}{3};
- When mn2(mod3)mn \equiv 2 \pmod{3}, we have T(0)1=T(1)T(2)=mn23T(0) - 1 = T(1) - T(2) = \frac{mn-2}{3}.

Therefore 3mn3 \mid mn is a necessary condition for being able to flip all coins to heads-up.

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement translated into English from zh; metadata (topic, difficulty) added by this project.