Browse · MathNet
PrintChina Mathematical Competition (Complementary Test)
China counting and probability
Problem
Given a array with each cell containing a positive integer, we say a subarray of is a “good rectangle” if the sum of the numbers in its cells is a multiple of , and call a cell of “bad” if it is not contained in any “good rectangle”. Find the maximum number of “bad cells” in .
Solution
We first claim that the number of “bad cells” in is no more than . Otherwise, there will be at most one cell in that is not “bad”. Without loss of generality, we assume the cells in the first row of are all “bad”. Then let the numbers from top to bottom in the th column be () in turn, and define with . We are going to prove that three number groups , , and each form a complete set of residues modulo :
If there exist such that , then which means that the cells in the first row and from columns to form a “good rectangle”. But it is a contradiction to the assumption that the cells in the first row are all “bad”.
If there exist such that , then So the cells ranging from rows to and columns to form a “good rectangle”, which means there are at least two cells that are not “bad”. But it is also a contradiction.
In a similar way, we can also prove that there are no such that Therefore, we have Then It is again a contradiction! Therefore, the number of “bad cells” in is no more than .
On the other hand, we can construct a array in the following and check that each cell in it that does not contain number is “bad”.
Therefore, we find out that the maximum number of “bad cells” in is .
If there exist such that , then which means that the cells in the first row and from columns to form a “good rectangle”. But it is a contradiction to the assumption that the cells in the first row are all “bad”.
If there exist such that , then So the cells ranging from rows to and columns to form a “good rectangle”, which means there are at least two cells that are not “bad”. But it is also a contradiction.
In a similar way, we can also prove that there are no such that Therefore, we have Then It is again a contradiction! Therefore, the number of “bad cells” in is no more than .
On the other hand, we can construct a array in the following and check that each cell in it that does not contain number is “bad”.
| 1 | 1 | 1 | 2 | 1 | 1 | 1 | 1 | 10 |
|---|---|---|---|---|---|---|---|---|
| 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
| 1 | 1 | 1 | 10 | 1 | 1 | 1 | 1 | 2 |
Final answer
25
Techniques
Pigeonhole principleOther