Maths Olympiad Prep

Library / IMO Shortlist /336 of 365

IMO Shortlist, 2021

Algebra Difficulty 9.0 IMO level Prove it IMO

Given a positive integer nn, find the smallest value of
⌊a11⌋+⌊a22⌋+⋯+⌊ann⌋ \left\lfloor\frac{a_{1}}{1}\right\rfloor+\left\lfloor\frac{a_{2}}{2}\right\rfloor+\cdots+\left\lfloor\frac{a_{n}}{n}\right\rfloor
over all permutations (a1,a2,…,an)(a_{1}, a_{2}, \ldots, a_{n}) of (1,2,…,n)(1,2, \ldots, n).

Solutions — 3

Solution 1

Answer: The minimum of such sums is ⌊log⁡2n⌋+1\left\lfloor\log _{2} n\right\rfloor+1; so if 2k⩽n<2k+12^{k} \leqslant n<2^{k+1}, the minimum is k+1k+1.

Solution 1. Suppose that 2k⩽n<2k+12^{k} \leqslant n<2^{k+1} with some nonnegative integer kk. First we show a permutation (a1,a2,…,an)(a_{1}, a_{2}, \ldots, a_{n}) such that
⌊a11⌋+⌊a22⌋+⋯+⌊ann⌋=k+1 \left\lfloor\frac{a_{1}}{1}\right\rfloor+\left\lfloor\frac{a_{2}}{2}\right\rfloor+\cdots+\left\lfloor\frac{a_{n}}{n}\right\rfloor=k+1
then we will prove that
⌊a11⌋+⌊a22⌋+⋯+⌊ann⌋⩾k+1 \left\lfloor\frac{a_{1}}{1}\right\rfloor+\left\lfloor\frac{a_{2}}{2}\right\rfloor+\cdots+\left\lfloor\frac{a_{n}}{n}\right\rfloor \geqslant k+1
for every permutation. Hence, the minimal possible value will be k+1k+1.

I. Consider the permutation
(a1)=(1),(a2,a3)=(3,2),(a4,a5,a6,a7)=(7,4,5,6),…(a2k−1,…,a2k−1)=(2k−1,2k−1,2k−1+1,…,2k−2),(a2k,…,an)=(n,2k,2k+1,…,n−1), \begin{gathered} (a_{1})=(1), \quad(a_{2}, a_{3})=(3,2), \quad(a_{4}, a_{5}, a_{6}, a_{7})=(7,4,5,6), \quad \ldots \\ (a_{2^{k-1}}, \ldots, a_{2^{k}-1})=(2^{k}-1,2^{k-1}, 2^{k-1}+1, \ldots, 2^{k}-2), \\ (a_{2^{k}}, \ldots, a_{n})=(n, 2^{k}, 2^{k}+1, \ldots, n-1), \end{gathered}
This permutation consists of k+1k+1 cycles. In every cycle (ap,…,aq)=(q,p,p+1,…,q−1)(a_{p}, \ldots, a_{q})=(q, p, p+1, \ldots, q-1) we have q<2pq<2p, so
∑i=pq⌊aii⌋=⌊qp⌋+∑i=p+1q⌊i−1i⌋=1 \sum_{i=p}^{q}\left\lfloor\frac{a_{i}}{i}\right\rfloor=\left\lfloor\frac{q}{p}\right\rfloor+\sum_{i=p+1}^{q}\left\lfloor\frac{i-1}{i}\right\rfloor=1
The total sum over all cycles is precisely k+1k+1.

II. In order to establish the lower bound, we prove a more general statement.

Claim. If b1,…,b2kb_{1}, \ldots, b_{2^{k}} are distinct positive integers then
∑i=12k⌊bii⌋⩾k+1 \sum_{i=1}^{2^{k}}\left\lfloor\frac{b_{i}}{i}\right\rfloor \geqslant k+1
From the Claim it follows immediately that ∑i=1n⌊aii⌋⩾∑i=12k⌊aii⌋⩾k+1\sum_{i=1}^{n}\left\lfloor\frac{a_{i}}{i}\right\rfloor \geqslant \sum_{i=1}^{2^{k}}\left\lfloor\frac{a_{i}}{i}\right\rfloor \geqslant k+1.

