Maths Olympiad Prep

Library / /319 of 397

, 2022

Algebra Difficulty 6.7 National Olympiad Prove it Taiwan

Let nn be a given positive integer. Let a1,a2,,ana_1, a_2, \dots, a_n be a permutation of 1,2,,n1, 2, \dots, n. Determine the minimum value of i=1naii\sum_{i=1}^{n} \lfloor \frac{a_i}{i} \rfloor.

Note: x\lfloor x \rfloor is the greatest integer not exceeding the real number xx.

Solutions — 3

Solution 1

Suppose that 2kn<2k+12^k \le n < 2^{k+1} with some non-negative integer kk. First we show a permutation (a1,a2,,an)(a_1, a_2, \dots, a_n) such that i=1naii=k+1\sum_{i=1}^n \lfloor \frac{a_i}{i} \rfloor = k+1; then we will prove that i=1naiik+1\sum_{i=1}^n \lfloor \frac{a_i}{i} \rfloor \ge 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,,a2k1)=(2k1,2k1,2k1+1,,2k2),(a2k,,an)=(n,2k,2k+1,,n1). (a_1) = (1), \quad (a_2, a_3) = (3, 2), \quad (a_4, a_5, a_6, a_7) = (7, 4, 5, 6), \quad \dots \\ (a_{2^{k+1}}, \dots, a_{2^k-1}) = (2^k - 1, 2^{k-1}, 2^{k-1} + 1, \dots, 2^k - 2), \\ (a_{2^k}, \dots, a_n) = (n, 2^k, 2^k + 1, \dots, n-1).
This permutation consists of k+1k+1 cycles. In every cycle (ap,,aq)=(q,p,p+1,,q1)(a_p, \dots, a_q) = (q, p, p+1, \dots, q-1) we have q<2pq < 2p, so
i=pqaii=qp+i=p+1qi1i=1; \sum_{i=p}^{q} \lfloor \frac{a_i}{i} \rfloor = \lfloor \frac{q}{p} \rfloor + \sum_{i=p+1}^{q} \lfloor \frac{i-1}{i} \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 1. If b1,,b2kb_1, \dots, b_{2^k} are distinct positive integers then
i=12kbiik+1. \sum_{i=1}^{2^k} \lfloor \frac{b_i}{i} \rfloor \ge k + 1.
From the Claim it follows immediately that i=1naiii=12kaiik+1\sum_{i=1}^{n} \lfloor \frac{a_i}{i} \rfloor \ge \sum_{i=1}^{2^k} \lfloor \frac{a_i}{i} \rfloor \ge k + 1.

Proof of Claim 1. Apply induction on kk. For k=1k=1 the claim is trivial, b111\lfloor \frac{b_1}{1} \rfloor \ge 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<j2k+12^k < j \le 2^{k+1} and bjjb_j \ge j, then
i=12k+1biii=12kbii+bjj(k+1)+1 \sum_{i=1}^{2^{k+1}} \lfloor \frac{b_i}{i} \rfloor \ge \sum_{i=1}^{2^k} \lfloor \frac{b_i}{i} \rfloor + \lfloor \frac{b_j}{j} \rfloor \ge (k+1) + 1
by the induction hypothesis, so the Claim is satisfied.

Otherwise we have bj<j2k+1b_j < j \le 2^{k+1} for every 2k<j2k+12^k < j \le 2^{k+1}. Among the 2k+12^{k+1} distinct numbers b1,,b2k+1b_1, \dots, 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, \dots, b_{2^k}. Hence, 1m2k1 \le m \le 2^k and bm2k+1b_m \ge 2^{k+1}.

