2010 AMC 10B Problem 22
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?
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 candies. Each candy has choices, so arrangements. Red empty: each candy goes to blue or white, ways. Blue empty: also . But "both candies in white" is in both groups of . So the bad arrangements number , and the good ones : candy one in red and candy two in blue, or the other way round. That is correct.
Now candies.
1. All arrangements: each of the candies has choices, .
2. Red bag empty: each candy goes to blue or white, ways.
3. Blue bag empty: likewise ways.
4. Both red and blue empty: every candy in white, way. This arrangement was taken away in step 2 and again in step 3, so add it back once.
5. Good arrangements:
The answer is .
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 exactly to catch a missing add-back.
Alternative approach
Count the good arrangements directly. Decide how many candies, , go into red and blue together ( from to ); the rest go into white. Choose those candies in ways. Each of them goes to red or blue, ways, minus the ways that put them all in one bag.
| Product | |||
|---|---|---|---|
The total is .
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: assignments with no restriction.
Remove the bad ones by inclusion-exclusion:
- Red empty: each candy goes to blue or white, ways.
- Blue empty: likewise ways.
- Both empty: everything in white, way, which was subtracted twice.
Valid arrangements:
The answer is .
Review in the AoPS books
- Introduction to Counting & Probability, Chapter 1: Counting Is Arithmetic (§1.3)
- Introduction to Counting & Probability, Chapter 2: Basic Counting Techniques (§2.3)
- Intermediate Counting & Probability, Chapter 3: A Piece of PIE (§3.2, §3.3)
- Introduction to Counting & Probability, Chapter 8: Basic Probability Techniques (§8.3)
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.