Maths Olympiad Prep

Library / /10 of 10

, 2023

Combinatorics Difficulty 9.2 IMO level Prove it China

Find the largest positive integer mm such that there is a way to color some of the cells red in a 70×7070 \times 70 grid, satisfying the following two conditions:
(1) There do not exist two red cells such that the number of red cells in the row they belong to and the number of red cells in the column they belong to are the same;
(2) There are at least 2 rows each containing exactly mm red cells.

Solution

Let the row with the maximum number of red squares (let's assume it's the first row) have aa red squares, and the column with the maximum number of red squares (let's assume it's the first column) have bb red squares. If a>ba > b, consider the aa columns in which the aa red squares of the first row are located. These columns must have distinct numbers of red squares and can only be chosen from 1,2,,b1, 2, \dots, b. This leads to a contradiction. Similarly, we can show that aa cannot be less than bb. Therefore, we conclude that a=ba = b. Moreover, the number of red squares in the columns where the red squares of the first row are located must be a permutation of 1,2,,a1, 2, \dots, a, and the number of red squares in the rows where the red squares of the first column are located must also be a permutation of 1,2,,a1, 2, \dots, a. In other words, for any 1ia1 \le i \le a, there exist rows with exactly ii red squares and columns with exactly ii red squares.

Next, we prove that there exists a coloring that satisfies condition (1) and has xix_i rows with exactly ii red squares and yiy_i columns with exactly ii red squares (xi,yiZ>0x_i, y_i \in \mathbb{Z}_{>0}, i=1,2,,ai = 1, 2, \dots, a), if and only if there exists a coloring of an a×aa \times a grid such that the iith row has exactly ixiix_i red squares and the iith column has exactly iyiiy_i red squares (i=1,2,,ai = 1, 2, \dots, a). (*).

First, we prove the necessity. If the coloring of a 70×7070 \times 70 grid PP satisfies condition (1), we construct an a×aa \times a grid QQ with the following coloring: for any i,j{1,2,,a}i, j \in \{1, 2, \dots, a\}, the cell in the iith row and jjth column of QQ is colored red if and only if PP has a red cell in a row with exactly ii red cells and a column with exactly jj red cells (denoted as T(i,j)T(i, j)). Note that in PP, the number of red cells in a row with exactly ii red cells is ixiix_i, and the numbers of red cells in their corresponding columns are distinct. Therefore, QQ satisfies T(i,j)T(i, j) if and only if there are exactly ixiix_i red cells in column jj, which implies that the iith row of QQ has exactly ixiix_i red cells. Similarly, the iith column of QQ has exactly iyiiy_i red cells. Thus, the necessity is proved.

Next, we prove the sufficiency. Assume that the a×aa \times a grid QQ has exactly ixiix_i red cells in the iith row and exactly iyiiy_i red cells in the iith column. We construct a 70×7070 \times 70 grid PP as follows: we label all rows of PP as R(i,x)R(i, x) (1xxi1 \le x \le x_i) and all columns of PP as C(i,y)C(i, y) (1yyi1 \le y \le y_i). Then, we color the cells of PP as follows: if the cell in the iith row and jjth column of QQ is red, we mark (i,j)(i, j) as a good pair. For each good pair (i0,j0)(i_0, j_0), we define v(i0,j0)v(i_0, j_0) as the index of jj (in ascending order) such that (i0,j)(i_0, j) is a good pair, and u(i0,j0)u(i_0, j_0) as the index of ii (in ascending order) such that (i,j0)(i, j_0) is a good pair. Then, in PP, we color the intersection of row R(i0,v(i0,j0)i0)R(i_0, \lfloor \frac{v(i_0, j_0)}{i_0} \rfloor) and column C(j0,u(i0,j0)j0)C(j_0, \lfloor \frac{u(i_0, j_0)}{j_0} \rfloor) red. In this way, each good pair (i0,j0)(i_0, j_0) is associated with only one pair of row R(i0,x)R(i_0, x) and column C(j0,y)C(j_0, y), satisfying condition (1). Moreover, for any row R(i0,x)R(i_0, x), the red cells correspond to jj values that are the (x1)i0+1(x-1)i_0 + 1st, (x1)i0+2(x-1)i_0 + 2nd, ..., xi0xi_0th smallest jj among all good pairs (i0,j0)(i_0, j_0). Thus, this row has exactly i0i_0 red cells. Similarly, each column C(j0,y)C(j_0, y) has exactly j0j_0 red cells. Therefore, the sufficiency is proved, and thus (*) holds.

Returning to the original problem, let's first construct an example for m=32m = 32. Consider a 64×6464 \times 64 grid QQ, where the cell in the iith row and jjth column is colored red if and only if i+j66i + j \le 66. This coloring ensures that each row of QQ has a decreasing number of red cells from 64 to 2, and each column has the same pattern. Now, let
a=64,x32=x16=x8=x4=x2=x1=y32=y16=y8=y4=y2=y1=2, a = 64, \quad x_{32} = x_{16} = x_8 = x_4 = x_2 = x_1 = y_{32} = y_{16} = y_8 = y_4 = y_2 = y_1 = 2,
while all other xix_i and yiy_i are set to 1. According to (*) and the above construction, we know that there exists a grid PP that satisfies condition (1) and has two rows with exactly 32 red cells. Thus, we have shown that m=32m = 32 meets the requirements of the problem.

