Maths Olympiad Prep

Library / /703 of 740

, 2022

Combinatorics Difficulty 5.7 AIME, harder Prove it United States

Problem:
Define the annoyingness of a permutation of the first nn integers to be the minimum number of copies of the permutation that are needed to be placed next to each other so that the subsequence 1,2,,n1,2, \ldots, n appears. For instance, the annoyingness of 3,2,13,2,1 is 3, and the annoyingness of 1,3,4,21,3,4,2 is 2.
A random permutation of 1,2,,20221,2, \ldots, 2022 is selected. Compute the expected value of the annoyingness of this permutation.

Solution

Solution:
For a given permutation p1,,pnp_{1}, \ldots, p_{n}, let fk(p)f_{k}(p) be the smallest number of copies of pp that need to be placed next to each other to have 1,,k1, \ldots, k appear as a subsequence. We are interested in finding the expectation of fn(p)f_{n}(p).
Notice that if kk appears before k+1k+1 in pp, then fk(p)=fk+1(p)f_{k}(p)=f_{k+1}(p). Otherwise, fk(p)+1=fk+1(p)f_{k}(p)+1=f_{k+1}(p). Since f1(p)f_{1}(p) is always 1, this tells us that fn(p)f_{n}(p) is equal to 1 plus the number of values of kk that exist such that k+1k+1 appears before kk. But for any such kk, this occurs with probability 1/21/2. By linearity of expectation, the answer is 1+2021/2=202321+2021/2=\frac{2023}{2}.

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 reproduced verbatim; metadata (topic, difficulty) added by this project.