1987 AIME Problems/Problem 13
Problem
A given sequence of distinct real numbers can be put in ascending order by means of one or more "bubble passes". A bubble pass through a given sequence consists of comparing the second term with the first term, and exchanging them if and only if the second term is smaller, then comparing the third term with the second term and exchanging them if and only if the third term is smaller, and so on in order, through comparing the last term, , with its current predecessor and exchanging them if and only if the last term is smaller.
The example below shows how the sequence 1, 9, 8, 7 is transformed into the sequence 1, 8, 7, 9 by one bubble pass. The numbers compared at each step are underlined.
Suppose that , and that the terms of the initial sequence are distinct from one another and are in random order. Let , in lowest terms, be the probability that the number that begins as will end up, after one bubble pass, in the place. Find .
Solution 1
If any of is larger than , one of these numbers will be compared with on the 19th step of the first bubble pass and will be moved back to the 19th position. Thus, must be the largest of the first 20 terms. In addition, must be larger than but smaller than in order that it move right to the 30th position but then not continue moving right to the 31st.
Thus, our problem can be restated: What is the probability that in a sequence of 31 distinct real numbers, the largest is in position 31 and the second-largest is in position 20 (the other 29 numbers are irrelevant)?
This is much easier to solve: there are ways to order the first thirty-one numbers and ways to arrange them so that the largest number is in the 31st position and the second-largest is in the 20th. This gives us a desired probability of , so the answer is .
Remark
Note that you can solve the restated problem differently:
We see that the numerator is because there is only way to make the term the largest and the the second-largest. To calculate the denominator, we note that there are ways to pick the largest term and the second-largest term. Therefore, our answer is . ~Yiyj1
Solution 2 (Summations)
Assume we have a set of numbers, all distinct, that will be randomly shuffled. We wish to find the number of ways that the following conditions are satisfied:
The greatest number out of the first terms is located at the th place, and
Term is greater than term .
The final terms can be in any order.
Let the resulting term be notated as . We then set up a dummy variable such that describes the number of terms (out of ) that are less than . For instance, if there were terms less than , the dummy variable would be . Now we can set up our summation.
To make sure the first condition is met, we perform the following: We know that there are terms less than , so thus there are ways to place of the terms in a specific order.
For the second condition, there are terms greater than , so there are ways to place the number greater than in the st placement.
Finally, since the final terms can be in any order, there are ways to place these numbers.
(The three steps above all correspond to the three conditions given at the beginning of the solution.)
However, we need to set lower and upper bounds for in order to calculate our summation. Looking at the range of , we see that there must be at least numbers less than in order for condition to be satisfied. There must be at least number greater than in order for condition to be satisfied as well, leaving a maximum of numbers less than . Thus, ranges from to .
Finally, we divide the entire value by as there are ways to arrange the terms. This step could also be performed at the very end. At this point, we are ready to calculate the summation.
Now we deal with each sum separately. Looking at the first sum, we see that the factorials inside the summation bear a close resemblance to . Indeed, we are able to use this to our advantage:
(The last equality is thanks to the Hockey-Stick Identity.)
The second sum is similar to the first, but we must first replace with :
We are finally able to calculate the end result:
Thus our answer is .
~eevee9406
See also
1987 AIME (Problems • Answer Key • Resources) | ||
Preceded by Problem 12 |
Followed by Problem 14 | |
1 • 2 • 3 • 4 • 5 • 6 • 7 • 8 • 9 • 10 • 11 • 12 • 13 • 14 • 15 | ||
All AIME Problems and Solutions |
The problems on this page are copyrighted by the Mathematical Association of America's American Mathematics Competitions.