Maths Olympiad Prep

Library / IMO Shortlist /227 of 365

IMO Shortlist

Combinatorics Difficulty 8.7 Shortlist Prove it IMO

Let nn be a positive integer, and consider a sequence a1,a2,…,ana_{1}, a_{2}, \ldots, a_{n} of positive integers. Extend it periodically to an infinite sequence a1,a2,…a_{1}, a_{2}, \ldots by defining an+i=aia_{n+i}=a_{i} for all i⩾1i \geqslant 1. If
a1⩽a2⩽⋯⩽an⩽a1+n a_{1} \leqslant a_{2} \leqslant \cdots \leqslant a_{n} \leqslant a_{1}+n
and
aai⩽n+i−1 for i=1,2,…,n a_{a_{i}} \leqslant n+i-1 \quad \text{ for } i=1,2, \ldots, n
prove that
a1+⋯+an⩽n2. a_{1}+\cdots+a_{n} \leqslant n^{2} .

Solutions — 3

Solution 1

First, we claim that
ai⩽n+i−1 for i=1,2,…,n. \begin{equation*} a_{i} \leqslant n+i-1 \quad \text{ for } i=1,2, \ldots, n . \tag{3} \end{equation*}
Assume contrariwise that ii is the smallest counterexample. From an⩾an−1⩾⋯⩾ai⩾n+ia_{n} \geqslant a_{n-1} \geqslant \cdots \geqslant a_{i} \geqslant n+i and aai⩽n+i−1a_{a_{i}} \leqslant n+i-1, taking into account the periodicity of our sequence, it follows that
ai cannot be congruent to i,i+1,…,n−1, or n( mod n).  \begin{equation*} a_{i} \text{ cannot be congruent to } i, i+1, \ldots, n-1 \text{, or } n(\bmod n) \text{. } \tag{4} \end{equation*}
Thus our assumption that ai⩾n+ia_{i} \geqslant n+i implies the stronger statement that ai⩾2n+1a_{i} \geqslant 2 n+1, which by a1+n⩾an⩾aia_{1}+n \geqslant a_{n} \geqslant a_{i} gives a1⩾n+1a_{1} \geqslant n+1. The minimality of ii then yields i=1i=1, and (4) becomes contradictory. This establishes our first claim.

In particular we now know that a1⩽na_{1} \leqslant n. If an⩽na_{n} \leqslant n, then a1⩽⋯⩽an⩽na_{1} \leqslant \cdots \leqslant a_{n} \leqslant n and the desired inequality holds trivially. Otherwise, consider the number tt with 1⩽t⩽n−11 \leqslant t \leqslant n-1 such that
a1⩽a2⩽…⩽at⩽n<at+1⩽…⩽an \begin{equation*} a_{1} \leqslant a_{2} \leqslant \ldots \leqslant a_{t} \leqslant n<a_{t+1} \leqslant \ldots \leqslant a_{n} \tag{5} \end{equation*}
Since 1⩽a1⩽n1 \leqslant a_{1} \leqslant n and aa1⩽na_{a_{1}} \leqslant n by (2), we have a1⩽ta_{1} \leqslant t and hence an⩽n+ta_{n} \leqslant n+t. Therefore if for each positive integer ii we let bib_{i} be the number of indices j∈{t+1,…,n}j \in\{t+1, \ldots, n\} satisfying aj⩾n+ia_{j} \geqslant n+i, we have
b1⩾b2⩾…⩾bt⩾bt+1=0 b_{1} \geqslant b_{2} \geqslant \ldots \geqslant b_{t} \geqslant b_{t+1}=0
Next we claim that ai+bi⩽na_{i}+b_{i} \leqslant n for 1⩽i⩽t1 \leqslant i \leqslant t. Indeed, by n+i−1⩾aain+i-1 \geqslant a_{a_{i}} and ai⩽na_{i} \leqslant n, each jj with aj⩾n+ia_{j} \geqslant n+i (thus aj>aaia_{j}>a_{a_{i}} ) belongs to {ai+1,…,n}\left\{a_{i}+1, \ldots, n\right\}, and for this reason bi⩽n−aib_{i} \leqslant n-a_{i}.

It follows from the definition of the bib_{i}\,s and (5) that
at+1+…+an⩽n(n−t)+b1+…+bt. a_{t+1}+\ldots+a_{n} \leqslant n(n-t)+b_{1}+\ldots+b_{t} .
Adding a1+…+ata_{1}+\ldots+a_{t} to both sides and using that ai+bi⩽na_{i}+b_{i} \leqslant n for 1⩽i⩽t1 \leqslant i \leqslant t, we get
a1+a2+⋯+an⩽n(n−t)+nt=n2 a_{1}+a_{2}+\cdots+a_{n} \leqslant n(n-t)+n t=n^{2}
as we wished to prove.

Solution 2

In the first quadrant of an infinite grid, consider the increasing "staircase" obtained by shading in dark the bottom aia_{i} cells of the iith column for 1⩽i⩽n1 \leqslant i \leqslant n. We will prove that there are at most n2n^{2} dark cells.

To do it, consider the n×nn \times n square SS in the first quadrant with a vertex at the origin. Also consider the n×nn \times n square directly to the left of SS. Starting from its lower left corner, shade in light the leftmost aja_{j} cells of the jjth row for 1⩽j⩽n1 \leqslant j \leqslant n. Equivalently, the light shading is obtained by reflecting the dark shading across the line x=yx=y and translating it nn units to the left. The figure below illustrates this construction for the sequence 6,6,6,7,7,7,8,12,12,146,6,6,7,7,7,8,12,12,14.

