Maths Olympiad Prep

Library / /30 of 383

Combinatorics Difficulty 7.7 National Olympiad, round 2 Prove it IMO

Several positive integers are written in a row. Iteratively, Alice chooses two adjacent numbers xx and yy such that x>yx > y and xx is to the left of yy, and replaces the pair (x,y)(x, y) by either (y+1,x)(y+1, x) or (x1,x)(x-1, x). Prove that she can perform only finitely many such iterations.

Solutions — 3

Solution 1

Note first that the allowed operation does not change the maximum MM of the initial sequence. Let a1,a2,,ana_{1}, a_{2}, \ldots, a_{n} be the numbers obtained at some point of the process. Consider the sum
S=a1+2a2++nan S = a_{1} + 2 a_{2} + \cdots + n a_{n}
We claim that SS increases by a positive integer amount with every operation. Let the operation replace the pair (ai,ai+1)(a_{i}, a_{i+1}) by a pair (c,ai)(c, a_{i}), where ai>ai+1a_{i} > a_{i+1} and c=ai+1+1c = a_{i+1} + 1 or c=ai1c = a_{i} - 1. Then the new and the old value of SS differ by
d=(ic+(i+1)ai)(iai+(i+1)ai+1)=aiai+1+i(cai+1) d = \left(i c + (i+1) a_{i}\right) - \left(i a_{i} + (i+1) a_{i+1}\right) = a_{i} - a_{i+1} + i (c - a_{i+1})
The integer dd is positive since aiai+11a_{i} - a_{i+1} \geq 1 and cai+10c - a_{i+1} \geq 0.

On the other hand S(1+2++n)MS \leq (1 + 2 + \cdots + n) M as aiMa_{i} \leq M for all i=1,,ni = 1, \ldots, n. Since SS increases by at least 1 at each step and never exceeds the constant (1+2++n)M(1 + 2 + \cdots + n) M, the process stops after a finite number of iterations.

Solution 2

Like in the first solution, note that the operations do not change the maximum MM of the initial sequence. Now consider the reverse lexicographical order for nn-tuples of integers. We say that (x1,,xn)<(y1,,yn)(x_{1}, \ldots, x_{n}) < (y_{1}, \ldots, y_{n}) if xn<ynx_{n} < y_{n}, or if xn=ynx_{n} = y_{n} and xn1<yn1x_{n-1} < y_{n-1}, or if xn=ynx_{n} = y_{n}, xn1=yn1x_{n-1} = y_{n-1} and xn2<yn2x_{n-2} < y_{n-2}, etc. Each iteration creates a sequence that is greater than the previous one with respect to this order, and no sequence occurs twice during the process. On the other hand, there are finitely many possible sequences because their terms are always positive integers not exceeding MM. Hence the process cannot continue forever.

Solution 3

Let the current numbers be a1,a2,,ana_{1}, a_{2}, \ldots, a_{n}. Define the score sis_{i} of aia_{i} as the number of aja_{j}'s that are less than aia_{i}. Call the sequence s1,s2,,sns_{1}, s_{2}, \ldots, s_{n} the score sequence of a1,a2,,ana_{1}, a_{2}, \ldots, a_{n}.

Let us say that a sequence x1,,xnx_{1}, \ldots, x_{n} dominates a sequence y1,,yny_{1}, \ldots, y_{n} if the first index ii with xiyix_{i} \neq y_{i} is such that xi<yix_{i} < y_{i}. We show that after each operation the new score sequence dominates the old one. Score sequences do not repeat, and there are finitely many possibilities for them, no more than (n1)n(n-1)^{n}. Hence the process will terminate.

Consider an operation that replaces (x,y)(x, y) by (a,x)(a, x), with a=y+1a = y + 1 or a=x1a = x - 1. Suppose that xx was originally at position ii. For each j<ij < i the score sjs_{j} does not increase with the change because yay \leq a and xxx \leq x. If sjs_{j} decreases for some j<ij < i then the new score sequence dominates the old one. Assume that sjs_{j} stays the same for all j<ij < i and consider sis_{i}. Since x>yx > y and yaxy \leq a \leq x, we see that sis_{i} decreases by at least 1. This concludes the proof.

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.