Proof of the Claim. Apply induction on kk. For k=1k=1 the claim is trivial, ⌊b11⌋⩾1\left\lfloor\frac{b_{1}}{1}\right\rfloor \geqslant 1. Suppose the Claim holds true for some positive integer kk, and consider k+1k+1.
If there exists an index jj such that 2k<j⩽2k+12^{k}<j \leqslant 2^{k+1} and bj⩾jb_{j} \geqslant j then
∑i=12k+1⌊bii⌋⩾∑i=12k⌊bii⌋+⌊bjj⌋⩾(k+1)+1 \sum_{i=1}^{2^{k+1}}\left\lfloor\frac{b_{i}}{i}\right\rfloor \geqslant \sum_{i=1}^{2^{k}}\left\lfloor\frac{b_{i}}{i}\right\rfloor+\left\lfloor\frac{b_{j}}{j}\right\rfloor \geqslant(k+1)+1
by the induction hypothesis, so the Claim is satisfied.
Otherwise we have bj<j⩽2k+1b_{j}<j \leqslant 2^{k+1} for every 2k<j⩽2k+12^{k}<j \leqslant 2^{k+1}. Among the 2k+12^{k+1} distinct numbers b1,…,b2k+1b_{1}, \ldots, b_{2^{k+1}} there is some bmb_{m} which is at least 2k+12^{k+1}; that number must be among b1…,b2kb_{1} \ldots, b_{2^{k}}. Hence, 1⩽m⩽2k1 \leqslant m \leqslant 2^{k} and bm⩾2k+1b_{m} \geqslant 2^{k+1}.
We will apply the induction hypothesis to the numbers
c1=b1,…,cm−1=bm−1,cm=b2k+1,cm+1=bm+1,…,c2k=b2k c_{1}=b_{1}, \ldots, c_{m-1}=b_{m-1}, \quad c_{m}=b_{2^{k}+1}, \quad c_{m+1}=b_{m+1}, \ldots, c_{2^{k}}=b_{2^{k}}
so take the first 2k2^{k} numbers but replace bmb_{m} with b2k+1b_{2^{k}+1}. Notice that
⌊bmm⌋⩾⌊2k+1m⌋=⌊2k+2km⌋⩾⌊b2k+1+mm⌋=⌊cmm⌋+1 \left\lfloor\frac{b_{m}}{m}\right\rfloor \geqslant\left\lfloor\frac{2^{k+1}}{m}\right\rfloor=\left\lfloor\frac{2^{k}+2^{k}}{m}\right\rfloor \geqslant\left\lfloor\frac{b_{2^{k}+1}+m}{m}\right\rfloor=\left\lfloor\frac{c_{m}}{m}\right\rfloor+1
For the other indices ii with 1⩽i⩽2k,i≠m1 \leqslant i \leqslant 2^{k}, i \neq m we have ⌊bii⌋=⌊cii⌋\left\lfloor\frac{b_{i}}{i}\right\rfloor=\left\lfloor\frac{c_{i}}{i}\right\rfloor, so
∑i=12k+1⌊bii⌋=∑i=12k⌊bii⌋⩾∑i=12k⌊cii⌋+1⩾(k+1)+1 \sum_{i=1}^{2^{k+1}}\left\lfloor\frac{b_{i}}{i}\right\rfloor=\sum_{i=1}^{2^{k}}\left\lfloor\frac{b_{i}}{i}\right\rfloor \geqslant \sum_{i=1}^{2^{k}}\left\lfloor\frac{c_{i}}{i}\right\rfloor+1 \geqslant(k+1)+1
That proves the Claim and hence completes the solution.

Solution 2

Solution 2. We present a different proof for the lower bound.
Assume again 2k⩽n<2k+12^{k} \leqslant n<2^{k+1}, and let P={20,21,…,2k}P=\{2^{0}, 2^{1}, \ldots, 2^{k}\} be the set of powers of 2 among 1,2,…,n1,2, \ldots, n. Call an integer i∈{1,2,…,n}i \in\{1,2, \ldots, n\} and the interval [i,ai][i, a_{i}] good if ai⩾ia_{i} \geqslant i.

