返回题库

AIME 1987 · 第 13 题

AIME 1987 — Problem 13

专题
Contest Math
难度
L4
来源
AIME

题目详情

Problem

A given sequence r1,r2,,rnr_1, r_2, \dots, r_n 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, rnr_n, 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.

1987\underline{1 \quad 9} \quad 8 \quad 7 19871 \quad {}\underline{9 \quad 8} \quad 7 18971 \quad 8 \quad \underline{9 \quad 7} 18791 \quad 8 \quad 7 \quad 9

Suppose that n=40n = 40, and that the terms of the initial sequence r1,r2,,r40r_1, r_2, \dots, r_{40} are distinct from one another and are in random order. Let p/qp/q, in lowest terms, be the probability that the number that begins as r20r_{20} will end up, after one bubble pass, in the 30th30^{\text{th}} place. Find p+qp + q.

解析

Solution 1

If any of r1,,r19r_1, \ldots, r_{19} is larger than r20r_{20}, one of these numbers will be compared with r20r_{20} on the 19th step of the first bubble pass and r20r_{20} will be moved back to the 19th position. Thus, r20r_{20} must be the largest of the first 20 terms. In addition, r20r_{20} must be larger than r21,r22,,r30r_{21}, r_{22}, \ldots, r_{30} but smaller than r31r_{31} 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 31!31! ways to order the first thirty-one numbers and 29!29! 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 29!31!=13130=1930\frac{29!}{31!} = \frac{1}{31\cdot 30} = \frac{1}{930}, so the answer is 931\boxed{931}.

Remark

Note that you can solve the restated problem differently:

We see that the numerator is 11 because there is only 11 way to make the 31st31^{\text{st}} term the largest and the 20th20^{\text{th}} the second-largest. To calculate the denominator, we note that there are 31×3031\times30 ways to pick the largest term and the second-largest term. Therefore, our answer is 931\boxed{931}. ~Yiyj1

Solution 2 (Summations)

Assume we have a set of 4040 numbers, all distinct, that will be randomly shuffled. We wish to find the number of ways that the following conditions are satisfied:

1.1. The greatest number out of the first 3030 terms is located at the 2020th place, and

2.2. Term 3131 is greater than term 2020.

3.3. The final 99 terms can be in any order.

Let the resulting term 2020 be notated as XX. We then set up a dummy variable kk such that kk describes the number of terms (out of 4040) that are less than XX. For instance, if there were 2929 terms less than XX, the dummy variable kk would be 2929. Now we can set up our summation.

1.1. To make sure the first condition is met, we perform the following: We know that there are kk terms less than XX, so thus there are k!(k29)!\frac{k!}{(k-29)!} ways to place 2929 of the kk terms in a specific order.

2.2. For the second condition, there are 39k39-k terms greater than XX, so there are 39k39-k ways to place the number greater than XX in the 3131st placement.

3.3. Finally, since the final 99 terms can be in any order, there are 9!9! 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 kk in order to calculate our summation. Looking at the range of kk, we see that there must be at least 2929 numbers less than XX in order for condition 11 to be satisfied. There must be at least 11 number greater than XX in order for condition 22 to be satisfied as well, leaving a maximum of 3838 numbers less than XX. Thus, kk ranges from 2929 to 3838.

Finally, we divide the entire value by 40!40! as there are 40!40! ways to arrange the 4040 terms. This step could also be performed at the very end. At this point, we are ready to calculate the summation.

140!k=2938(k!(k29)!(39k)9!)\frac{1}{40!}\sum_{k=29}^{38}\left(\frac{k!}{(k-29)!}(39-k)\cdot9!\right) =9!40!k=2938(k!(k29)!(39k))=\frac{9!}{40!}\sum_{k=29}^{38}\left(\frac{k!}{(k-29)!}(39-k)\right) =9!3940!k=2938(k!(k29)!)9!40!k=2938(k!k(k29)!)=\frac{9!\cdot39}{40!}\sum_{k=29}^{38}\left(\frac{k!}{(k-29)!}\right)-\frac{9!}{40!}\sum_{k=29}^{38}\left(\frac{k!\cdot k}{(k-29)!}\right)

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 (k29){k\choose29}. Indeed, we are able to use this to our advantage:

