Skip to main content

2018 AIME II Problem 11

Problem 11 of 15HarderCombinatorics

Find the number of permutations of 1,1, 2,2, 3,3, 4,4, 5,5, 66 such that for each kk with 1≤k≤5,1 \le k \le 5, at least one of the first kk terms of the permutation is greater than k.k.

Your answer

Integer from 0 to 999
Show solution

Solution

The condition fails exactly when the first kk terms are a permutation of {1,…,k}\{1, \ldots, k\} for some k≤5.k \le 5. For a permutation of 1,…,n,1, \ldots, n, let kk be the smallest length for which the prefix is {1,…,k}\{1, \ldots, k\} (the full length nn always works), and let cnc_n be the number of permutations whose smallest such kk is n.n. We want c6.c_6. Every permutation of 1,…,n1, \ldots, n decomposes uniquely as a minimal prefix of length kk (ckc_k choices) followed by any arrangement of the remaining n−kn - k values, so ∑k=1nck (n−k)!=n!.\sum_{k=1}^{n} c_k \,(n-k)! = n!. Starting from c1=1,c_1 = 1, this gives c2=1,c_2 = 1, c3=3,c_3 = 3, c4=13,c_4 = 13, c5=71,c_5 = 71, and c6=720−(120⋅1+24⋅1+6⋅3+2⋅13+1⋅71)=720−259=461. \begin{aligned} c_6 &= 720 \\ &\quad {}- \tiny(120 \cdot 1 + 24 \cdot 1 + 6 \cdot 3 + 2 \cdot 13 + 1 \cdot 71) \\ &= 720 - 259 = 461. \end{aligned}
AoPS wiki

Tagged: permutations · complementary counting · recursive counting

More practice