AMC 10 Step by Step

2010 AMC 10B Problem 22

P21-25~3 minPrint

Seven distinct pieces of candy are to be distributed among three bags. The red bag and the blue bag must each receive at least one piece of candy; the white bag may remain empty. How many arrangements are possible?

Log in to save your progress.
Show solution without answering

Key insight

Each candy picks one of 3 bags: 3^7 ways. Subtract the ways with red empty and with blue empty, then add back the one way with both empty.

Solution

The candies are all different, so an arrangement is just a choice of bag for each candy. It is easier to count all arrangements and take away the bad ones.

Warm-up with 22 candies. Each candy has 33 choices, so 3⋅3=93 \cdot 3 = 9 arrangements. Red empty: each candy goes to blue or white, 2⋅2=42 \cdot 2 = 4 ways. Blue empty: also 44. But "both candies in white" is in both groups of 44. So the bad arrangements number 4+4−1=74 + 4 - 1 = 7, and the good ones 9−7=29 - 7 = 2: candy one in red and candy two in blue, or the other way round. That is correct.

Now 77 candies.

1. All arrangements: each of the 77 candies has 33 choices, 37=21873^7 = 2187.
2. Red bag empty: each candy goes to blue or white, 27=1282^7 = 128 ways.
3. Blue bag empty: likewise 128128 ways.
4. Both red and blue empty: every candy in white, 11 way. This arrangement was taken away in step 2 and again in step 3, so add it back once.
5. Good arrangements:
2187−128−128+1=1932.2187 - 128 - 128 + 1 = 1932.

The answer is (C) 1932\boxed{\textbf{(C)}\ 1932}.

Why this works

For "each bag gets at least one" rules, count everything and subtract the arrangements that break a rule. When two rules can be broken at the same time, those arrangements get subtracted twice, so add them back once. The answer choices differ by 11 exactly to catch a missing add-back.

Alternative approach

Count the good arrangements directly. Decide how many candies, kk, go into red and blue together (kk from 22 to 77); the rest go into white. Choose those kk candies in (7k)\binom{7}{k} ways. Each of them goes to red or blue, 2k2^k ways, minus the 22 ways that put them all in one bag.

kk(7k)\binom{7}{k}2k−22^k - 2Product
222121224242
33353566210210
4435351414490490
5521213030630630
66776262434434
7711126126126126

The total is 42+210+490+630+434+126=193242 + 210 + 490 + 630 + 434 + 126 = 1932.

Concise solution

A shorter write-up, the way contest solutions are usually written. It may take a different route from the solution above.

The candies are distinct, so an arrangement is a choice of bag for each candy: 37=21873^7 = 2187 assignments with no restriction.

Remove the bad ones by inclusion-exclusion:
- Red empty: each candy goes to blue or white, 27=1282^7 = 128 ways.
- Blue empty: likewise 128128 ways.
- Both empty: everything in white, 11 way, which was subtracted twice.

Valid arrangements:
2187−128−128+1=1932.2187 - 128 - 128 + 1 = 1932.

The answer is (C) 1932\boxed{\textbf{(C)}\ 1932}.

Review in the AoPS books

Similar problems

Problem © Mathematical Association of America (MAA), American Mathematics Competitions. Reproduced for non-commercial educational use. Solution and commentary are original to this site.