Maths Olympiad Prep

Library / Japan Mathematical Olympiad /72 of 84

Japan Mathematical Olympiad

Combinatorics Difficulty 7.6 National Olympiad, round 2 Prove it Japan

Let nn be a positive integer. Determine all integers 1≤k≤2n21 \le k \le 2n^2 satisfying the following condition.

> There is a 2n×2n2n \times 2n board. When kk distinct cells are chosen and colored black, while the other cells are colored white, the minimum number of the 2×22 \times 2 squares which have both black and white cells is 2n−12n-1.

Solution

In this answer, the rows are numbered from the top and, the columns are numbered from the left. We denote the cell in the ii-th row, the jj-th column by (i,j)(i, j), 2×22 \times 2 square consisting of (i,j)(i, j), (i+1,j)(i+1, j), (i,j+1)(i, j+1), (i+1,j+1)(i+1, j+1) by [i,j][i, j]. Also, a set of cells is said to be mixed, if it has both black and white cells.

First, we consider the case 1≤k≤n21 \le k \le n^2. Let 0≤a≤n−10 \le a \le n-1, 1≤b≤n1 \le b \le n be integers satisfying k=an+bk = an + b. We color cells (i,j)(i, j) black if 1≤i≤a1 \le i \le a, 1≤j≤n1 \le j \le n or i=a+1i = a+1, 1≤j≤b1 \le j \le b and color the other cells white. In this coloring, [i,j][i, j] is mixed if and only if 1≤i≤a1 \le i \le a, j=nj = n or i=ai = a, b≤j<nb \le j < n, or i=a+1i = a+1, 1≤j≤b1 \le j \le b. Hence, the number of mixed 2×22 \times 2 squares is bb if a=0a = 0, n+an+a if a≥1a \ge 1. Therefore, k≤n2−nk \le n^2 - n does not satisfy the condition in the problem statement, while for n2−n+1≤k≤n2n^2 - n + 1 \le k \le n^2, we can color the board such that there are exactly 2n−12n-1 mixed 2×22 \times 2 squares.

Secondly, we consider the case n2−n+1≤k≤2n2n^2 - n + 1 \le k \le 2n^2. We show that there exist at least 2n−12n-1 mixed 2×22 \times 2 squares in this case. In the case that all rows are mixed, there exists 1≤j<2n1 \le j < 2n for any 1≤i<2n1 \le i < 2n such that the colors of (i,j)(i, j) and (i,j+1)(i, j+1) are different, and [i,j][i, j] is mixed for such jj. Hence, the number of mixed 2×22 \times 2 squares is at least 2n−12n-1. Similarly, this argument works also in the case all columns are mixed. Therefore, we only have to check the case when there exist a row and a column whose all cells have the same color. We show the following lemma.

Lemma. Let R,CR, C be positive integers. Each cell in a R×CR \times C board is colored black or white. If all cells in the first row and the first column have the same color, and there are mm cells which have the other color, the number of mixed 2×22 \times 2 squares is at least 2m−12\sqrt{m} - 1.

Proof. Since the case m=0m=0 is trivial, we assume that m≥1m \ge 1. When the number of mixed rows is aa and the number of mixed columns is bb, we show that there exist at least a+b−1a+b-1 mixed 2×22 \times 2 squares. Since rows and columns are mixed if they have a cell whose color is different from that of the top left cell, ab≥mab \ge m holds. We only have to show it since a+b≥2ab≥2ma+b \ge 2\sqrt{ab} \ge 2\sqrt{m} by AM-GM inequality.

We create a graph GG whose vertices are mixed 2×22 \times 2 squares and the set of edges are defined as follows. (The terms of graph theory in the following are explained at the end of this answer.)

For each integer 1<i<R1 < i < R, if the ii-th row is mixed, we choose an integer 1≤j<C1 \le j < C such that (i,j)(i, j) and (i,j+1)(i, j+1) have different colors and connect [i−1,j][i-1, j] and [i,j][i, j] by an edge. Similarly, for each integer 1<j<C1 < j < C, if the jj-th column is mixed, we choose an integer 1≤i<R1 \le i < R such that (i,j)(i, j) and (i+1,j)(i+1, j) have different colors and connect [i,j−1][i, j-1] and [i,j][i, j] by an edge.

We show that GG has no cycle. Take any edge in GG. Without loss of generality, we can assume that this edge connects [i−1,j][i-1, j] and [i,j][i, j] for some 1<i<R1 < i < R and 1≤j<C1 \le j < C. By the definition of the set of edge of GG, none of the other edges connect a 2×22 \times 2 square located in the 1st to ii-th rows and a 2×22 \times 2 square located in the ii-th to RR-th rows, from which GG has no cycle.

GG has at least one vertex by m≥1m \ge 1. Since GG has no cycle, each connected component of GG is a tree, and the number of the vertices is bigger than that of the edges exactly by 1. Therefore, denoting the number of the vertices and the edges and the connected components of GG by VV, EE, CC respectively, we have V=E+CV = E + C. By the definition of the set of edges, E≥(a−1)+(b−1)E \ge (a-1) + (b-1) holds and, combined with C≥1C \ge 1, we have V≥a+b−1V \ge a+b-1, which is what we wanted to show. ■