Lemma 1. The good intervals cover the integers 1,2,…,n1,2, \ldots, n.
Proof. Consider an arbitrary x∈{1,2…,n}x \in\{1,2 \ldots, n\}; we want to find a good interval [i,ai][i, a_{i}] that covers xx; i.e., i⩽x⩽aii \leqslant x \leqslant a_{i}. Take the cycle of the permutation that contains xx, that is (x,ax,aax,…)(x, a_{x}, a_{a_{x}}, \ldots). In this cycle, let ii be the first element with ai⩾xa_{i} \geqslant x; then i⩽x⩽aii \leqslant x \leqslant a_{i}.

Lemma 2. If a good interval [i,ai][i, a_{i}] covers pp distinct powers of 2 then ⌊aii⌋⩾p\left\lfloor\frac{a_{i}}{i}\right\rfloor \geqslant p; more formally, ⌊aii⌋⩾∣[i,ai]∩P∣\left\lfloor\frac{a_{i}}{i}\right\rfloor \geqslant |[i, a_{i}] \cap P|.
Proof. The ratio of the smallest and largest powers of 2 in the interval is at least 2p−12^{p-1}. By Bernoulli's inequality, aii⩾2p−1⩾p\frac{a_{i}}{i} \geqslant 2^{p-1} \geqslant p; that proves the lemma.

Now, by Lemma 1, the good intervals cover PP. By applying Lemma 2 as well, we obtain that
∑i=1n⌊aii⌋=∑i is good n⌊aii⌋⩾∑i is good n∣[i,ai]∩P∣⩾∣P∣=k+1. \sum_{i=1}^{n}\left\lfloor\frac{a_{i}}{i}\right\rfloor=\sum_{i \text{ is good }}^{n}\left\lfloor\frac{a_{i}}{i}\right\rfloor \geqslant \sum_{i \text{ is good }}^{n}|[i, a_{i}] \cap P| \geqslant |P|=k+1.

Solution 3

Solution 3. We show yet another proof for the lower bound, based on the following inequality.

Lemma 3.
⌊ab⌋⩾log⁡2a+1b \left\lfloor\frac{a}{b}\right\rfloor \geqslant \log _{2} \frac{a+1}{b}
for every pair a,ba, b of positive integers.

Proof. Let t=⌊ab⌋t=\left\lfloor\frac{a}{b}\right\rfloor, so t⩽abt \leqslant \frac{a}{b} and a+1b⩽t+1\frac{a+1}{b} \leqslant t+1. By applying the inequality 2t⩾t+12^{t} \geqslant t+1, we obtain
⌊ab⌋=t⩾log⁡2(t+1)⩾log⁡2a+1b \left\lfloor\frac{a}{b}\right\rfloor=t \geqslant \log _{2}(t+1) \geqslant \log _{2} \frac{a+1}{b}
By applying the lemma to each term, we get
∑i=1n⌊aii⌋⩾∑i=1nlog⁡2ai+1i=∑i=1nlog⁡2(ai+1)−∑i=1nlog⁡2i \sum_{i=1}^{n}\left\lfloor\frac{a_{i}}{i}\right\rfloor \geqslant \sum_{i=1}^{n} \log _{2} \frac{a_{i}+1}{i}=\sum_{i=1}^{n} \log _{2}(a_{i}+1)-\sum_{i=1}^{n} \log _{2} i
Notice that the numbers a1+1,a2+1,…,an+1a_{1}+1, a_{2}+1, \ldots, a_{n}+1 form a permutation of 2,3,…,n+12,3, \ldots, n+1. Hence, in the last two sums all terms cancel out, except for log⁡2(n+1)\log _{2}(n+1) in the first sum and log⁡21=0\log _{2} 1=0 in the second sum. Therefore,
∑i=1n⌊aii⌋⩾log⁡2(n+1)>k \sum_{i=1}^{n}\left\lfloor\frac{a_{i}}{i}\right\rfloor \geqslant \log _{2}(n+1)>k
As the left-hand side is an integer, it must be at least k+1k+1.

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.