Maths Olympiad Prep

Library / /16 of 18

Combinatorics Difficulty 7.9 National olympiad, round 2 Prove it China

A state refers to a way to place the numbers 1,2,,991, 2, \ldots, 99 on the vertices of a given regular 9999-gon, with exactly one number on each vertex and every number appearing exactly once. Two states are considered equivalent if one of them can be obtained from the other by rotating the regular 9999-gon (on the plane).

An operation is to first choose two adjacent vertices of the regular 9999-gon and then exchange the numbers on these two vertices. Determine the smallest positive integer NN such that, for any two states α\alpha and β\beta, one may apply no more than NN operations to α\alpha to obtain a state that is equivalent to β\beta.

Solution

The smallest N=2401N = 2401.

Let α\alpha^* be the state where the numbers 1,2,,991, 2, \ldots, 99 are arranged counterclockwise at the vertices, and β\beta^* be the state where 1,2,,991, 2, \ldots, 99 are arranged clockwise on the circle. We prove that it takes at least 24012401 operations to transform α\alpha^* into a permutation identical to β\beta^*.

Assume α\alpha^* transforms into a permutation identical to β\beta^* after mm operations. If a certain operation swaps numbers a,ba, b, then draw an edge between aa and bb, thereby obtaining a graph GG with {1,2,,99}\{1, 2, \dots, 99\} as the vertex set and mm edges (possibly with repetitions). For any three numbers 1x<y<z991 \le x < y < z \le 99, they are in counterclockwise order in α\alpha^* and in clockwise order in β\beta^*. Hence, there must be at least one operation involving two of these numbers, i.e., there is at least one edge among x,y,zx, y, z in GG. Therefore, the complement graph Gˉ\bar{G} of GG does not contain a triangle. According to Turán's theorem, the number of edges in Gˉ\bar{G} does not exceed 49×50=245049 \times 50 = 2450, so the number of edges in GG is at least (992)2450=2401\binom{99}{2} - 2450 = 2401, that is, m2401m \ge 2401.

Next, we prove that for any two states α\alpha and β\beta, α\alpha can be transformed into a state identical to β\beta with no more than 24012401 operations. Without loss of generality, assume β=β\beta = \beta^*; otherwise, a permutation of the number table can be applied.

For a (linear) arrangement π=(x1,x2,,xn)\pi = (x_1, x_2, \dots, x_n) composed of several different numbers, an ordered pair (xi,xj)(x_i, x_j) with 1i<jn1 \le i < j \le n and xi>xjx_i > x_j is called an inversion pair, and let I(π)I(\pi) denote the number of inversion pairs in π\pi. It is easy to see that if (xi,xi+1)(x_i, x_{i+1}) is an inversion pair, then swapping xix_i with xi+1x_{i+1} to get π\pi' results in I(π)=I(π)1I(\pi') = I(\pi) - 1. When I(π)=0I(\pi) = 0, π\pi is in increasing order. Therefore, for any arrangement π\pi, it can be transformed into an increasing arrangement with exactly I(π)I(\pi) operations (by swapping adjacent numbers).

Numbers 1,2,,501, 2, \ldots, 50 are called small numbers, and numbers 51,,9951, \ldots, 99 are called large numbers. Consider the number of small numbers among 5050 consecutive vertices in state α\alpha. There are 9999 ways to take 5050 consecutive vertices, and each small number appears in exactly 5050 of these ways, so the average number of small numbers is 50×5099(25,26)\frac{50 \times 50}{99} \in (25, 26). Therefore, there must be some 5050 consecutive vertices containing no more than 2525 small numbers, and also some 5050 consecutive vertices containing more than 2525 small numbers. Using the discrete intermediate value theorem, it is easy to prove that there exist 5050 consecutive vertices containing exactly 2525 small numbers (and 2525 large numbers).

