Browse · MathNet
PrintBelarusian Mathematical Olympiad
Belarus counting and probability
Problem
Given an 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 . (I. Voronovich)
Solution
Answer: .
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 rows and columns. Then the total number of the cells in which the signs is changed is equal to . We rewrite the equality as
Note that 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 is even, then the number of minuses after any operation keeps its parity, but after all operations this parity is changed (), a contradiction. So is odd. Therefore, both the co-factors and are odd and are no more than (since , ). If at least one of them is equal to , then the right-hand side of (1) is a multiple of , so , which gives . If , , then , ( is odd). Then , in particular, , so . It follows that ( is odd). In any case . Note that the case is impossible, since the board has not contain 9 minuses. It remains to consider the following cases:
1) . We have or , or . Here only -9 can be presented as product of two numbers no greater than 3. It is possible only if , or , . It is evident that both these cases cannot be realized.
2) . It is easy to see that if both the minuses are in the left bottom cells of 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 is equal to 5.
3) . It is easy to see that if both the minuses are in the left bottom cells of 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 is equal to 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 rows and columns. Then the total number of the cells in which the signs is changed is equal to . We rewrite the equality as
Note that 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 is even, then the number of minuses after any operation keeps its parity, but after all operations this parity is changed (), a contradiction. So is odd. Therefore, both the co-factors and are odd and are no more than (since , ). If at least one of them is equal to , then the right-hand side of (1) is a multiple of , so , which gives . If , , then , ( is odd). Then , in particular, , so . It follows that ( is odd). In any case . Note that the case is impossible, since the board has not contain 9 minuses. It remains to consider the following cases:
1) . We have or , or . Here only -9 can be presented as product of two numbers no greater than 3. It is possible only if , or , . It is evident that both these cases cannot be realized.
2) . It is easy to see that if both the minuses are in the left bottom cells of 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 is equal to 5.
3) . It is easy to see that if both the minuses are in the left bottom cells of 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 is equal to 11.
Final answer
n = 5, n = 11
Techniques
Invariants / monovariantsInclusion-exclusion