Skip to main content

2025 AIME I Problem 7

Problem 7 of 15IntermediateCombinatoricsProbability & StatisticsProblem-Solving Techniques

The twelve letters A,A, B,B, C,C, D,D, E,E, F,F, G,G, H,H, I,I, J,J, K,K, and LL are randomly grouped into six pairs of letters. The two letters in each pair are placed next to each other in alphabetical order to form six two-letter words, and then those six words are listed alphabetically. For example, a possible result is AB,AB, CJ,CJ, DG,DG, EK,EK, FL,FL, HI.HI. The probability that the last word listed contains GG is mn,\frac{m}{n}, where mm and nn are relatively prime positive integers. Find m+n.m + n.

Your answer

Integer from 0 to 999
Show solution

Solution

There are 11⋅9⋅7⋅5⋅3⋅1=1039511 \cdot 9 \cdot 7 \cdot 5 \cdot 3 \cdot 1 = 10395 ways to pair the letters. Each word begins with the smaller letter of its pair, so the last word alphabetically is the pair whose smaller letter is largest. Case 1:1: GG is the smaller letter of the last word. Then GG pairs with one of H,H, I,I, J,J, K,K, or LL (55 ways), and no two of the remaining four late letters may pair together (such a pair would start with a letter after GG). Those four letters must take distinct partners from {A,…,F},\{A, \ldots, F\}, in 6⋅5⋅4⋅3=3606 \cdot 5 \cdot 4 \cdot 3 = 360 ways, and the two leftover early letters pair with each other. That gives 5⋅360=18005 \cdot 360 = 1800 pairings. Case 2:2: GG is the larger letter, paired with some xx before G.G. Then none of H,…,LH, \ldots, L may pair together, so all five take partners among the other five early letters; the six smaller letters are then exactly AA through F,F, and the largest is F.F. For the last word to contain G,G, its smaller letter must therefore be F,F, so the last word is FG,FG, and H,…,LH, \ldots, L match with A,…,EA, \ldots, E in 5!=1205! = 120 ways. The probability is 1800+12010395=192010395=128693,\frac{1800 + 120}{10395} = \frac{1920}{10395} = \frac{128}{693}, so m+n=128+693=821.m + n = 128 + 693 = 821.
AoPS wiki

Tagged: basic probability · arrangements with restrictions · casework

More practice