Browse · MathNet
PrintChinese Mathematical Olympiad
China counting and probability
Problem
A state refers to a way to place the numbers on the vertices of a given regular -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 -gon (on the plane).
An operation is to first choose two adjacent vertices of the regular -gon and then exchange the numbers on these two vertices. Determine the smallest positive integer such that, for any two states and , one may apply no more than operations to to obtain a state that is equivalent to .
An operation is to first choose two adjacent vertices of the regular -gon and then exchange the numbers on these two vertices. Determine the smallest positive integer such that, for any two states and , one may apply no more than operations to to obtain a state that is equivalent to .
Solution
The smallest .
Let be the state where the numbers are arranged counterclockwise at the vertices, and be the state where are arranged clockwise on the circle. We prove that it takes at least operations to transform into a permutation identical to .
Assume transforms into a permutation identical to after operations. If a certain operation swaps numbers , then draw an edge between and , thereby obtaining a graph with as the vertex set and edges (possibly with repetitions). For any three numbers , they are in counterclockwise order in and in clockwise order in . Hence, there must be at least one operation involving two of these numbers, i.e., there is at least one edge among in . Therefore, the complement graph of does not contain a triangle. According to Turán's theorem, the number of edges in does not exceed , so the number of edges in is at least , that is, .
Next, we prove that for any two states and , can be transformed into a state identical to with no more than operations. Without loss of generality, assume ; otherwise, a permutation of the number table can be applied.
For a (linear) arrangement composed of several different numbers, an ordered pair with and is called an inversion pair, and let denote the number of inversion pairs in . It is easy to see that if is an inversion pair, then swapping with to get results in . When , is in increasing order. Therefore, for any arrangement , it can be transformed into an increasing arrangement with exactly operations (by swapping adjacent numbers).
Numbers are called small numbers, and numbers are called large numbers. Consider the number of small numbers among consecutive vertices in state . There are ways to take consecutive vertices, and each small number appears in exactly of these ways, so the average number of small numbers is . Therefore, there must be some consecutive vertices containing no more than small numbers, and also some consecutive vertices containing more than small numbers. Using the discrete intermediate value theorem, it is easy to prove that there exist consecutive vertices containing exactly small numbers (and large numbers).
Arrange clockwise starting from a certain number as (the subscript cyc indicates a cyclic arrangement), such that among , there are exactly small numbers. Let the small numbers in from left to right be , and the large numbers from left to right be ; let the small numbers in from left to right be , and the large numbers from left to right be . We have the following two schemes:
Scheme one: (1.1) Swap adjacent numbers in to move the small numbers to the first positions. The minimum number of operations required is . (1.2) Swap adjacent numbers in to move the small numbers to the last positions. The minimum number of operations required is . Now, we obtain the following cyclic arrangement: The reason for this particular arrangement will be explained in a lemma later. (1.3) Perform operations on to obtain the arrangement . For , perform operations to obtain . Thus, we achieve a state identical to , with a total number of operations equal to .
Scheme two: (2.1) Swap adjacent numbers in to move the small numbers to the last positions. The minimum number of operations required is . (2.2) Swap adjacent numbers in to move the small numbers to the first positions. The minimum number of operations required is . Now, we obtain the cyclic arrangement (2.3) Perform operations on to obtain the arrangement . For , perform operations to obtain . Thus, we achieve a state identical to , with a total number of operations equal to .
Next, we prove that one of the two schemes must have an operation count not exceeding .
Lemma: Consider an arrangement of red numbers and blue numbers. Let 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 be the minimum number of operations required for the opposite arrangement. Then , 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 in the arrangement, where is a blue number and is a red number, with positioned to the left of . Let the count of such pairs be . After one operation, decreases by at most (remains unchanged if two red or two blue numbers are swapped, decreases by if a blue number is swapped with a red number to its right, and increases by 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 operations to arrange all red numbers to the left and blue numbers to the right, hence the minimum number of operations equals . Similarly, is the count of pairs , where is a red number and is a blue number, with positioned to the left of . Thus, counts each unordered pair of a red and a blue number exactly once, therefore .
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, , .
Let , , hence , . Then Here denotes the number of inversion pairs in formed by taking a number from and a number from , and counts the inversion pairs in taking a number from and a number from , so counts every unordered pair formed by taking one number from and one from , amounting to . Since and , we have Similarly, we find Therefore, By the principle of averages, one of the schemes must have an operation count not exceeding .
In conclusion, the smallest sought is .
Let be the state where the numbers are arranged counterclockwise at the vertices, and be the state where are arranged clockwise on the circle. We prove that it takes at least operations to transform into a permutation identical to .
Assume transforms into a permutation identical to after operations. If a certain operation swaps numbers , then draw an edge between and , thereby obtaining a graph with as the vertex set and edges (possibly with repetitions). For any three numbers , they are in counterclockwise order in and in clockwise order in . Hence, there must be at least one operation involving two of these numbers, i.e., there is at least one edge among in . Therefore, the complement graph of does not contain a triangle. According to Turán's theorem, the number of edges in does not exceed , so the number of edges in is at least , that is, .
Next, we prove that for any two states and , can be transformed into a state identical to with no more than operations. Without loss of generality, assume ; otherwise, a permutation of the number table can be applied.
For a (linear) arrangement composed of several different numbers, an ordered pair with and is called an inversion pair, and let denote the number of inversion pairs in . It is easy to see that if is an inversion pair, then swapping with to get results in . When , is in increasing order. Therefore, for any arrangement , it can be transformed into an increasing arrangement with exactly operations (by swapping adjacent numbers).
Numbers are called small numbers, and numbers are called large numbers. Consider the number of small numbers among consecutive vertices in state . There are ways to take consecutive vertices, and each small number appears in exactly of these ways, so the average number of small numbers is . Therefore, there must be some consecutive vertices containing no more than small numbers, and also some consecutive vertices containing more than small numbers. Using the discrete intermediate value theorem, it is easy to prove that there exist consecutive vertices containing exactly small numbers (and large numbers).
Arrange clockwise starting from a certain number as (the subscript cyc indicates a cyclic arrangement), such that among , there are exactly small numbers. Let the small numbers in from left to right be , and the large numbers from left to right be ; let the small numbers in from left to right be , and the large numbers from left to right be . We have the following two schemes:
Scheme one: (1.1) Swap adjacent numbers in to move the small numbers to the first positions. The minimum number of operations required is . (1.2) Swap adjacent numbers in to move the small numbers to the last positions. The minimum number of operations required is . Now, we obtain the following cyclic arrangement: The reason for this particular arrangement will be explained in a lemma later. (1.3) Perform operations on to obtain the arrangement . For , perform operations to obtain . Thus, we achieve a state identical to , with a total number of operations equal to .
Scheme two: (2.1) Swap adjacent numbers in to move the small numbers to the last positions. The minimum number of operations required is . (2.2) Swap adjacent numbers in to move the small numbers to the first positions. The minimum number of operations required is . Now, we obtain the cyclic arrangement (2.3) Perform operations on to obtain the arrangement . For , perform operations to obtain . Thus, we achieve a state identical to , with a total number of operations equal to .
Next, we prove that one of the two schemes must have an operation count not exceeding .
Lemma: Consider an arrangement of red numbers and blue numbers. Let 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 be the minimum number of operations required for the opposite arrangement. Then , 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 in the arrangement, where is a blue number and is a red number, with positioned to the left of . Let the count of such pairs be . After one operation, decreases by at most (remains unchanged if two red or two blue numbers are swapped, decreases by if a blue number is swapped with a red number to its right, and increases by 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 operations to arrange all red numbers to the left and blue numbers to the right, hence the minimum number of operations equals . Similarly, is the count of pairs , where is a red number and is a blue number, with positioned to the left of . Thus, counts each unordered pair of a red and a blue number exactly once, therefore .
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, , .
Let , , hence , . Then Here denotes the number of inversion pairs in formed by taking a number from and a number from , and counts the inversion pairs in taking a number from and a number from , so counts every unordered pair formed by taking one number from and one from , amounting to . Since and , we have Similarly, we find Therefore, By the principle of averages, one of the schemes must have an operation count not exceeding .
In conclusion, the smallest sought is .
Final answer
2401
Techniques
Turán's theoremInvariants / monovariantsCounting two waysPigeonhole principleColoring schemes, extremal arguments