Olympiad Maths Prep

Track / Stage 6 / 395 of 400 #1395 of 2000

Problem 1395

National olympiad, first round
Combinatorics Difficulty 7.0 Prove it

Let nn be a positive integer and let (a1,a2,,a2n)(a_1,a_2,\ldots ,a_{2n}) be a permutation of 1,2,,2n1,2,\ldots ,2n such that the numbers ai+1ai|a_{i+1}-a_i| are pairwise distinct for i=1,,2n1i=1,\ldots ,2n-1.
Prove that {a2,a4,,a2n}={1,2,,n}\{a_2,a_4,\ldots ,a_{2n}\}=\{1,2,\ldots ,n\} if and only if a1a2n=na_1-a_{2n}=n.

This one wants a proof. Work it on paper, read the official solution, then mark yourself honestly — the ladder only means something if the record is true.

Official solution

To prove the given statement, we will break it down into two parts: the "if" part and the "only if" part.

### "If" Part:
We need to show that if a1a2n=na_1 - a_{2n} = n, then {a2,a4,,a2n}={1,2,,n}\{a_2, a_4, \ldots, a_{2n}\} = \{1, 2, \ldots, n\}.

1. Sum of Differences:
The difference a1a2na_1 - a_{2n} is the sum of the descents minus the sum of the ascents. The set of differences of consecutive elements is {1,2,,2n1}\{1, 2, \ldots, 2n-1\}. Therefore, the sum of all differences is:
i=12n1i=(2n1)2n2=n(2n1) \sum_{i=1}^{2n-1} i = \frac{(2n-1) \cdot 2n}{2} = n(2n-1)

2. Sum of Descents and Ascents:
Let the sum of the descents be SdS_d and the sum of the ascents be SaS_a. We have:
Sd+Sa=n(2n1) S_d + S_a = n(2n-1)
Given a1a2n=na_1 - a_{2n} = n, we can write:
SdSa=n S_d - S_a = n

3. **Solving for SdS_d and SaS_a**:
Adding and subtracting the two equations:
2Sd=n(2n1)+n    Sd=n2 2S_d = n(2n-1) + n \implies S_d = n^2
2Sa=n(2n1)n    Sa=n2n 2S_a = n(2n-1) - n \implies S_a = n^2 - n

4. Distribution of Elements:
Let the descents be (aj,aj+1)(a_j, a_{j+1}) for jJj \in J. The sum of descents is:
jJajjJaj+1=n2 \sum_{j \in J} a_j - \sum_{j \in J} a_{j+1} = n^2
Each element in group A={n+1,n+2,,2n}A = \{n+1, n+2, \ldots, 2n\} must appear as the left element of a descent and never as a right element of a descent. This implies that no two elements of group AA can be next to each other.

5. Odd Indices:
Since a1a_1 is in group AA and a2na_{2n} is in group BB, all elements in group AA must have odd indices. Therefore, {a2,a4,,a2n}={1,2,,n}\{a_2, a_4, \ldots, a_{2n}\} = \{1, 2, \ldots, n\}.

### "Only If" Part:
We need to show that if {a2,a4,,a2n}={1,2,,n}\{a_2, a_4, \ldots, a_{2n}\} = \{1, 2, \ldots, n\}, then a1a2n=na_1 - a_{2n} = n.

1. Odd Indices:
Since elements in group AA have odd indices, the sum of descents is n2n^2.

2. Sum of Ascents:
By the previous calculation, the sum of ascents is n2nn^2 - n.

3. Difference Calculation:
Using the relationship SdSa=nS_d - S_a = n, we get:
a1a2n=n a_1 - a_{2n} = n

Thus, we have shown both directions of the statement.

\blacksquare

Source: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic, difficulty and ordering added by this site.