Difference between revisions of "2010 USAMO Problems/Problem 2"
(→Solution 2) |
m (→Solution 1) |
||
Line 26: | Line 26: | ||
Therefore, if the <math>(k-1)^{\mathrm{st}}</math> student can make <math>s_{k-1}</math> forward steps, the <math>k^{\mathrm{th}}</math> student can make at most <math>s_{k-1} + k - 2</math> steps. With <math>s_1 = s_2 = 0</math> and <math>s_3 = 0 + (3-2) = 1</math>, and a constant second difference of <math>1</math>, we quickly see that <math>s_k = \binom{k-1}{2}</math>. | Therefore, if the <math>(k-1)^{\mathrm{st}}</math> student can make <math>s_{k-1}</math> forward steps, the <math>k^{\mathrm{th}}</math> student can make at most <math>s_{k-1} + k - 2</math> steps. With <math>s_1 = s_2 = 0</math> and <math>s_3 = 0 + (3-2) = 1</math>, and a constant second difference of <math>1</math>, we quickly see that <math>s_k = \binom{k-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> | + | 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>, by the [[Hockey Stick Theorem]] |
+ | |||
==Solution 2== | ==Solution 2== | ||
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>. | 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>. |
Revision as of 15:51, 31 August 2024
Contents
[hide]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 , by the Hockey Stick Theorem
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.