Difference between revisions of "2010 USAMO Problems/Problem 2"
(→Solution) |
(→Solution 2) |
||
Line 28: | Line 28: | ||
With <math>n</math> students in all, the total number of steps is therefore at most <math>\sum_{i=3}^{n}\binom{i-1}{2} = \binom{n}{3}</math>. The sum is a telescoping sum since: <math>\binom{n}{3} - \binom{n-1}{3} = \binom{n-1}{2}.</math> | With <math>n</math> students in all, the total number of steps is therefore at most <math>\sum_{i=3}^{n}\binom{i-1}{2} = \binom{n}{3}</math>. The sum is a telescoping sum since: <math>\binom{n}{3} - \binom{n-1}{3} = \binom{n-1}{2}.</math> | ||
==Solution 2== | ==Solution 2== | ||
− | WLOG, let | + | WLOG, let <math>h_k=k</math>. Now, we find the end arrangement with the most switches possible. We claim that the arrangement will be <math>n,n-1,n-2,\dots ,1</math>, where the left to right direction is the "backwards" direction. To prove this makes the most switches, we show that there is always at least one more switch that can be done for any other arrangement. This is elementary to show. There will always be one height <math>x</math> such that the number to its right is <math>2</math> less than <math>x</math>, unless every number has <math>x-1</math> to the right of <math>x</math> (other than <math>2</math> and <math>1</math>). The exception occurs at our claim, so our claim is proven. Now we want to find the maximum ways we can "undo" our arrangement. But undoing a switch is just doing a switch from our arrangement in the opposite direction. So, the start arrangement with the most possible switches is the reverse of the end arrangement or <math>1,2,3,\dots ,n</math>. |
We want to find how many switches must be done to get from the start arrangement to the end arrangement. We start by switching <math>n</math> around until it cannot be switched anymore. We find that we can switch <math>n</math> <math>n-2</math> times. When we are switching (or, in other words, moving to the right) the number <math>k</math>, we can switch it <math>k-2</math> times before it is to the left of <math>k-1</math>. But then we can also switch each of <math>k+1,k+2,\dots ,n</math> (in that order) <math>k-2</math> times before they get stopped again. Let <math>x=n-k+2</math>. Then, the sum of the switches is <math>\sum\limits_{x=2}^{n-1} (n-x)(x-1)=\sum\limits_{x=1}^{n} (n-x)(x-1)</math>. | We want to find how many switches must be done to get from the start arrangement to the end arrangement. We start by switching <math>n</math> around until it cannot be switched anymore. We find that we can switch <math>n</math> <math>n-2</math> times. When we are switching (or, in other words, moving to the right) the number <math>k</math>, we can switch it <math>k-2</math> times before it is to the left of <math>k-1</math>. But then we can also switch each of <math>k+1,k+2,\dots ,n</math> (in that order) <math>k-2</math> times before they get stopped again. Let <math>x=n-k+2</math>. Then, the sum of the switches is <math>\sum\limits_{x=2}^{n-1} (n-x)(x-1)=\sum\limits_{x=1}^{n} (n-x)(x-1)</math>. | ||
Latest revision as of 18:20, 3 October 2017
Contents
Problem
There are students standing in a circle, one behind the other. The students have heights . If a student with height is standing directly behind a student with height or less, the two students are permitted to switch places. Prove that it is not possible to make more than such switches before reaching a position in which no further switches are possible.
Solution 1
We adopt the usual convention that unless . With this, the binomial coefficients are defined for all integers via the recursion:
It is clear that the circle is oriented and all the students are facing in same direction (clockwise or counterclockwise). We'll call this direction forward.
In any switch consider the taller student to have moved forward and the shorter student to have remained stationary. No backward motion is allowed. With this definition of forward motion, the first two students with heights and are always stationary, while other students potentially move past them.
For , the student with height can never switch places with the student with height , and the former can make at most more forward moves than the latter (when all the students of heights are between and in the forward direction).
Therefore, if the student can make forward steps, the student can make at most steps. With and , and a constant second difference of , we quickly see that .
With students in all, the total number of steps is therefore at most . The sum is a telescoping sum since:
Solution 2
WLOG, let . Now, we find the end arrangement with the most switches possible. We claim that the arrangement will be , where the left to right direction is the "backwards" direction. To prove this makes the most switches, we show that there is always at least one more switch that can be done for any other arrangement. This is elementary to show. There will always be one height such that the number to its right is less than , unless every number has to the right of (other than and ). The exception occurs at our claim, so our claim is proven. Now we want to find the maximum ways we can "undo" our arrangement. But undoing a switch is just doing a switch from our arrangement in the opposite direction. So, the start arrangement with the most possible switches is the reverse of the end arrangement or . We want to find how many switches must be done to get from the start arrangement to the end arrangement. We start by switching around until it cannot be switched anymore. We find that we can switch times. When we are switching (or, in other words, moving to the right) the number , we can switch it times before it is to the left of . But then we can also switch each of (in that order) times before they get stopped again. Let . Then, the sum of the switches is .
Rearranging and summing, we get
Comment
This process of switching is very similar to Bubble Sort, except that the terms must be in consecutive decreasing order, and wraps around . This answer seems to disagree, though, because the worst case efficiency is , not .
https://en.wikipedia.org/wiki/Bubble_sort
See also
2010 USAMO (Problems • Resources) | ||
Preceded by Problem 1 |
Followed by Problem 3 | |
1 • 2 • 3 • 4 • 5 • 6 | ||
All USAMO Problems and Solutions |
The problems on this page are copyrighted by the Mathematical Association of America's American Mathematics Competitions.