Maths Olympiad Prep

Library / Turkey — Team Selection Test /18 of 66

Turkey — Team Selection Test

Combinatorics Difficulty 7.8 National Olympiad, round 2 Prove it Turkey

Find the total number of all permutations of 20142014-tuple (1,2,…,2014)(1, 2, \dots, 2014) satisfying i+ai≤j+aji + a_i \leq j + a_j for all 1≤i<j≤20141 \leq i < j \leq 2014.

Solution

Let f(n)f(n) be the total number of all permutations of nn-tuple (1,2,…,n)(1, 2, \dots, n) satisfying i+ai≤j+aji + a_i \le j + a_j for all 1≤i<j≤n1 \le i < j \le n. Readily f(1)=1f(1) = 1.

If for some permutation a1=na_1 = n, then a2=n−1,a3=n−2,…,an=1a_2 = n-1, a_3 = n-2, \dots, a_n = 1 is the only possibility.

If for some permutation ak+1=na_{k+1} = n for some kk, 1≤k≤n−11 \le k \le n-1 then n−ak+2≤1n - a_{k+2} \le 1 and ak+2=n−1a_{k+2} = n-1. Similarly we get ak+j=n+1−ja_{k+j} = n+1-j for 3≤j≤n−k3 \le j \le n-k. Therefore, (a1,a2,…,ak)(a_1, a_2, \dots, a_k) should be a permutation of (1,2,…,k)(1, 2, \dots, k) satisfying conditions. Now note that the concatenation of (a1,a2,…,ak)(a_1, a_2, \dots, a_k) and (ak+1,…,an)(a_{k+1}, \dots, a_n) also satisfies conditions.

Thus, f(n)=1+f(1)+f(2)+⋯+f(n−1)f(n) = 1 + f(1) + f(2) + \dots + f(n-1) and consequently f(n)=2f(n−1)f(n) = 2f(n-1). Thus, f(n)=2n−1f(n) = 2^{n-1} and the answer is 220132^{2013}.

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.