Maths Olympiad Prep

Library / /58 of 61

Combinatorics Difficulty 7.5 National olympiad, round 2 Prove it Belarus

Given an n×nn \times n table with one of two signs "+" or "-" in any of its cells. Per move one can replace the signs in all cells of some row (or of some column) by the opposite signs. At the beginning there are exactly two minuses in the table (all other signs are pluses). After some moves the table with exactly 9 minuses is obtained.
Find the smallest and the greatest values of nn.
(I. Voronovich)

Solution

Answer: n=5,n=11n = 5, n = 11.

Note that if the operation of the sign changes is applied even times to some row (column), then it is equivalent that the operation is not applied at all. If the operation of the sign changes is applied odd times to some row (column), then it is equivalent that the operation is applied one time only. So we suppose that the operation is applied exactly once to some rows (columns), and is not applied to the remaining rows (columns). Let the operation of sign changes be applied to xx rows and yy columns. Then the total number of the cells in which the signs is changed is equal to c=nx+ny2xyc = nx + ny - 2xy. We rewrite the equality as
(n2x)(n2y)=n22c.(1) (n - 2x) \cdot (n - 2y) = n^2 - 2c. \quad (1)

Note that cc may admit the values 7, 9 or 11 depending on the number 0, 1 or 2 of initial minuses which is changed by pluses. If nn is even, then the number of minuses after any operation keeps its parity, but after all operations this parity is changed (292 \rightarrow 9), a contradiction. So nn is odd. Therefore, both the co-factors (n2x)(n - 2x) and (n2y)(n - 2y) are odd and are no more than nn (since 0xn0 \le x \le n, 0yn0 \le y \le n). If at least one of them is equal to ±n\pm n, then the right-hand side of (1) is a multiple of nn, so cnc \ne n, which gives nc11n \ge c \ge 11. If n2x<n|n-2x| < n, n2y<n|n-2y| < n, then n2xn2|n-2x| \le n-2, n2yn2|n-2y| \le n-2 (nn is odd). Then n22c(n2)2|n^2 - 2c| \le (n-2)^2, in particular, n22cn24n+4n^2 - 2c \le n^2 - 4n + 4, so nc+22132n \le \frac{c+2}{2} \le \frac{13}{2}. It follows that n5n \le 5 (nn is odd). In any case n11n \le 11. Note that the case n=1n=1 is impossible, since the 1×11 \times 1 board has not contain 9 minuses. It remains to consider the following cases:

1) n=3n=3. We have (32x)(32y)=914=5(3-2x) \cdot (3-2y) = 9-14=-5 or (32x)(32y)=918=9(3-2x) \cdot (3-2y) = 9-18=-9, or (32x)(32y)=922=13(3-2x) \cdot (3-2y) = 9-22=-13. Here only -9 can be presented as product of two numbers no greater than 3. It is possible only if x=3x=3, y=0y=0 or x=0x=0, y=3y=3. It is evident that both these cases cannot be realized.

2) n=5n=5. It is easy to see that if both the minuses are in the left bottom cells of 5×55 \times 5 board and we change the signs in the first column and in the first two rows, the new board will contain exactly 9 minuses. It follows that the smallest value of NN is equal to 5.

3) n=11n=11. It is easy to see that if both the minuses are in the left bottom cells of 11×1111 \times 11 board and we change the signs in the first column, the new board will contain exactly 9 minuses. It follows that the greatest value of NN is equal to 11.

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 and solution reproduced as published; topic and difficulty added by this site.