Maths Olympiad Prep

Library / /14 of 15

Combinatorics Difficulty 7.7 National Olympiad, round 2 Prove it Argentina

Each cell of an n×nn \times n grid square is colored black or white. We call such a coloring nice if every 2×22 \times 2 square covers an even number of black cells, and every cross covers an odd number of black cells. Find all n3n \ge 3 such that in each nice coloring the four corner cells have the same color.
Figure 1

Solution

Color row 1 black and rows 2, 3 white. Then extend the coloring periodically with the remaining rows until the entire square is colored. It is immediate that the obtained coloring is nice. If n0(mod3)n \equiv 0 \pmod{3} or n2(mod3)n \equiv 2 \pmod{3}, the last row is white while the first one is black. So a necessary condition on nn is n1(mod3)n \equiv 1 \pmod{3}. We prove that it is sufficient.
Figure 2

For n1(mod3)n \equiv 1 \pmod{3}, consider a nice coloring. For convenience write 0 in each white cell and 1 in each black cell. Then each 2×22 \times 2 square covers numbers with even sum, and each cross covers numbers with odd sum. We need the following observations.

a. Consider two squares 2×22 \times 2 sharing one corner cell. The sum of the 8 numbers they cover, which is even, equals a+b+ca+b+c plus the sum of the numbers in the cross with center bb, which is odd. It follows that a+b+ca+b+c is odd. By symmetry this holds for every 3 consecutive diagonal cells, in both directions.
Figure 3

b. Let 4 consecutive diagonal cells cover the numbers aa, bb, cc, dd in this order. By a), a+b+ca+b+c and b+c+db+c+d are odd, hence aa and dd have the same parity. Because both are 0 or 1, they are in fact equal: a=da=d.

c. We claim that the four corner cells of each 4×44 \times 4 squares contain equal numbers. Let them be aa, bb, cc, dd, and let central four numbers be ee, ff, gg, hh as in the figure. The latter are covered by a 2×22 \times 2 square, hence e+he+h and f+gf+g have the same parity (their sum is even). By a) the parity of aa (respectively bb) is opposite to the one of e+he+h (respectively f+gf+g). It follows that aa and bb have the same parity. Hence they are equal. In addition a=da=d and b=cb=c by b), therefore a=b=c=da=b=c=d.
Figure 4

Observation c) is enough to finish the solution. It implies that the coloring is periodic with period 3, horizontally or vertically. Set n=3k+1n=3k+1 and consider the numbers in cells 1, 4, 7, ..., 3k+1=n3k+1=n of any row. By c) they are equal, in particular so are the numbers in the first and the last cell. By symmetry, the extremal cells in each column have equal numbers. Consequently the four corner numbers in the table are equal.

In conclusion the numbers satisfying the condition are n1(mod3)n \equiv 1 \pmod{3}.

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 reproduced verbatim; metadata (topic, difficulty) added by this project.