9!3940!k=2938(k!(k29)!)\frac{9!\cdot39}{40!}\sum_{k=29}^{38}\left(\frac{k!}{(k-29)!}\right) =9!3929!40!k=2938(k!(k29)!29!)=\frac{9!\cdot39\cdot29!}{40!}\sum_{k=29}^{38}\left(\frac{k!}{(k-29)!\cdot29!}\right) =9!3929!40!k=2938(k29)=\frac{9!\cdot39\cdot29!}{40!}\sum_{k=29}^{38}{k\choose29} =9!3929!40!(3930)=\frac{9!\cdot39\cdot29!}{40!}{39\choose30}

(The last equality is thanks to the Hockey-Stick Identity.)

The second sum is similar to the first, but we must first replace kk with (k+1)1(k+1)-1:

9!40!k=2938(k!k(k29)!)\frac{9!}{40!}\sum_{k=29}^{38}\left(\frac{k!\cdot k}{(k-29)!}\right) =9!40!k=2938(k!(k+11)(k29)!)=\frac{9!}{40!}\sum_{k=29}^{38}\left(\frac{k!\cdot(k+1-1)}{(k-29)!}\right) =9!40!k=2938(k!(k+1)(k29)!)9!40!k=2938(k!(k29)!)=\frac{9!}{40!}\sum_{k=29}^{38}\left(\frac{k!\cdot(k+1)}{(k-29)!}\right)-\frac{9!}{40!}\sum_{k=29}^{38}\left(\frac{k!}{(k-29)!}\right) =9!40!k=2938((k+1)!(k29)!)9!40!k=2938(k!(k29)!)=\frac{9!}{40!}\sum_{k=29}^{38}\left(\frac{(k+1)!}{(k-29)!}\right)-\frac{9!}{40!}\sum_{k=29}^{38}\left(\frac{k!}{(k-29)!}\right) =9!30!40!k=2938(k+130)9!29!40!k=2938(k29)=\frac{9!\cdot30!}{40!}\sum_{k=29}^{38}{k+1\choose30}-\frac{9!\cdot29!}{40!}\sum_{k=29}^{38}{k\choose29} =9!30!40!(4031)9!29!40!(3930)=\frac{9!\cdot30!}{40!}{40\choose31}-\frac{9!\cdot29!}{40!}{39\choose30}

We are finally able to calculate the end result:

9!3940!k=2938(k!(k29)!)9!40!k=2938(k!k(k29)!)\frac{9!\cdot39}{40!}\sum_{k=29}^{38}\left(\frac{k!}{(k-29)!}\right)-\frac{9!}{40!}\sum_{k=29}^{38}\left(\frac{k!\cdot k}{(k-29)!}\right) =9!3929!40!(3930)9!30!40!(4031)+9!29!40!(3930)=\frac{9!\cdot39\cdot29!}{40!}{39\choose30}-\frac{9!\cdot30!}{40!}{40\choose31}+\frac{9!\cdot29!}{40!}{39\choose30} =9!4029!40!(3930)9!30!40!(4031)=\frac{9!\cdot40\cdot29!}{40!}{39\choose30}-\frac{9!\cdot30!}{40!}{40\choose31} =9!29!39!39!9!30!9!30!40!40!9!31!=\frac{9!\cdot29!\cdot39!}{39!\cdot9!\cdot30!}-\frac{9!\cdot30!\cdot40!}{40!\cdot9!\cdot31!} =29!30!30!31!=\frac{29!}{30!}-\frac{30!}{31!} =130131=\frac{1}{30}-\frac{1}{31} =3193030930=\frac{31}{930}-\frac{30}{930} =1930=\frac{1}{930}

Thus our answer is 1+930=9311+930=\boxed{931}.

~eevee9406