Skip to main content

2020 AIME II Problem 9

Problem 9 of 15IntermediateCombinatorics

While watching a show, Ayako, Billy, Carlos, Dahlia, Ehuang, and Frank sat in that order in a row of six chairs. During the break, they went to the kitchen for a snack. When they came back, they sat on those six chairs in such a way that if two of them sat next to each other before the break, then they did not sit next to each other after the break. Find the number of possible seating orders they could have chosen after the break.

Your answer

Integer from 0 to 999
Show solution

Solution

Number the friends 11 through 66 in original seating order; we count orderings of 1,…,61, \ldots, 6 in which no two consecutive integers are adjacent. Apply inclusion-exclusion over which of the five pairs {i,i+1}\{i, i+1\} are forced to sit together. If a chosen set of kk pairs forms rr maximal runs of consecutive integers, gluing each run into a block (orderable ascending or descending) gives 2r(6−k)!2^r (6 - k)! seatings containing all chosen adjacencies. Tallying by k:k: for k=0,k = 0, 720.720. For k=1,k = 1, five sets, each 2⋅120,2 \cdot 120, total 1200.1200. For k=2,k = 2, four sets form one run (2⋅24)(2 \cdot 24) and six form two runs (4⋅24),(4 \cdot 24), total 768.768. For k=3,k = 3, three sets form one run (2⋅6),(2 \cdot 6), six form two runs (4⋅6),(4 \cdot 6), one forms three runs (8⋅6),(8 \cdot 6), total 228.228. For k=4,k = 4, two sets form one run (2⋅2)(2 \cdot 2) and three form two runs (4⋅2),(4 \cdot 2), total 32.32. For k=5,k = 5, one set, total 2.2. The count is 720−1200+768720 - 1200 + 768 −228+32−2=90.- 228 + 32 - 2 = 90.
AoPS wiki

Tagged: arrangements with restrictions · inclusion-exclusion · permutations

More practice