Arrange α\alpha clockwise starting from a certain number as (a1,a2,,a50,b1,b2,,b49)cyc(a_1, a_2, \dots, a_{50}, b_1, b_2, \dots, b_{49})_{\text{cyc}} (the subscript cyc indicates a cyclic arrangement), such that among a1,a2,,a50a_1, a_2, \dots, a_{50}, there are exactly 2525 small numbers. Let the small numbers in a1,a2,,a50a_1, a_2, \dots, a_{50} from left to right be x1,x2,,x25x_1, x_2, \dots, x_{25}, and the large numbers from left to right be y1,y2,,y25y_1, y_2, \dots, y_{25}; let the small numbers in b1,b2,,b49b_1, b_2, \dots, b_{49} from left to right be z1,z2,,z25z_1, z_2, \dots, z_{25}, and the large numbers from left to right be w1,w2,,w24w_1, w_2, \dots, w_{24}. We have the following two schemes:

Scheme one:
(1.1) Swap adjacent numbers in (a1,a2,,a50)(a_1, a_2, \cdots, a_{50}) to move the small numbers to the first 2525 positions. The minimum number of operations required is s1s_1.
(1.2) Swap adjacent numbers in (b1,b2,,b49)(b_1, b_2, \cdots, b_{49}) to move the small numbers to the last 2525 positions. The minimum number of operations required is s2s_2.
Now, we obtain the following cyclic arrangement:
(x1,x2,,x25,y1,y2,,y25,w1,w2,,w24,z1,z2,,z25)cyc.() (x_1, x_2, \cdots, x_{25}, y_1, y_2, \cdots, y_{25}, w_1, w_2, \cdots, w_{24}, z_1, z_2, \cdots, z_{25})_{\text{cyc}}. \quad (*)
The reason for this particular arrangement will be explained in a lemma later.
(1.3) Perform I(σ1)I(\sigma_1) operations on σ1=(z1,,z25,x1,,x25)\sigma_1 = (z_1, \cdots, z_{25}, x_1, \cdots, x_{25}) to obtain the arrangement (1,2,,50)(1, 2, \cdots, 50).
For σ2=(y1,,y25,w1,,w24)\sigma_2 = (y_1, \cdots, y_{25}, w_1, \cdots, w_{24}), perform I(σ2)I(\sigma_2) operations to obtain (51,52,,99)(51, 52, \cdots, 99). Thus, we achieve a state identical to β\beta^*, with a total number of operations equal to s1+s2+I(σ1)+I(σ2)s_1 + s_2 + I(\sigma_1) + I(\sigma_2).

Scheme two:
(2.1) Swap adjacent numbers in (a1,a2,,a50)(a_1, a_2, \cdots, a_{50}) to move the small numbers to the last 2525 positions. The minimum number of operations required is s1s'_1.
(2.2) Swap adjacent numbers in (b1,b2,,b49)(b_1, b_2, \cdots, b_{49}) to move the small numbers to the first 2525 positions. The minimum number of operations required is s2s'_2.
Now, we obtain the cyclic arrangement
(y1,y2,,y25,x1,x2,,x25,z1,z2,,z25,w1,w2,,w24)cyc.() (y_1, y_2, \cdots, y_{25}, x_1, x_2, \cdots, x_{25}, z_1, z_2, \cdots, z_{25}, w_1, w_2, \cdots, w_{24})_{\text{cyc}}. \quad (**)
(2.3) Perform I(σ1)I(\sigma'_1) operations on σ1=(x1,,x25,z1,,z25)\sigma'_1 = (x_1, \cdots, x_{25}, z_1, \cdots, z_{25}) to obtain the arrangement (1,2,,50)(1, 2, \cdots, 50).
For σ2=(w1,,w24,y1,,y25)\sigma'_2 = (w_1, \cdots, w_{24}, y_1, \cdots, y_{25}), perform I(σ2)I(\sigma'_2) operations to obtain (51,52,,99)(51, 52, \cdots, 99). Thus, we achieve a state identical to β\beta^*, with a total number of operations equal to s1+s2+I(σ1)+I(σ2)s'_1 + s'_2 + I(\sigma'_1) + I(\sigma'_2).

Next, we prove that one of the two schemes must have an operation count not exceeding 24012401.