We take 1≤i,j,≤2n1 \le i, j, \le 2n such that all the cells in the ii-th row and jj-th column have the same color. We denote the number of cells with the other color
* in the 1st to ii-th rows, the 1st to jj-th columns by aa,
* in the 1st to ii-th rows, the jj-th to 2n2n-th columns by bb,
* in the ii-th to 2n2n-th rows, the 1st to jj-th columns by cc,
* in the ii-th to 2n2n-th rows, the jj-th to 2n2n-th columns by dd.

Denoting max⁡{0,2m−1}\max\{0, 2\sqrt{m} - 1\} by f(m)f(m), the number of mixed 2×22 \times 2 squares is at least f(a)+f(b)+f(c)+f(d)f(a) + f(b) + f(c) + f(d) by the lemma. We define g(m)=f(m)mg(m) = \frac{f(m)}{m} for m≥1m \ge 1 and g(0)=g(1)=1g(0) = g(1) = 1. Then, ff is weakly monotonically increasing and f(m)=mg(m)f(m) = mg(m) for any m≥0m \ge 0. Also, since for any 1≤l≤m1 \le l \le m,
g(m)−g(l)=2m−1m−2l−1l=(2m−2l)−(1m−1l)=(2m−2l)(1−(12m+12l))≤0 \begin{aligned} g(m) - g(l) &= \frac{2\sqrt{m} - 1}{m} - \frac{2\sqrt{l} - 1}{l} \\ &= \left( \frac{2}{\sqrt{m}} - \frac{2}{\sqrt{l}} \right) - \left( \frac{1}{m} - \frac{1}{l} \right) \\ &= \left( \frac{2}{\sqrt{m}} - \frac{2}{\sqrt{l}} \right) \left( 1 - \left( \frac{1}{2\sqrt{m}} + \frac{1}{2\sqrt{l}} \right) \right) \\ &\le 0 \end{aligned}

equals to kk or 4n2−k4n^2 - k, we have a+b+c+d≥k≥n2−n+1a+b+c+d \ge k \ge n^2 - n + 1 by n2−n+1≤k≤2n2n^2 - n + 1 \le k \le 2n^2 and have
f(a)+f(b)+f(c)+f(d)=ag(a)+bg(b)+cg(c)+dg(d)≥ag(a+b+c+d)+bg(a+b+c+d)+cg(a+b+c+d)+dg(a+b+c+d)=(a+b+c+d)g(a+b+c+d)=f(a+b+c+d)≥f(n2−n+1)>2n−2. \begin{aligned} f(a) + f(b) + f(c) + f(d) \\ &= ag(a) + bg(b) + cg(c) + dg(d) \\ &\ge ag(a+b+c+d) + bg(a+b+c+d) + cg(a+b+c+d) + dg(a+b+c+d) \\ &= (a+b+c+d)g(a+b+c+d) \\ &= f(a+b+c+d) \\ &\ge f(n^2 - n + 1) \\ &> 2n - 2. \end{aligned}

Therefore, there exist at least 2n−12n-1 mixed 2×22 \times 2 squares. Especially, for kk in n2−n+1≤k≤n2n^2-n+1 \le k \le n^2 satisfy the condition in the problem statement.

Lastly, we consider the case n2+1≤k≤2n2n^2 + 1 \le k \le 2n^2. We show that kk is a multiple of 2n2n if the number of the mixed 2×22 \times 2 squares is 2n−12n-1. Since the case n=1n=1 is obvious, we assume that n≥2n \ge 2.

If all cells in a row and a column have the same color, the argument above shows that there exist at least f(k)f(k) mixed 2×22 \times 2 squares. By f(k)>2n−1f(k) > 2n-1, this case is excluded. Hence, without loss of generality, we can assume that all the rows are mixed. In this case, for any 1≤i<2n1 \le i < 2n, there exists exactly one 1≤j<2n1 \le j < 2n such that [i,j][i, j] is mixed. Therefore, for any 1≤i≤2n1 \le i \le 2n, there exists exactly one 1≤j<2n1 \le j < 2n such that (i,j)(i, j) and (i,j+1)(i, j+1) have different colors and jj is the same value for any ii. The shared value jj is denoted simply by jj. If (i,1)(i, 1) and (i+1,1)(i+1, 1) have different colors for some 1≤i<2n1 \le i < 2n, (i,2n)(i, 2n) and (i+1,2n)(i+1, 2n) also have different colors and both [i,1][i, 1] and [i,2n−1][i, 2n-1] are mixed, which contradicts since n≥2n \ge 2. Therefore, since (i,1)(i, 1) and (i+1,1)(i+1, 1) have the same color for any 1≤i<2n1 \le i < 2n, the number of the cells which have the same color as (1,1)(1, 1) is 2jn2jn and the number of the cells which have the same color as (1,2n)(1, 2n) is 2n(2n−j)2n(2n-j), which shows that kk is a multiple of 2n2n.

We assume that kk is a multiple of 2n2n and a=k2na = \frac{k}{2n}. When the cell in the 1st to aa-th columns are colored black and the other cells are colored white, the number of mixed 2×22 \times 2 squares is 2n−12n-1. Therefore, in the case n2+1≤k≤2n2n^2 + 1 \le k \le 2n^2, the condition in the problem statement is satisfied if and only if kk is a multiple of 2n2n.

From all the arguments above, the values kk which satisfy the condition in the problem statements are all n2−n+1≤k≤n2n^2-n+1 \le k \le n^2 and all multiples of 2n2n in n2+1≤k≤2n2n^2+1 \le k \le 2n^2.

Want a route through all this instead of an archive? The track puts 2,604 problems in a working order, from Junior Challenge level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.