Figure 1

We claim that there is no cell in SS which is both dark and light. Assume, contrariwise, that there is such a cell in column ii. Consider the highest dark cell in column ii which is inside SS. Since it is above a light cell and inside SS, it must be light as well. There are two cases:

Case 1. ai⩽na_{i} \leqslant n

If ai⩽na_{i} \leqslant n then this dark and light cell is (i,ai)(i, a_{i}), as highlighted in the figure. However, this is the (n+i)(n+i)-th cell in row aia_{i}, and we only shaded aai<n+ia_{a_{i}}<n+i light cells in that row, a contradiction.

Case 2. ai⩾n+1a_{i} \geqslant n+1

If ai⩾n+1a_{i} \geqslant n+1, this dark and light cell is (i,n)(i, n). This is the (n+i)(n+i)-th cell in row nn and we shaded an⩽a1+na_{n} \leqslant a_{1}+n light cells in this row, so we must have i⩽a1i \leqslant a_{1}. But a1⩽aa1⩽na_{1} \leqslant a_{a_{1}} \leqslant n by (1) and (2), so i⩽a1i \leqslant a_{1} implies ai⩽aa1⩽na_{i} \leqslant a_{a_{1}} \leqslant n, contradicting our assumption.

We conclude that there are no cells in SS which are both dark and light. It follows that the number of shaded cells in SS is at most n2n^{2}.

Finally, observe that if we had a light cell to the right of SS, then by symmetry we would have a dark cell above SS, and then the cell (n,n)(n, n) would be dark and light. It follows that the number of light cells in SS equals the number of dark cells outside of SS, and therefore the number of shaded cells in SS equals a1+⋯+ana_{1}+\cdots+a_{n}. The desired result follows.

Solution 3

As in Solution 1, we first establish that ai⩽n+i−1a_{i} \leqslant n+i-1 for 1⩽i⩽n1 \leqslant i \leqslant n. Now define ci=max⁡(ai,i)c_{i}=\max \left(a_{i}, i\right) for 1⩽i⩽n1 \leqslant i \leqslant n and extend the sequence c1,c2,…c_{1}, c_{2}, \ldots periodically modulo nn. We claim that this sequence also satisfies the conditions of the problem.

For 1⩽i<j⩽n1 \leqslant i<j \leqslant n we have ai⩽aja_{i} \leqslant a_{j} and i<ji<j, so ci⩽cjc_{i} \leqslant c_{j}. Also an⩽a1+na_{n} \leqslant a_{1}+n and n<1+nn<1+n imply cn⩽c1+nc_{n} \leqslant c_{1}+n. Finally, the definitions imply that cci∈{aai,ai,ai−n,i}c_{c_{i}} \in\left\{a_{a_{i}}, a_{i}, a_{i}-n, i\right\} so cci⩽n+i−1c_{c_{i}} \leqslant n+i-1 by (2) and (3). This establishes (1) and (2) for c1,c2,…c_{1}, c_{2}, \ldots.

Our new sequence has the additional property that
ci⩾i for i=1,2,…,n \begin{equation*} c_{i} \geqslant i \quad \text{ for } i=1,2, \ldots, n \tag{6} \end{equation*}
which allows us to construct the following visualization: Consider nn equally spaced points on a circle, sequentially labelled 1,2,…,n( mod n)1,2, \ldots, n(\bmod n), so point kk is also labelled n+kn+k. We draw arrows from vertex ii to vertices i+1,…,cii+1, \ldots, c_{i} for 1⩽i⩽n1 \leqslant i \leqslant n, keeping in mind that ci⩾ic_{i} \geqslant i by (6). Since ci⩽n+i−1c_{i} \leqslant n+i-1 by (3), no arrow will be drawn twice, and there is no arrow from a vertex to itself. The total number of arrows is
 number of arrows =∑i=1n(ci−i)=∑i=1nci−(n+12) \text{ number of arrows }=\sum_{i=1}^{n}\left(c_{i}-i\right)=\sum_{i=1}^{n} c_{i}-\binom{n+1}{2}
Now we show that we never draw both arrows i→ji \rightarrow j and j→ij \rightarrow i for 1⩽i<j⩽n1 \leqslant i<j \leqslant n. Assume contrariwise. This means, respectively, that
i<j⩽ci and j<n+i⩽cj. i<j \leqslant c_{i} \quad \text{ and } \quad j<n+i \leqslant c_{j} .
We have n+i⩽cj⩽c1+nn+i \leqslant c_{j} \leqslant c_{1}+n by (1), so i⩽c1i \leqslant c_{1}. Since c1⩽nc_{1} \leqslant n by (3), this implies that ci⩽cc1⩽nc_{i} \leqslant c_{c_{1}} \leqslant n using (1) and (3). But then, using (1) again, j⩽ci⩽nj \leqslant c_{i} \leqslant n implies cj⩽ccic_{j} \leqslant c_{c_{i}}, which combined with n+i⩽cjn+i \leqslant c_{j} gives us that n+i⩽ccin+i \leqslant c_{c_{i}}. This contradicts (2).

This means that the number of arrows is at most (n2)\binom{n}{2}, which implies that
∑i=1nci⩽(n2)+(n+12)=n2. \sum_{i=1}^{n} c_{i} \leqslant\binom{ n}{2}+\binom{n+1}{2}=n^{2} .
Recalling that ai⩽cia_{i} \leqslant c_{i} for 1⩽i⩽n1 \leqslant i \leqslant n, the desired inequality follows.

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.