Browse · MathNet
Print50th Mathematical Olympiad in Ukraine, Fourth Round (March 24, 2010)
Ukraine 2010 counting and probability
Problem
Numbers , , ..., are placed in a row in a certain order. We are allowed to do the following operation: take any two pairs of consecutive elements, that have no common elements, and exchange their positions. Is it possible to get a monotone sequence of elements after a finite number of steps if:
a) ; b) ?
a) ; b) ?
Solution
Answer: a) not always; b) always possible.
If we consider consecutive elements, then from combination we can get the following: Last three permutations were cyclically rearranged, so, similarly, we can get three numbers . If we make symmetric permutations, then we can also permute first three elements of our five numbers: Consider some four positions with numbers -, for example. We first locate , , , ..., . The following shows how this can be done on the example of . Let us suppose that numbers - are already on their positions. Further we will not touch their permutations. If is next right from (on its position), everything is done. If is on the last position or -labeled, then we swap positions of pairs that occupy positions with numbers and and is already not on the last position. If is on one position after (labeled as ), then we change positions of pairs with following labels at first: and . Let us suppose that is already on some position , then we are swapping positions of pairs labeled as: and and number is taking its position. So we will place on their seats all the numbers -. After this, we similarly symmetrical interchange places of numbers -. That means that we always can get next permutation:
, , ..., , , , , , , , ..., ,
where the set of numbers is some permutation of numbers . Let's see what permutations of we can get. There are just of them. If we will take in attention next numbers , then using the scheme above we will gain also: and . If we will add right-side to gained sets of four numbers , and and use the scheme above, so we will obtain next permutations: , , , , , . Apply again the scheme to some of obtained permutations and we will get another variants: , and . So, we could get out of . We now have to show that to arrange remaining numbers in ascending order is impossible.
For any permutation of numbers , , ..., call as inversion the case when a larger number is left of a smaller, for example the position of numbers has an inversion: , , and . Call the quantity of such inversions as "position invariant". Let's show that after performing any authorized operation, the invariant of positions varies by a number which is divisible by . Let us suppose that we have changed numbers and , that occupied positions and , . Then the quantity of inversions will not change after permutation. We have only mentioned inversions associated with numbers located on positions , , ..., and , , ..., . That means that the quantity of inversions is constant. The quantity of inversions that use the numbers on positions , , ..., is not changing relative to each other. But if we consider some number , which occupies one of mentioned positions, then with attention to each of those pairs of numbers and , that are transposed, it will change. And this is changing necessarily from to or vice versa from to . Hence the total quantity of changes will be even, so the parity of position invariant will not change. And about the numbers , , , , behind and , and and nothing is changing and behind all other pairs ( at all) will be the same situation. So, the parity of inversions will stay the same.
So, it's easy to understand that we would not move on from position , , , , ..., (invariant is equal to ) to position , , , , , ..., (invariant is ). So we would not obtain other permutations inside of , , , permutation.
But all this applies only to try to arrange the numbers in ascending order. Completely the same way you can try to arrange them in descending order. As we see, all the positions were broken into two large groups (with even and odd invariant), that cannot be translated.
Let's count the invariant of such a position: , , , ..., , , . Every pair here is an inversion, so their total amount is . If it's an even number, then both of monotone positions locate in the same half and we can transform them between each other. But we cannot get all the positions in general. If this number is odd, vice versa, then any start position with its invariant would be transformed into increasing or decreasing one. So, we just have to find the parity of number . So if and have different parity, then that number will be even if one of them is divisible by . That means that or , else it's odd. Hence for not all the positions could be transformed one to another. And for from any position with the same scheme we can obtain increasing or decreasing set of numbers instead.
If we consider consecutive elements, then from combination we can get the following: Last three permutations were cyclically rearranged, so, similarly, we can get three numbers . If we make symmetric permutations, then we can also permute first three elements of our five numbers: Consider some four positions with numbers -, for example. We first locate , , , ..., . The following shows how this can be done on the example of . Let us suppose that numbers - are already on their positions. Further we will not touch their permutations. If is next right from (on its position), everything is done. If is on the last position or -labeled, then we swap positions of pairs that occupy positions with numbers and and is already not on the last position. If is on one position after (labeled as ), then we change positions of pairs with following labels at first: and . Let us suppose that is already on some position , then we are swapping positions of pairs labeled as: and and number is taking its position. So we will place on their seats all the numbers -. After this, we similarly symmetrical interchange places of numbers -. That means that we always can get next permutation:
, , ..., , , , , , , , ..., ,
where the set of numbers is some permutation of numbers . Let's see what permutations of we can get. There are just of them. If we will take in attention next numbers , then using the scheme above we will gain also: and . If we will add right-side to gained sets of four numbers , and and use the scheme above, so we will obtain next permutations: , , , , , . Apply again the scheme to some of obtained permutations and we will get another variants: , and . So, we could get out of . We now have to show that to arrange remaining numbers in ascending order is impossible.
For any permutation of numbers , , ..., call as inversion the case when a larger number is left of a smaller, for example the position of numbers has an inversion: , , and . Call the quantity of such inversions as "position invariant". Let's show that after performing any authorized operation, the invariant of positions varies by a number which is divisible by . Let us suppose that we have changed numbers and , that occupied positions and , . Then the quantity of inversions will not change after permutation. We have only mentioned inversions associated with numbers located on positions , , ..., and , , ..., . That means that the quantity of inversions is constant. The quantity of inversions that use the numbers on positions , , ..., is not changing relative to each other. But if we consider some number , which occupies one of mentioned positions, then with attention to each of those pairs of numbers and , that are transposed, it will change. And this is changing necessarily from to or vice versa from to . Hence the total quantity of changes will be even, so the parity of position invariant will not change. And about the numbers , , , , behind and , and and nothing is changing and behind all other pairs ( at all) will be the same situation. So, the parity of inversions will stay the same.
So, it's easy to understand that we would not move on from position , , , , ..., (invariant is equal to ) to position , , , , , ..., (invariant is ). So we would not obtain other permutations inside of , , , permutation.
But all this applies only to try to arrange the numbers in ascending order. Completely the same way you can try to arrange them in descending order. As we see, all the positions were broken into two large groups (with even and odd invariant), that cannot be translated.
Let's count the invariant of such a position: , , , ..., , , . Every pair here is an inversion, so their total amount is . If it's an even number, then both of monotone positions locate in the same half and we can transform them between each other. But we cannot get all the positions in general. If this number is odd, vice versa, then any start position with its invariant would be transformed into increasing or decreasing one. So, we just have to find the parity of number . So if and have different parity, then that number will be even if one of them is divisible by . That means that or , else it's odd. Hence for not all the positions could be transformed one to another. And for from any position with the same scheme we can obtain increasing or decreasing set of numbers instead.
Final answer
a) not always; b) always possible.
Techniques
Invariants / monovariantsPermutations / basic group theory