Maths Olympiad Prep

Library / /36 of 48

, 2008

Combinatorics Difficulty 6.3 National Olympiad Prove it Hong Kong

For each permutation x1,x2,,x10x_1, x_2, \dots, x_{10} of 1,2,,101, 2, \dots, 10, compute
2x13x2+2x23x3+2x33x4++2x103x1. |2x_1 - 3x_2| + |2x_2 - 3x_3| + |2x_3 - 3x_4| + \dots + |2x_{10} - 3x_1|.
Let SS be the maximum possible value of this sum. Find the number of permutations attaining SS.

Solution

The answer is 28800.
Define
X={2xj:1j10}={2,4,6,,20},Y={3xj:1j10}={3,6,9,,30}. \begin{align*} X &= \{2x_j : 1 \le j \le 10\} = \{2, 4, 6, \dots, 20\}, \\ Y &= \{3x_j : 1 \le j \le 10\} = \{3, 6, 9, \dots, 30\}. \end{align*}
After removing the absolute value signs of the given expression, we get a sum of 10 terms from XYX \cup Y minus the sum of the remaining 10 terms from XYX \cup Y.
Therefore, we must have
S(30+27+24+21+18+15+20+18+16+14)(3+6+9+12+2+4+6+8+10+12)=131. \begin{align*} S \le (30 + 27 + 24 + 21 + 18 + 15 + 20 + 18 + 16 + 14) \\ \quad - (3 + 6 + 9 + 12 + 2 + 4 + 6 + 8 + 10 + 12) \\ \quad = 131. \end{align*}
In the following, we will show that equality can be attained, and hence S=131S = 131.
Indeed, we shall count the number of permutations such that the sum is SS.
In order that each of 2s2s for s=7,8,9,10s = 7, 8, 9, 10 and 3t3t for t=5,6,7,8,9,10t = 5, 6, 7, 8, 9, 10 is the larger term of the pair in the same absolute value sign, the large numbers 7,8,9,107, 8, 9, 10 cannot be adjacent terms (where x10x_{10} and x1x_1 are considered as adjacent). Also, 5,65, 6 cannot be the term immediately after the large numbers. Similarly, the small numbers 1,2,3,41, 2, 3, 4 cannot be adjacent, and 5,65, 6 cannot be the term immediately before the small numbers. Conversely, whenever all these conditions are satisfied, the given expression is equal to 131131.
Note that for any pair of large numbers, there must be a small number in between (possibly together with 55 and/or 66), and vice versa. WLOG assume 11 is the first term. There are 3!×4!=1443! \times 4! = 144 ways to arrange the small numbers and the large numbers (for example, 1,7,2,8,3,9,4,101, 7, 2, 8, 3, 9, 4, 10). Afterwards, we can only place 55 and 66 in the 4 gaps between a small number and a large number (but not between a large number and a small number). By some basic counting, we know that there are 4×5=204 \times 5 = 20 ways to do so (4 ways to place 55, and then 5 ways to place 66 since there is one more position in the same gap as 55). As we can shift all terms cyclically in 10 ways, the final answer is
144×20×10=28800. 144 \times 20 \times 10 = 28800.

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.