返回题库

AIME 2018 II · 第 11 题

AIME 2018 II — Problem 11

专题
Contest Math
难度
L4
来源
AIME

题目详情

Problem

Find the number of permutations of 1,2,3,4,5,61, 2, 3, 4, 5, 6 such that for each kk with 11 \leq kk \leq 55, at least one of the first kk terms of the permutation is greater than kk.

解析

Solution 1

If the first number is 66, then there are no restrictions. There are 5!5!, or 120120 ways to place the other 55 numbers.

If the first number is 55, 66 can go in four places, and there are 4!4! ways to place the other 44 numbers. 44!=964 \cdot 4! = 96 ways.

If the first number is 44, ....

4 6 _ _ _ _     \implies 24 ways

4 _ 6 _ _ _     \implies 24 ways

4 _ _ 6 _ _     \implies 24 ways

4 _ _ _ 6 _     \implies 5 must go between 44 and 66, so there are 33!=183 \cdot 3! = 18 ways.

24+24+24+18=9024 + 24 + 24 + 18 = 90 ways if 4 is first.

If the first number is 33, ....

3 6 _ _ _ _     \implies 24 ways

3 _ 6 _ _ _     \implies 24 ways

3 1 _ 6 _ _     \implies 4 ways

3 2 _ 6 _ _     \implies 4 ways

3 4 _ 6 _ _     \implies 6 ways

3 5 _ 6 _ _     \implies 6 ways

3 5 _ _ 6 _     \implies 6 ways

3 _ 5 _ 6 _     \implies 6 ways

3 _ _ 5 6 _     \implies 4 ways

24+24+4+4+6+6+6+6+4=8424 + 24 + 4 + 4 + 6 + 6 + 6 + 6 + 4 = 84 ways

If the first number is 22, ....

2 6 _ _ _ _     \implies 24 ways

2 _ 6 _ _ _     \implies 18 ways

2 3 _ 6 _ _     \implies 4 ways

2 4 _ 6 _ _     \implies 6 ways

2 5 _ 6 _ _     \implies 6 ways

2 5 _ _ 6 _     \implies 6 ways

2 _ 5 _ 6 _     \implies 4 ways

2 4 _ 5 6 _     \implies 2 ways

2 3 4 5 6 1     \implies 1 way

24+18+4+6+6+6+4+2+1=7124 + 18 + 4 + 6 + 6 + 6 + 4 + 2 + 1 = 71 ways

Grand Total : 120+96+90+84+71=461120 + 96 + 90 + 84 + 71 = \boxed{461}

Solution 2

If 66 is the first number, then there are no restrictions. There are 5!5!, or 120120 ways to place the other 55 numbers.

If 66 is the second number, then the first number can be 2,3,4,2, 3, 4, or 55, and there are 4!4! ways to place the other 44 numbers. 44!=964 \cdot 4! = 96 ways.

If 66 is the third number, then we cannot have the following:

1 _ 6 _ _ _     \implies 24 ways

2 1 6 _ _ _     \implies 6 ways

120246=90120 - 24 - 6 = 90 ways

If 66 is the fourth number, then we cannot have the following:

1 _ _ 6 _ _     \implies 24 ways

2 1 _ 6 _ _     \implies 6 ways

2 3 1 6 _ _     \implies 2 ways

3 1 2 6 _ _     \implies 2 ways

3 2 1 6 _ _     \implies 2 ways

120246222=84120 - 24 - 6 - 2 - 2 - 2 = 84 ways

If 66 is the fifth number, then we cannot have the following:

_ _ _ _ 6 5     \implies 24 ways

1 5 _ _ 6 _     \implies 6 ways

1 _ 5 _ 6 _     \implies 6 ways

2 1 5 _ 6 _     \implies 2 ways

1 _ _ 5 6 _     \implies 6 ways

2 1 _ 5 6 _     \implies 2 ways

2 3 1 5 6 4, 3 1 2 5 6 4, 3 2 1 5 6 4     \implies 3 ways

12024662623=71120 - 24 - 6 - 6 - 2 - 6 - 2 - 3 = 71 ways

Grand Total : 120+96+90+84+71=461120 + 96 + 90 + 84 + 71 = \boxed{461}

Solution 3 (Recursion)