Lemma: Consider an arrangement of aa red numbers and bb blue numbers. Let ss be the minimum number of operations required to move the red numbers to the front and the blue numbers to the back by swapping adjacent numbers, and let tt be the minimum number of operations required for the opposite arrangement. Then s+t=abs + t = ab, and to achieve the minimum number of operations, each operation must involve swapping a red number with a blue number, thereby not changing the order among the red numbers or among the blue numbers.

Proof of the Lemma: Consider the ordered pairs (x,y)(x, y) in the arrangement, where xx is a blue number and yy is a red number, with xx positioned to the left of yy. Let the count of such pairs be SS. After one operation, SS decreases by at most 11 (remains unchanged if two red or two blue numbers are swapped, decreases by 11 if a blue number is swapped with a red number to its right, and increases by 11 if a red number is swapped with a blue number to its right). Therefore, by selecting pairs of consecutive blue and red numbers for each operation, it takes exactly SS operations to arrange all red numbers to the left and blue numbers to the right, hence the minimum number of operations ss equals SS. Similarly, tt is the count of pairs (z,w)(z, w), where zz is a red number and ww is a blue number, with zz positioned to the left of ww. Thus, s+ts + t counts each unordered pair of a red and a blue number exactly once, therefore s+t=abs + t = ab.

With the lemma proven, it also explains why after (1.1) and (1.2) we obtain the cyclic arrangement ()(*), and after (2.1) and (2.2) we obtain ()(**).

By the lemma, s1+s1=25×25=625s_1 + s'_1 = 25 \times 25 = 625, s2+s2=24×25=600s_2 + s'_2 = 24 \times 25 = 600.

Let σ=(x1,,x25)\sigma = (x_1, \cdots, x_{25}), τ=(z1,,z25)\tau = (z_1, \cdots, z_{25}), hence σ1=(τ,σ)\sigma_1 = (\tau, \sigma), σ1=(σ,τ)\sigma'_1 = (\sigma, \tau). Then
I(σ1)+I(σ1)=2I(τ)+2I(σ)+I(τ,σ)+I(σ,τ). I(\sigma_1) + I(\sigma'_1) = 2I(\tau) + 2I(\sigma) + I(\tau, \sigma) + I(\sigma, \tau).
Here I(τ,σ)I(\tau, \sigma) denotes the number of inversion pairs in σ1\sigma_1 formed by taking a number from τ\tau and a number from σ\sigma, and I(σ,τ)I(\sigma, \tau) counts the inversion pairs in σ1\sigma'_1 taking a number from σ\sigma and a number from τ\tau, so I(σ,τ)+I(τ,σ)I(\sigma, \tau) + I(\tau, \sigma) counts every unordered pair formed by taking one number from τ\tau and one from σ\sigma, amounting to 252=62525^2 = 625. Since I(σ)(252)I(\sigma) \le \binom{25}{2} and I(τ)(252)I(\tau) \le \binom{25}{2}, we have
I(σ1)+I(σ1)2(252)+2(252)+252=1825. I(\sigma_1) + I(\sigma'_1) \le 2\binom{25}{2} + 2\binom{25}{2} + 25^2 = 1825.
Similarly, we find
I(σ2)+I(σ2)2(242)+2(252)+24×25=1752. I(\sigma_2) + I(\sigma'_2) \le 2\binom{24}{2} + 2\binom{25}{2} + 24 \times 25 = 1752.
Therefore,
(s1+s2+I(σ1)+I(σ2))+(s1+s2+I(σ1)+I(σ2))625+600+1825+1752=4802. (s_1 + s_2 + I(\sigma_1) + I(\sigma_2)) + (s'_1 + s'_2 + I(\sigma'_1) + I(\sigma'_2)) \le 625 + 600 + 1825 + 1752 = 4802.
By the principle of averages, one of the schemes must have an operation count not exceeding 24012401.

In conclusion, the smallest NN sought is 24012401.

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 and solution reproduced as published; topic and difficulty added by this site.