Maths Olympiad Prep

Library / /7 of 14

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 i1i \geqslant 1. If
a1a2ana1+n a_{1} \leqslant a_{2} \leqslant \cdots \leqslant a_{n} \leqslant a_{1}+n
and
aain+i1 for i=1,2,,n a_{a_{i}} \leqslant n+i-1 \quad \text{ for } i=1,2, \ldots, n
prove that
a1++ann2. a_{1}+\cdots+a_{n} \leqslant n^{2} .

Solutions — 3

Solution 1

First, we claim that
ain+i1 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 anan1ain+ia_{n} \geqslant a_{n-1} \geqslant \cdots \geqslant a_{i} \geqslant n+i and aain+i1a_{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,,n1, or n(modn) \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 ain+ia_{i} \geqslant n+i implies the stronger statement that ai2n+1a_{i} \geqslant 2 n+1, which by a1+nanaia_{1}+n \geqslant a_{n} \geqslant a_{i} gives a1n+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 a1na_{1} \leqslant n. If anna_{n} \leqslant n, then a1anna_{1} \leqslant \cdots \leqslant a_{n} \leqslant n and the desired inequality holds trivially. Otherwise, consider the number tt with 1tn11 \leqslant t \leqslant n-1 such that
a1a2atn<at+1an \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 1a1n1 \leqslant a_{1} \leqslant n and aa1na_{a_{1}} \leqslant n by (2), we have a1ta_{1} \leqslant t and hence ann+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 ajn+ia_{j} \geqslant n+i, we have
b1b2btbt+1=0 b_{1} \geqslant b_{2} \geqslant \ldots \geqslant b_{t} \geqslant b_{t+1}=0
Next we claim that ai+bina_{i}+b_{i} \leqslant n for 1it1 \leqslant i \leqslant t. Indeed, by n+i1aain+i-1 \geqslant a_{a_{i}} and aina_{i} \leqslant n, each jj with ajn+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 binaib_{i} \leqslant n-a_{i}.

It follows from the definition of the bib_{i}\,s and (5) that
at+1++ann(nt)+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+bina_{i}+b_{i} \leqslant n for 1it1 \leqslant i \leqslant t, we get
a1+a2++ann(nt)+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 1in1 \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 1jn1 \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. aina_{i} \leqslant n

If aina_{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. ain+1a_{i} \geqslant n+1

If ain+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 ana1+na_{n} \leqslant a_{1}+n light cells in this row, so we must have ia1i \leqslant a_{1}. But a1aa1na_{1} \leqslant a_{a_{1}} \leqslant n by (1) and (2), so ia1i \leqslant a_{1} implies aiaa1na_{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 ain+i1a_{i} \leqslant n+i-1 for 1in1 \leqslant i \leqslant n. Now define ci=max(ai,i)c_{i}=\max \left(a_{i}, i\right) for 1in1 \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 1i<jn1 \leqslant i<j \leqslant n we have aiaja_{i} \leqslant a_{j} and i<ji<j, so cicjc_{i} \leqslant c_{j}. Also ana1+na_{n} \leqslant a_{1}+n and n<1+nn<1+n imply cnc1+nc_{n} \leqslant c_{1}+n. Finally, the definitions imply that cci{aai,ai,ain,i}c_{c_{i}} \in\left\{a_{a_{i}}, a_{i}, a_{i}-n, i\right\} so ccin+i1c_{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
cii 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(modn)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 1in1 \leqslant i \leqslant n, keeping in mind that ciic_{i} \geqslant i by (6). Since cin+i1c_{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(cii)=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 iji \rightarrow j and jij \rightarrow i for 1i<jn1 \leqslant i<j \leqslant n. Assume contrariwise. This means, respectively, that
i<jci and j<n+icj. i<j \leqslant c_{i} \quad \text{ and } \quad j<n+i \leqslant c_{j} .
We have n+icjc1+nn+i \leqslant c_{j} \leqslant c_{1}+n by (1), so ic1i \leqslant c_{1}. Since c1nc_{1} \leqslant n by (3), this implies that cicc1nc_{i} \leqslant c_{c_{1}} \leqslant n using (1) and (3). But then, using (1) again, jcinj \leqslant c_{i} \leqslant n implies cjccic_{j} \leqslant c_{c_{i}}, which combined with n+icjn+i \leqslant c_{j} gives us that n+iccin+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 aicia_{i} \leqslant c_{i} for 1in1 \leqslant i \leqslant n, the desired inequality follows.

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.