Maths Olympiad Prep

Library / /123 of 169

, 2010

Combinatorics Difficulty 7.6 National Olympiad, round 2 Prove it United States

There are nn students standing in a circle, one behind the other. The students have heights h1<h2<<hnh_1 < h_2 < \dots < h_n. If a student with height hkh_k is standing directly behind a student with height hk2h_{k-2} or less, the two students are permitted to switch places. Prove that it is not possible to make more than (n3)\binom{n}{3} such switches before reaching a position in which no further switches are possible.

(This problem was suggested by Kiran Kedlaya, Travis Schedler, and David Speyer.)

Solutions — 2

Solution 1

(By Kiran Kedlaya). Let hih_i also denote the student with height hih_i. We prove that for 1i<jn1 \le i < j \le n, hjh_j can switch with hih_i at most ji1j - i - 1 times. We proceed by induction on jij - i, the base case ji=1j - i = 1 being evident because hih_i is not allowed to switch with hi1h_{i-1}.

For the inductive step, note that hi,hj1,hjh_i, h_{j-1}, h_j can be positioned on the circle either in this order or in the order hi,hj,hj1h_i, h_j, h_{j-1}. Since hj1h_{j-1} and hjh_j cannot switch, the only way to change the relative order of these three students is for hih_i to switch with either hj1h_{j-1} or hjh_j. Consequently, any two switches of hih_i with hjh_j must be separated by a switch of hih_i with hj1h_{j-1}. Since there are at most ji2j - i - 2 of the latter, there are at most ji1j - i - 1 of the former.

The total number of switches is thus at most
i=1n1j=i+1n(ji1)=i=1n1j=0ni1j=i=1n1(ni2)=i=1n1[(ni+13)(ni3)]=(n3). \begin{aligned} \sum_{i=1}^{n-1} \sum_{j=i+1}^{n} (j-i-1) &= \sum_{i=1}^{n-1} \sum_{j=0}^{n-i-1} j \\ &= \sum_{i=1}^{n-1} \binom{n-i}{2} \\ &= \sum_{i=1}^{n-1} \left[ \binom{n-i+1}{3} - \binom{n-i}{3} \right] \\ &= \binom{n}{3}. \end{aligned}

Solution 2

(By Warut Suksompong). For i=1,2,,n1i = 1, 2, \dots, n-1, let sis_i be the number of students hjh_j with j<ij < i such that hi+1,hjh_{i+1}, h_j, and hih_i appear in that order on the circle. Note that sii1s_i \le i-1 for all ii. Now we take a look what happens when two students switch places.

* If hnh_n is involved in the switch, sn1s_{n-1} decreases by 1, while all the other sis_i's remain the same.
* Otherwise, suppose hah_a and hbh_b are switched. Then, we have a+1<b<na+1 < b < n, so sb1s_{b-1} decreases by 1, while sbs_b increases by 1. All other sis_i's remain the same.

Therefore, we see that the quantity M=i=1n1(ni)siM = \sum_{i=1}^{n-1} (n-i)s_i decreases by exactly 1 after every switch. The number of switches until no more are possible is therefore at most the initial value of MM. Because sii1s_i \le i-1 for 1in11 \le i \le n-1, this value is at most i=1n1(ni)(i1)=(n3)\sum_{i=1}^{n-1} (n-i)(i-1) = \binom{n}{3}.

Note. With this solution, it is also easy to see that the number of switches until no more are possible depends only on the original ordering.

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.