Finally, we prove that mm cannot be greater than 32. Note that when xi2x_i \ge 2, we have 2ma692m \le a \le 69, which implies m34m \le 34. We only need to show that mm cannot equal 33 or 34.
In this case, we only need to consider a{66,67,68,69}a \in \{66, 67, 68, 69\}. For the grid QQ and any r,sar, s \le a, the difference between the total number of red cells in any rr rows and the total number of red cells in any ss columns is no more than the total number of red cells in those rr rows and the remaining asa-s columns, which is no more than r(as)r(a-s).

If a=69a = 69, then we have xm=2x_m = 2 and all other xix_i can only be 1. From calculating twice, we find that only ym=2y_m = 2 and all other yiy_i can only be 1. In this case, in the grid QQ, the top 5 rows with the maximum number of red cells have at least 69+68+67+66+6669+68+67+66+66 red cells, while the leftmost 5 columns with the minimum number of red cells have 1+2+3+4+51+2+3+4+5 red cells. However,
(69+68+67+66+66)(1+2+3+4+5)>5(695), (69 + 68 + 67 + 66 + 66) - (1 + 2 + 3 + 4 + 5) > 5 \cdot (69 - 5),
which leads to a contradiction!

If a=68a = 68, similarly, we have
(68+67+66+66+66)(1+2+3+4)>4(684), (68 + 67 + 66 + 66 + 66) - (1 + 2 + 3 + 4) > 4 \cdot (68 - 4),
which means that at least one of y1,y2,y3,y4y_1, y_2, y_3, y_4 is not less than 2.
Since
(68+67+66+66+65+64+63+62)(1+2+3+4+5+6+7+8)8(688)>4, (68 + 67 + 66 + 66 + 65 + 64 + 63 + 62) - (1 + 2 + 3 + 4 + 5 + 6 + 7 + 8) - 8 \cdot (68 - 8) > 4,
we have i=18(yi1)2\sum_{i=1}^{8}(y_i - 1) \ge 2. Furthermore, notice that
(68+67+66+66+65++54)(1+2++16)16(6816)>4+8, (68 + 67 + 66 + 66 + 65 + \dots + 54) - (1 + 2 + \dots + 16) - 16 \cdot (68 - 16) > 4 + 8,
which implies i=116(yi1)3\sum_{i=1}^{16}(y_i - 1) \ge 3. However, this contradicts the fact that i=168(yi1)=2\sum_{i=1}^{68}(y_i - 1) = 2.

If a=67a = 67 (in this case, m=33m = 33), similarly, we have
(67+66+66+66)(1+2+3)>3(673), (67 + 66 + 66 + 66) - (1 + 2 + 3) > 3 \cdot (67 - 3),
which implies that at least one of y1,y2,y3y_1, y_2, y_3 is not less than 2. Additionally, we have
(67+66+66+65+64+63)(1+2+3+4+5+6)6(676)>3, (67 + 66 + 66 + 65 + 64 + 63) - (1 + 2 + 3 + 4 + 5 + 6) - 6 \cdot (67 - 6) > 3,
which means that i=16(yi1)2\sum_{i=1}^{6}(y_i - 1) \ge 2. Furthermore, we have
(67+66+66+65++57)(1+2++12)12(6712)>3+6, (67 + 66 + 66 + 65 + \dots + 57) - (1 + 2 + \dots + 12) - 12 \cdot (67 - 12) > 3 + 6,
implying that i=112(yi1)3\sum_{i=1}^{12}(y_i - 1) \ge 3. Finally, we have
(67+66+66+65++45)(1+2++24)24(6724)>3+6+12, (67 + 66 + 66 + 65 + \dots + 45) - (1 + 2 + \dots + 24) - 24 \cdot (67 - 24) > 3 + 6 + 12,
which shows that i=124(yi1)4\sum_{i=1}^{24}(y_i - 1) \ge 4. However, this contradicts the fact that i=167(yi1)=3\sum_{i=1}^{67}(y_i - 1) = 3.

If a=66a = 66 (in this case, m=33m = 33), we have two values of ixiix_i equal to 66, indicating that all iyiiy_i are not less than 2, i.e., y12y_1 \ge 2. Similarly, we have
(66+66+65)(1+2)3(662)>1, (66 + 66 + 65) - (1 + 2) - 3 \cdot (66 - 2) > 1,
which implies i=12(yi1)2\sum_{i=1}^{2}(y_i - 1) \ge 2. Furthermore, we have
(66+66+65+64+63)(1+2+3+4)5(664)>1+2, (66 + 66 + 65 + 64 + 63) - (1 + 2 + 3 + 4) - 5 \cdot (66 - 4) > 1 + 2,
implying i=14(yi1)3\sum_{i=1}^{4}(y_i - 1) \ge 3. Additionally, we have
(66+66+65++59)(1+2++8)9(668)>1+2+4, (66 + 66 + 65 + \cdots + 59) - (1 + 2 + \cdots + 8) - 9 \cdot (66 - 8) > 1 + 2 + 4,
which shows i=18(yi1)4\sum_{i=1}^{8}(y_i - 1) \ge 4. Moreover, we have
(66+66+65++51)(1+2++16)17(6616)>1+2+4+8, (66 + 66 + 65 + \cdots + 51) - (1 + 2 + \cdots + 16) - 17 \cdot (66 - 16) > 1 + 2 + 4 + 8,
implying i=116(yi1)5\sum_{i=1}^{16}(y_i - 1) \ge 5. However, this contradicts the fact that i=166(yi1)=4\sum_{i=1}^{66}(y_i - 1) = 4.

In conclusion, the maximum value of mm that satisfies the conditions is 32. \square

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.