Note the condition in the problem is equivalent to the following condition: for each kk with 1k51 \le k \le 5, the first kk terms is not a permutation (1,2,,k)(1, 2, \ldots, k) (since it would mean there must be some integer xx in the first kk terms such that x∉{1,2,,k}    x>kx \not \in \{1, 2, \ldots, k\} \implies x > k). Then, let ana_n denote the number of permutations of (1,2,,n)(1, 2, \ldots, n) satisfying the condition in the problem. We use complementary counting to find ana_n. Notice that in order to not satisfy the condition in the problem, there are n1n-1 cases: the first 1kn11 \le k \le n-1 (we don't include k=nk = n since the condition in the problem only holds up to n1n-1) terms are a permutation of (1,2,,k)(1, 2, \ldots, k), and for all k+1in1k+1 \le i \le n-1, the condition in the problem still holds. Then, for each of these cases, there are k!k! ways to arrange the first kk terms, and then anka_{n-k} ways to arrange the k+1k + 1 to nn terms (assume by contradiction that terms from k+1k+1 to ii is a permutation of (k+1,k+2,,i)(k+1, k+2, \ldots, i). Then, since the first kk terms are already a permutation of (1,2,,k)(1, 2, \ldots, k), the first ii terms form a permutation of (1,2,,i)(1, 2, \ldots, i). This contradicts our assumption that for all k+1in1k+1 \le i \le n-1, the condition still holds. Thus, we can only include the anka_{n-k} permutations of these terms). Now, summing the cases up and subtracting from n!n!, we have: an=n!k=1n1ankk!a_n = n! - \sum_{k=1}^{n-1} a_{n-k} k!. From this recursion, we derive that a1=1a_1 = 1, a2=1a_2 = 1, a3=3a_3 = 3, a4=13a_4 = 13, a5=71a_5 = 71, and finally a6=461a_6 = \boxed{461}.

~CrazyVideoGamez

~ BladeRunnerAUGBladeRunnerAUG (Frank FYC)

Solution 4 (PIE)

Let AiA_i be the set of permutations such that there is no number greater than ii in the first ii places. Note that i=0kAbi=i=1k(bibi1)!\bigcap^{k}_{i=0}{A_{b_i}}=\prod^k_{i=1}{(b_i-b_{i-1})!} for all 1b0<b1<bk51\le b_0 < b_1\cdots < b_k \le 5 and that the set of restricted permutations is A1A2A3A4A5A_1 \cup A_2 \cup A_3 \cup A_4 \cup A_5.

We will compute the cardinality of this set with PIE.

A1+A2+A3+A4+A5=120+48+36+48+120=372A1A2+A1A3+A1A4+A1A5+A2A3+A2A4+A2A5+A3A4+A3A5+A4A5=24+12+12+24+12+8+12+12+12+24=152A1A2A3+A1A2A4+A1A2A5+A1A3A4+A1A3A5+A1A4A5+A2A3A4+A2A3A5+A2A4A5+A3A4A5=6+4+6+4+4+6+4+4+4+6=48A1A2A3A4+A1A2A3A5+A1A2A4A5+A1A3A4A5+A2A3A4A5=2+2+2+2+2=10A1A2A3A4A5=1\begin{aligned} &|A_1| + |A_2| + |A_3| + |A_4| + |A_5|\\ = &120 + 48 + 36 + 48 + 120 = 372\\ \\ &|A_1 \cap A_2| + |A_1 \cap A_3| + |A_1 \cap A_4| + |A_1 \cap A_5| + |A_2 \cap A_3|\\ + &|A_2 \cap A_4| + |A_2 \cap A_5| + |A_3 \cap A_4| + |A_3 \cap A_5| + |A_4 \cap A_5|\\=&24+12+12+24+12+8+12+12+12+24=152\\ \\ &|A_1 \cap A_2 \cap A_3| + |A_1 \cap A_2 \cap A_4| + |A_1 \cap A_2 \cap A_5| + |A_1 \cap A_3 \cap A_4| + |A_1 \cap A_3 \cap A_5|\\ +& |A_1 \cap A_4 \cap A_5| + |A_2 \cap A_3 \cap A_4| + |A_2 \cap A_3 \cap A_5| + |A_2 \cap A_4 \cap A_5| + |A_3 \cap A_4 \cap A_5|\\=&6 + 4 + 6 + 4 + 4 + 6 + 4 + 4 + 4 + 6 = 48\\ \\ &|A_1 \cap A_2 \cap A_3 \cap A_4| + |A_1 \cap A_2 \cap A_3 \cap A_5| + |A_1 \cap A_2 \cap A_4 \cap A_5| + |A_1 \cap A_3 \cap A_4 \cap A_5| + |A_2 \cap A_3 \cap A_4 \cap A_5|\\=&2 + 2 + 2 + 2 + 2 = 10\\ \\ &|A_1 \cap A_2 \cap A_3 \cap A_4 \cap A_5| = 1 \end{aligned} To finish, 720372+15248+101=461720 - 372 + 152 - 48 + 10 - 1 = \boxed{461}

Solution 5 (Recursion)

Define the function f(p,q)f(p,q) as the amount of permutations with maximum digit qq and string length pp that satisfy the condition within bounds. For example, f(4,5)f(4,5) would be the amount of ways to make a string with length 44 with the highest digit being 55. We wish to obtain f(6,6)=f(5,6)f(6,6)=f(5,6).

To generate recursion, consider how we would get to f(p,q)f(p,q) from f(p1,a)f(p-1,a) for all aa such that pa6p\le{a}\le6. We could either jump from the old maximum aa to the new qq by concatenating the old string and the new digit qq, or one could retain the maximum, in which case a=qa=q. To retain the maximum, one would have to pick a new available digit not exceeding qq.

In the first case, there is only one way to pick the new digit, namely picking qq. For the second case, there are qp+1q-p+1 digits left to choose, because there are qq digits between 1 and qq total and there are p1p-1 digits already chosen below or equal to qq. Thus, f(p,q)=[n=pq1f(p1,n)]+(qp+1)f(p1,q)f(p,q)=[\sum^{q-1}_{n=p}f(p-1,n)] + (q-p+1)f(p-1,q). Now that we have the recursive function, we can start evaluating the values of f(p,q)f(p,q) until we get to f(6,6)=f(5,6)f(6,6)=f(5,6).

f(2,3)=3,f(2,4)=5,f(2,5)=7,f(2,6)=9f(2,3)=3, f(2,4)=5, f(2,5)=7, f(2,6)=9 f(3,4)=13,f(3,5)=29,f(3,6)=51f(3,4)=13, f(3,5)=29, f(3,6)=51 f(4,5)=71,f(4,6)=195f(4,5)=71, f(4,6)=195 f(5,6)=461f(5,6)=461 Our requested answer is thus 461\boxed{461} ~sigma

Solution 6 (Complementary)

We can also solve this problem by counting the number of permutations that do NOT satisfy the given conditions; namely, these permutations must satisfy the condition that none of the first kk terms is greater than kk for 11\leq kk \leq 55. We can further simplify this method by approaching it through casework on the first kk terms.

Case 1: None of the first one terms is greater than 1

The first term must obviously be one. Since there are five spaces left for numbers, there are a total of 5!=1205!=120 permutations for this case.

Case 2: None of the first two terms is greater than 2

The first two terms must be 1 and 2 in some order. However, we already counted all cases starting with 1 in the previous case, so all of the permutations in this case must begin with 2121\cdots. Since there are four spaces left, there are a total of 4!=244!=24 permutations for this case.

Case 3: None of the first three terms is greater than 3

The first three terms must be 1, 2, and 3 in some order. However, the cases beginning with 1__ and 21_ have already been accounted for. There are now 3!3=33!-3 = 3 ways to order the first three numbers of the permutation, and 3!3! ways to order the last three numbers, for a total of 3×6=183\times6 = 18 permutations.

Case 4: None of the first four terms is greater than 4

You can see where the pattern is going - the first four terms must be 1, 2, 3, and 4 in some order. All cases starting with 1 (there are 3!=63!=6), the cases starting with 21 (there are 2!=22!=2), and the 3 cases from case 3 (there are 3×1!=33\times 1! = 3) have been accounted for, so there are a total of (4!623)2!=26(4!-6-2-3)2!=26 permutations for this case.

Case 5: None of the first five terms is greater than 5

This is perhaps the hardest case to work with, simply because there are so many subcases, so keeping track is crucial here. Obviously, the first five terms must be 1, 2, 3, 4, and 5, meaning there are 120 ways to order them. Now, we count the permutations we have already counted in previous cases. 4!4! start with 1, 3!3! start with 2, 3×2!=63\times2!=6 start with 3, and 13×1!=1313\times1!=13 start with 4. Subtracting, we get a total of 120246613=71120-24-6-6-13=71 permutations.

Now, we subtract the total number of permutations from our cases from the total number of permutations, which is 6!6! : 72012024182671=461720 - 120 - 24 - 18 - 26 - 71 = \boxed{461}.

~TGSN/curiousmind_888

Solution 7(Similar to Solutions 1 and 2 but with more depth)

We will perform cases based on the position of 66. Notice that if 66 is the first number, the positions of the rest of the numbers absolutely don't matter, so we have 5!5! cases here.

Now, if 66 is the second number, all we need is the first number to be greater than 11. Namely, the possibilities for the first number are just 22 to 55, for a total of 44 numbers. The rest of the number positions don't matter, so we have 4!4! ways to arrange the rest of the numbers. Hence, for this case, we have 44!4 \cdot 4! cases.

Now, if 66 is the third number, we can break it up into two cases. First, the first number is simply 22. Then, as "at least one of the first 22 terms is greater than 22" we just need the second term to be greater than 22, namely the possibilities are 33 to 55, a total of 33 numbers. The arrangement of the remaining numbers doesn't matter, and hence that is just 3!3!. The first part of this case yields 33!3 \cdot 3!. Now, the second part is that the first term is any number from 33 to 55. Then, the rest of the numbers don't matter. Hence, we have 4!4! ways to arrange the rest of the numbers. So we have a total of 3!3+4!33! \cdot 3 + 4! \cdot 3 ways for this case.

Now, if 66 is the fourth number, things get a little bit more difficult. We will break it up into 44 cases. First, we have 22 as the first term. Now, if the second term is 33, all we need for this to succeed is for the third term to be at least 44, so only two possibilities 44 and 55. The rest of the number arrangements don't matter, so we have 2!2! ways for that. So the first part of this case is 22!2 \cdot 2!. Now, if the second term is at least 44, then we are done. Hence, we have our two possibilities 44 and 55 for the second term, and the remaining number arrangements don't matter. Hence, we have 23!2 \cdot 3!. So if the first term if 22, we have 22!+23!2 \cdot 2! + 2 \cdot 3! cases. Now, if the first term is 33, all we need to satisfy is that "at least one of the first 33 terms is greater than 33." Hence, we can break this up also into cases. First, we'll consider two blocks: one block of numbers before the 66 and one block of numbers after the 66. If 44 is in the first block before 66 and 55 is in the second block, we have 2!2! ways to arrange the rest of the numbers. There are 22 ways to place the 44 in the first block and 22 ways to place the 55 in the second block for a total of 22=42 \cdot 2 = 4. We can also switch the positions of 44 and 55, namely, placing 55 in the first block and 44 in the second block, as this won't affect the requirements. So, we have a total of 2!242! \cdot 2 \cdot 4 ways for the first part. Now, the second part is when both 44 and 55 are in the first block. There are 22 ways for both 44 and 55 to be in the first block and then 2!2! ways to arrange the rest of the numbers. So we have 2!22! \cdot 2 for this case. Hence, if 33 is the first term, we have 2!24+2!22! \cdot 2 \cdot 4 + 2! \cdot 2 cases. Now, if 44 is the first term, everything is satisfied, and we are left with the task of finding how many ways there are to arrange the rest of the numbers. This is simply 4!4!. The same occurs if 55 is the first term with 4!4! ways.

After all the casework, if 66 is the fourth number, there is a total of 22!+23!+2!24+2!2+4!+4!2 \cdot 2! + 2 \cdot 3! + 2! \cdot 2 \cdot 4 + 2! \cdot 2 + 4! + 4!.

Finally, we move on to the last case of when 66 is the fifth number. We can do a similar casework analysis as we did to find the previous case. We will break up the cases based on which number is placed in the first term.

First, consider if 22 is the first term. Now, if the second term is 33, then we need 44 and 55 to be both placed in the first block. Otherwise, if 44 and 55 are placed in different blocks or they're both in the second block, the conditions won't be satisfied. If the third term is 44, then 55 has to be in the fourth term, and we have only 11 way for this to happen. Now, if the third term is 55, everything is satisfied, and we have 2!2! ways to arrange them. So if 33 is the second term, we have 1+2!1 + 2! ways to arrange them. Now, if the second term is 44, 55 has to be placed in the first block, which has only 22 remaining positions. After placing the 55, we have 22 remaining spots overall, so we have 2!22! \cdot 2 ways for this to happen. Finally, if 55 is the second term, everything is satisfied, so we have 3!3! ways to arrange the rest of the numbers. If 22 is the first term, we have 3!+2!2+1+2!3! + 2! \cdot 2 + 1 + 2! ways.

Now, let's consider 33 being the first term. We will do this case a little differently. We will consider the position of the number 55. Let's say 55 is the second term. Then everything is satisfied, and we have 3!3! ways for this to happen. If 55 is the third term, everything is once again satisfied, and we have 3!3! ways. If 55 is the fourth term, we need the number 44 to be either in the second or third positions, with, after the 44 is placed, leaving 22 remaining positions with 2!2! ways to arrange them. Hence, we have 22!2 \cdot 2!. If 33 is the first term, we have 3!+3!+22!3! + 3! + 2 \cdot 2! ways.

Now, if 44 is the first term, all we need is to satisfy "at least one of the first 44 terms is greater than 44." Therefore, 55 must be placed in the first block where there are 33 positions. The order of the rest of the numbers doesn't matter. We have 3!33! \cdot 3 ways for this to happen.

Finally, if 55 is the first term, everything is satisfied, and we have 4!4! ways for this to happen.

Finally, the grand total is

5!+4!4+3!3+4!3+22!+23!+2!24+2!2+4!+4!+3!+22!+1+2!+3!+3!+22!+33!+4!=4615! + 4! \cdot 4 + 3! \cdot 3 + 4! \cdot 3 + 2 \cdot 2! + 2 \cdot 3! + 2! \cdot 2 \cdot 4 + 2! \cdot 2 + 4! + 4! + 3! + 2 \cdot 2! + 1 + 2! + 3! + 3! + 2 \cdot 2! + 3 \cdot 3! + 4! = \boxed{461}.

~ilikemath247365