Maths Olympiad Prep

Library / Mathematical Olympiad Rioplatense /16 of 16

Mathematical Olympiad Rioplatense

Combinatorics Difficulty 8.0 National Olympiad, round 2 Prove it Argentina

Let nn be a positive integer. We call smooth a sequence of integers a1,a2,…,aka_1, a_2, \dots, a_k, with 1≤ai≤n1 \le a_i \le n, if there exists an integer mm, with 1≤m<k1 \le m < k, such that a1=ak−m+1,a2=ak−m+2,…,am=aka_1 = a_{k-m+1}, a_2 = a_{k-m+2}, \dots, a_m = a_k. Furthermore a sequence is universal if each of the sequences obtained through replacing aka_k by 1,2,…,n1, 2, \dots, n is smooth. For each nn find a universal sequence of minimum length.

Solution

The minimum length in question is 2n2^n.

Delete the last term of a given universal sequence and consider the shortened sequence α\alpha. For each i=1,…,ni = 1, \dots, n the hypothesis implies that α\alpha starts with a block BiB_i, followed by a term ii which we called distinguished, and ends with a block Bi′B'_i identical with BiB_i. Choose the blocks BiB_i to be shortest possible; they are uniquely determined and different. By relabeling if necessary one may ensure ∣Bn∣>∣Bn−1∣>⋯>∣B1∣|B_n| > |B_{n-1}| > \dots > |B_1|. (Under this assumption α\alpha starts with a 11 and the shortest block B1B_1 is empty: ∣B1∣=0|B_1| = 0.)

We claim that block Bn′B'_n does not contain the distinguished nn. Otherwise BnB_n and Bn′B'_n have a common part a1,…,ama_1, \dots, a_m, possibly empty; clearly m<∣Bn∣m < |B_n|. Now Bn′B'_n starts with a1,…,am,na_1, \dots, a_m, n and BnB_n ends with a1,…,ama_1, \dots, a_m. Since BnB_n and Bn′B'_n are identical, α\alpha starts with a1,…,am,na_1, \dots, a_m, n and ends with a1,…,ama_1, \dots, a_m. But then m<∣Bn∣m < |B_n| contradicts the minimum choice of BnB_n. So the distinguished nn is not in Bn′B'_n. Consequently the length ℓ\ell of α\alpha satisfies ℓ≥2∣Bn∣+1\ell \ge 2|B_n| + 1.

A similar argument applies to blocks BnB_n and Bn−1B_{n-1} and shows that ∣Bn∣≥2∣Bn−1∣+1|B_n| \ge 2|B_{n-1}| + 1. Indeed BnB_n starts with Bn−1B_{n-1}, which is followed by the distinguished n−1n-1, and Bn′B'_n ends with Bn−1′B'_{n-1}. Since BnB_n and Bn′B'_n are identical, BnB_n ends with a block Bn−1′′B''_{n-1} identical to Bn−1B_{n-1} and Bn−1′B'_{n-1}. Now we show that Bn−1′′B''_{n-1} does not contain the distinguished n−1n-1; this will ensure ∣Bn∣≥2∣Bn−1∣+1|B_n| \ge 2|B_{n-1}| + 1.

Suppose on the contrary that the distinguished n−1n-1 is in Bn−1′′B''_{n-1}. Then Bn−1B_{n-1} and Bn−1′′B''_{n-1} have a common part a1,…,ama_1, \dots, a_m, possibly empty, where m<∣Bn−1∣m < |B_{n-1}|. Now Bn−1′′B''_{n-1} starts with a1,…,am,n−1a_1, \dots, a_m, n-1 and Bn−1B_{n-1} ends with a1,…,ama_1, \dots, a_m. Since Bn−1B_{n-1}, Bn−1′B'_{n-1} and Bn−1′′B''_{n-1} are identical, α\alpha starts with a1,…,am,n−1a_1, \dots, a_m, n-1 and ends with a1,…,ama_1, \dots, a_m; but then m<∣Bn−1∣m < |B_{n-1}| contradicts the minimum choice of Bn−1B_{n-1}. The claimed ∣Bn∣≥2∣Bn−1∣+1|B_n| \ge 2|B_{n-1}| + 1 follows.

By the same reasoning ∣Bi∣≥2∣Bi−1∣+1|B_i| \ge 2|B_{i-1}| + 1 for all i=2,…,ni = 2, \dots, n. Combined with ℓ≥2∣Bn∣+1\ell \ge 2|B_n| + 1 this leads to ℓ≥2n−1\ell \ge 2^n - 1. Hence the initial universal sequence has length ℓ+1≥2n\ell + 1 \ge 2^n.

On the other hand for each nn there are universal sequences βn\beta_n with terms in {1,2,…,n}\{1, 2, \dots, n\} and length 2n2^n. If n=1n = 1 set β1=1,1\beta_1 = 1, 1 (the length is 2=212 = 2^1). Suppose that βn−1\beta_{n-1} is a universal sequence with terms in {1,2,…,n−1}\{1, 2, \dots, n-1\} and length 2n−12^{n-1}. Write nn in front of every term of βn−1\beta_{n-1}. The obtained sequence βn\beta_n has terms in {1,2,…,n}\{1, 2, \dots, n\} and length 2n2^n. In addition βn\beta_n is universal. Indeed replacing the final 11 by nn yields a smooth sequence (starting and ending with nn). Replace the final 11 by i∈{1,…,n−1}i \in \{1, \dots, n - 1\}; let βn′\beta'_n be the new sequence. Suppose that the final 11 in βn−1\beta_{n-1} is also replaced by ii. Then the resulting sequence would start and end with a block a1,a2,…,am,ia_1, a_2, \dots, a_m, i with aj∈{1,…,n−1}a_j \in \{1, \dots, n - 1\}. By the definition of βn\beta_n then βn′\beta'_n starts and ends with n,a1,n,a2,…,n,am,n,in, a_1, n, a_2, \dots, n, a_m, n, i, meaning that it is smooth. This completes the inductive construction and the proof.

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.