We will apply the induction hypothesis to the numbers
c1=b1,,cm1=bm1,cm=b2k+1,cm+1=bm+1,,c2k=b2k, c_1 = b_1, \dots, c_{m-1} = b_{m-1}, \quad c_m = b_{2^k+1}, \quad c_{m+1} = b_{m+1}, \dots, 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
bmm2k+1m=2k+2kmb2k+1+mm=cmm+1. \lfloor \frac{b_m}{m} \rfloor \ge \lfloor \frac{2^{k+1}}{m} \rfloor = \lfloor \frac{2^k + 2^k}{m} \rfloor \ge \lfloor \frac{b_{2^k+1} + m}{m} \rfloor = \lfloor \frac{c_m}{m} \rfloor + 1.
For the other indices ii with 1i2k1 \le i \le 2^k, imi \ne m we have bii=cii\lfloor \frac{b_i}{i} \rfloor = \lfloor \frac{c_i}{i} \rfloor, so
i=12k+1bii=i=12kbiii=12kcii+1(k+1)+1. \sum_{i=1}^{2^k+1} \lfloor \frac{b_i}{i} \rfloor = \sum_{i=1}^{2^k} \lfloor \frac{b_i}{i} \rfloor \ge \sum_{i=1}^{2^k} \lfloor \frac{c_i}{i} \rfloor + 1 \ge (k+1) + 1.
That proves Claim 1.

By I and II, we complete the solution.

Solution 2

We present a different proof for the lower bound.

Assume again 2kn<2k+12^k \le n < 2^{k+1}, and let P={20,21,,2k}P = \{2^0, 2^1, \dots, 2^k\} be the set of powers of 2 among 1,2,,n1, 2, \dots, n. Call an integer i{1,2,,n}i \in \{1, 2, \dots, n\} and the interval [i,ai][i, a_i] good if aiia_i \ge i.

Lemma 1. The good intervals cover the integers 1,2,,n1, 2, \dots, n.

Proof. Consider an arbitrary x{1,2,,n}x \in \{1, 2, \dots, n\}; we want to find a good interval [i,ai][i, a_i] that covers xx; i.e., ixaii \le x \le a_i. Take the cycle of the permutation that contains xx, that is (x,ax,aax,)(x, a_x, a_{a_x}, \dots). In this cycle, let ii be the first element with aixa_i \ge x; then ixaii \le x \le a_i. \square

Lemma 2. If a good interval [i,ai][i, a_i] covers pp distinct powers of 2 then aiip\lfloor \frac{a_i}{i} \rfloor \ge p; more formally, aii[i,ai]P\lfloor \frac{a_i}{i} \rfloor \ge |[i, a_i] \cap P|.

Proof. The ratio of the smallest and largest powers of 2 in the interval is at least 2p12^{p-1}. By Bernoulli's inequality aii2p1P\frac{a_i}{i} \ge 2^{p-1} \ge P; that proves the lemma. \square

Now, by Lemma 1, the good intervals cover PP. By applying Lemma 2 as well, we obtain that
i=1naii=i{1,,n} is goodaiii{1,,n} is good[i,ai]PP=k+1. \sum_{i=1}^{n} \lfloor \frac{a_i}{i} \rfloor = \sum_{i \in \{1, \dots, n\} \text{ is good}} \lfloor \frac{a_i}{i} \rfloor \ge \sum_{i \in \{1, \dots, n\} \text{ is good}} |[i, a_i] \cap P| \ge |P| = k + 1.

Solution 3

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

Lemma 3.
ablog2a+1b \lfloor \frac{a}{b} \rfloor \ge \log_2 \frac{a+1}{b}
for every pair a,ba, b of positive integers.

Proof. Let t=abt = \lfloor \frac{a}{b} \rfloor, so tabt \le \frac{a}{b} and a+1bt+1\frac{a+1}{b} \le t + 1. By applying the inequality 2tt+12^t \ge t + 1, we obtain ab=tlog2(t+1)log2a+1b\lfloor \frac{a}{b} \rfloor = t \ge \log_2(t+1) \ge \log_2 \frac{a+1}{b}. \Box

By applying the lemma to each term, we get
i=1naiii=1nlog2ai+1i=i=1nlog2(ai+1)i=1nlog2i. \sum_{i=1}^{n} \lfloor \frac{a_i}{i} \rfloor \ge \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, \dots, a_n + 1 form a permutation of 2,3,,n+12, 3, \dots, n + 1. Hence, in the last two sums all terms cancel out, except for log2(n+1)\log_2(n+1) in the first sum and log21=0\log_2 1 = 0 in the second sum. Therefore,
i=1naiilog2(n+1)>k. \sum_{i=1}^{n} \lfloor \frac{a_i}{i} \rfloor \ge \log_2(n+1) > k.
As the left-hand side is an integer, it must be at least k+1k + 1. \Box

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 translated into English from zh; metadata (topic, difficulty) added by this project.