Olympiad Maths Prep

Library / /4 of 4

Combinatorics Difficulty 7.9 National olympiad, round 2 Prove it South Korea

We are given a rectangular m×nm \times n chessboard with mm unit squares in each row and nn unit squares in each column. We are going to assign an integer to each unit square. A rectangle RR consisting of one or more unit squares is called a *shelf* if there is an integer hh satisfying the following two conditions:

1. The number in each unit square in RR is larger than hh.
2. The number in a unit square out of RR sharing an edge or a point with RR is at most hh.

(We assume that a shelf RR contains all interior unit squares in the rectangle.) What is the number of shelves if we assign integers to maximize the number of shelves?

Solution

The answer is (n+1)(m+1)21\left\lfloor \dfrac{(n+1)(m+1)}{2} \right\rfloor - 1.

For a shelf RR, let R~\tilde{R} be the rectangular area by extending RR by 1 row to the top and 1 column to the left. Let us also extend the initial chessboard by 1 row to the top and 1 column to the left. We assign -\infty to each of those new unit squares so that the number of shelves is preserved. For a shelf RR, let us call the integer hh satisfying two conditions the *height* of RR.

Claim 1: If two shelves R1R_1 and R2R_2 do not intersect, then R~1R~2=\tilde{R}_1 \cap \tilde{R}_2 = \emptyset.

Proof of Claim 1: Let h1,h2h_1, h_2 be the height of R1,R2R_1, R_2 respectively. Without loss of generality, let us assume h1h2h_1 \le h_2. If R~1R~2\tilde{R}_1 \cap \tilde{R}_2 \ne \emptyset, then some unit square xx in R2R_2 is adjacent to R1R_1 and therefore the integer in xx is less than or equal to h1h_1. Since xR2x \in R_2, the integer in xx is larger than h2h_2, contradictory to the assumption that h1h2h_1 \le h_2. This proves Claim 1.

Claim 2: If R1R_1 and R2R_2 are distinct maximal shelves smaller than the whole chessboard, then R1R2=R_1 \cap R_2 = \emptyset.

Proof of Claim 2: Let h1,h2h_1, h_2 be the height of R1,R2R_1, R_2 respectively. Without loss of generality, let us assume h1h2h_1 \le h_2. Suppose that R1R2R_1 \cap R_2 \ne \emptyset. Suppose a unit square xx in R2R_2 shares at least one point with R1R_1. If xx does not belong to R1R_1, then the integer in xx should be at most h1h_1 but since xR2x \in R_2, the integer in xx should be larger than h2h_2, contradictory to the assumption that h1h2h_1 \le h_2. So such xx belongs to R1R_1 and therefore R2R1R_2 \subseteq R_1. However this contradicts to the assumption that R2R_2 is maximal. So Claim 2 is proved.

Claim 3: The number of shelves in the n×mn \times m chessboard is less than or equal to (n+1)(m+1)21\dfrac{(n+1)(m+1)}{2} - 1.

Proof of Claim 3: We proceed by induction on n+mn+m. If n+m=2n+m=2, then n=m=1n=m=1 and the number of shelves is 1.

Now let us assume n+m>2n+m > 2. Let R1,R2,,RkR_1, R_2, \dots, R_k be the maximal shelves strictly smaller than the whole n×mn \times m chessboard.

By Claims 1 and 2, R~iR~j=\tilde{R}_i \cap \tilde{R}_j = \emptyset. By the induction hypothesis, the number of shelves contained in RiR_i for each ii is at most R~i/21|\tilde{R}_i|/2 - 1. Therefore the number of all shelves is at most
i=1k(R~i21)(n+1)(m+1)2k1. \sum_{i=1}^{k} \left( \left\lfloor \dfrac{|\tilde{R}_i|}{2} \right\rfloor - 1 \right) \le \dfrac{(n+1)(m+1)}{2} - k - 1.
So Claim 3 is proved if k>1k > 1. We may now assume that k=1k=1. Then it is enough to show that
max(m(n+1)2(m+1)n2)1+1(n+1)(m1)21. \max \left( \dfrac{m(n+1)}{2} \cdot \dfrac{(m+1)n}{2} \right) - 1 + 1 \le \dfrac{(n+1)(m-1)}{2} - 1.
It is easy to see this because n1n \ge 1 is equivalent to the inequality that m+n12(n+1)(m+1)21\dfrac{m+n-1}{2} \le \dfrac{(n+1)(m+1)}{2} - 1. This proves Claim 3.

Now it remains to show that there is an assignment of integers so that the number of shelves is exactly (n+1)(m+1)21\left\lceil \dfrac{(n+1)(m+1)}{2} \right\rceil - 1. We proceed by induction on n+mn+m. It is trivial if max(n,m)2\max(n,m) \le 2.

Now by symmetry let us assume that m>2m > 2. Let us write 1 in each unit square on the second row. For the first row, we write integers larger than 1 obtained by the induction hypothesis on a 1×n1 \times n chessboard. For the remaining rows, we write integers larger than 1 obtained by the induction hypothesis on a (m2)×n(m-2) \times n chessboard.

Now the number of shelves in this assignment is
1+2(n+1)21+(m1)(n+1)21 1 + \left\lfloor \dfrac{2(n+1)}{2} - 1 \right\rfloor + \left\lceil \dfrac{(m-1)(n+1)}{2} - 1 \right\rceil
by the induction hypothesis. This completes the proof. \Box

Looking for a route rather than 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.