Olympiad Maths Prep

Track / Stage 9 / 36 of 80 #1916 of 2000

Problem 1916

IMO P2/P5; hard shortlist
Combinatorics Difficulty 9.2 Prove it IMO 2006 Shortlisted Problems · IMO · 2006

A cake has the form of an n×nn \times n square composed of n2n^2 unit squares. Strawberries lie on some of the unit squares so that each row or column contains exactly one strawberry; call this arrangement A\mathcal{A}.
Let B\mathcal{B} be another such arrangement. Suppose that every grid rectangle with one vertex at the top left corner of the cake contains no fewer strawberries of arrangement B\mathcal{B} than of arrangement A\mathcal{A}. Prove that arrangement B\mathcal{B} can be obtained from A\mathcal{A} by performing a number of switches, defined as follows:
A switch consists in selecting a grid rectangle with only two strawberries, situated at its top right corner and bottom left corner, and moving these two strawberries to the other two corners of that rectangle.

This one wants a proof. Work it on paper, read the official solution, then mark yourself honestly — the ladder only means something if the record is true.

Official solution

We use capital letters to denote unit squares; OO is the top left corner square. For any two squares XX and YY let [XY][X Y] be the smallest grid rectangle containing these two squares. Strawberries lie on some squares in arrangement A\mathcal{A}. Put a plum on each square of the target configuration B\mathcal{B}. For a square XX denote by a(X)a(X) and b(X)b(X) respectively the number of strawberries and the number of plums in [OX][O X]. By hypothesis a(X)b(X)a(X) \leq b(X) for each XX, with strict inequality for some XX (otherwise the two arrangements coincide and there is nothing to prove).
The idea is to show that by a legitimate switch one can obtain an arrangement A\mathcal{A}' such that
a(X)a(X)b(X) for each X;Xa(X)<Xa(X) \begin{equation*} a(X) \leq a'(X) \leq b(X) \quad \text{ for each } X ; \quad \sum_{X} a(X)<\sum_{X} a'(X) \tag{1} \end{equation*}
(with a(X)a'(X) defined analogously to a(X)a(X); the sums range over all unit squares XX ). This will be enough because the same reasoning then applies to A\mathcal{A}', giving rise to a new arrangement A\mathcal{A}'', and so on (induction). Since a(X)<a(X)<a(X)<\sum a(X)<\sum a'(X)<\sum a''(X)<\ldots and all these sums do not exceed b(X)\sum b(X), we eventually obtain a sum with all summands equal to the respective b(X)b(X)s; all strawberries will meet with plums.
Consider the uppermost row in which the plum and the strawberry lie on different squares PP and SS (respectively); clearly PP must be situated left to SS. In the column passing through PP, let TT be the top square and BB the bottom square. The strawberry in that column lies below the plum (because there is no plum in that column above PP, and the positions of strawberries and plums coincide everywhere above the row of PP ). Hence there is at least one strawberry in the region [BS][B S] below [PS][P S]. Let VV be the position of the uppermost strawberry in that region.

| OO | | TT | | | | | I | | | | | |
| :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- |
| | | | | | | | I | | | | | |
| | | PP | | | UU | | 1 | | | SS | | |
| | | | | | | | 1 | 1 | | | | |
| | | | | | | | | | | | | |
| | | | | | | | 1 | | | | | |
| - | - | - | - | - | - | - - | X\underline{X}' | | | | | |
| | | | | | | | | | RR | | | |
| | | | | | VV | | | | | WW | | |
| | | | | | | | | | | | | |
| | | | | | | | | | | | | |
| | | BB | | | | | | | | | | |

Denote by WW the square at the intersection of the row through VV with the column through SS and let RR be the square vertex-adjacent to WW up-left. We claim that
a(X)<b(X) for all X[PR]. \begin{equation*} a(X)<b(X) \quad \text{ for all } \quad X \in[P R] . \tag{2} \end{equation*}
This is so because if X[PR]X \in[P R] then the portion of [OX][O X] left to column [TB][T B] contains at least as many plums as strawberries (the hypothesis of the problem); in the portion above the row through PP and SS we have perfect balance; and in the remaining portion, i.e. rectangle [PX][P X] we have a plum on square PP and no strawberry at all.
Now we are able to perform the required switch. Let UU be the square at the intersection of the row through PP with the column through VV (some of P,U,RP, U, R can coincide). We move strawberries from squares SS and VV to squares UU and WW. Then
a(X)=a(X)+1 for X[UR];a(X)=a(X) for other X. a'(X)=a(X)+1 \quad \text{ for } \quad X \in[U R] ; \quad a'(X)=a(X) \quad \text{ for other } X .
And since the rectangle [UR][U R] is contained in [PR][P R], we still have a(X)b(X)a'(X) \leq b(X) for all SS, in view of (2); conditions (1) are satisfied and the proof is complete.

Source: MathNet, licensed CC-BY-4.0. Statement and solution reproduced as published; topic, difficulty and ordering added by this site.