Maths Olympiad Prep

Track / Stage 7 / 20 of 300 #1900 of 2444

Problem 1900

National Olympiad second round; IMO P1/P4
Algebra Difficulty 7.0 Find the answer China Team Selection Test

Let a1,a2,,ana_1,a_2,\cdots,a_n be a permutation of 1,2,,n1,2,\cdots,n. Among all possible permutations, find the minimum of i=1nmin{ai,2i1}.\sum_{i=1}^n \min \{ a_i,2i-1 \}.

A number or a short expression. Fractions can be typed as 3/2, and spacing doesn't matter.

Next problem →

Official solution

Let a1,a2,,an a_1, a_2, \ldots, a_n be a permutation of 1,2,,n 1, 2, \ldots, n . We aim to find the minimum of
i=1nmin{ai,2i1}. \sum_{i=1}^n \min \{ a_i, 2i-1 \}.

We claim that the minimum is achieved when ai=n+1i a_i = n + 1 - i for all i i . In this configuration, the terms bi=min(ai,2i1) b_i = \min(a_i, 2i-1) will be structured as follows:
- For i i from 1 1 to n+23 \left\lfloor \frac{n+2}{3} \right\rfloor , bi=2i1 b_i = 2i-1 .
- For in+23 i \geq \left\lceil \frac{n+2}{3} \right\rceil , bi=n+1i b_i = n + 1 - i .

In the sequence bi b_i , which ranges from 1 1 to n+1n+23 n + 1 - \left\lceil \frac{n+2}{3} \right\rceil , each odd number up to the upper bound appears twice, and each even number up to the upper bound appears once.

To show that this is indeed the minimum, note that each odd number can appear at most twice (once as an ai a_i and once as 2i1 2i-1 ), and each even number can appear only once (as an ai a_i ). Therefore, the minimum is achieved by greedily taking all the smaller numbers, i.e., two 1s, one 2, two 3s, and so on, which aligns with the described configuration.

Thus, the minimum value of the sum is:
i=1nmin{ai,2i1}. \sum_{i=1}^n \min \{ a_i, 2i-1 \}.
The answer is: i=1nmin{\boxed{\sum_{i=1}^n \min \{} n + 1 - i, 2i-1 }.{\}}.

Source: Omni-MATH, licensed Apache-2.0. Statement reproduced verbatim; metadata (topic, difficulty, ordering) added by this project.