About this topic
Counting and probability look intimidating because there are so many cases to think about. But almost every AMC 8 counting problem solves with a small toolkit:
- Careful listing for very small problems.
- Multiplication principle when steps are independent.
- Complementary counting — count what you don't want and subtract.
- Casework — split into types, count each, add.
Probability comes from counting. Once you know how many outcomes are favorable and how many outcomes are possible total, probability is just division: favorable / total.
This lesson moves through these tools step by step. Each chapter adds one new move, so by chapter 9 you'll have all the pieces.
Careful listing — when the answer is small enough to write out
The most underrated tool in counting is just writing them all out. For small problems (fewer than ~20 items), listing is faster, less error-prone, and more reliable than any formula.
How to list cleanly:
- Pick an order — alphabetical, smallest-first, lexicographic, whatever's natural.
- Write items in that order, never skipping.
- Cross off duplicates as you find them.
The pitfall isn't that listing takes too long — it's that students list randomly and either miss items or count duplicates. Always pick a definite order before you start.
Tiny example. How many ways can you arrange three letters A, B, C in a line?
List in alphabetical-first order:
- ABC
- ACB
- BAC
- BCA
- CAB
- CBA
That's 6 arrangements. Notice the order: start with A as first letter (then BC or CB), then B as first (AC or CA), then C as first (AB or BA). Always systematic.
(This pattern is also 3! = 3 × 2 × 1 = 6, which we'll see in chapter 8. But for small numbers, listing is clearer.)
When in doubt, list. If you're not sure whether a formula applies, write the cases out — at least the first 4 or 5. Often you'll see the pattern, or just finish the listing if the count is small.
If the listing is going to take more than 25 items, switch to a formula (multiplication, complementary counting, etc.).
How many different combinations of $5 bills and $2 bills can be used to make a total of $17? Order does not matter.
How many different combinations of $5 and $2 bills make $17? Order doesn't matter.
List by the number of $5 bills used — that's the cleanest ordering because the count of fives can only be 0, 1, 2, or 3 (four fives would already overshoot $17):
- 3 fives = $15. Need $2 more ⇒ one $2 bill. ✓
- 2 fives = $10. Need $7 more from $2 bills — impossible ($7 is odd).
- 1 five = $5. Need $12 more ⇒ six $2 bills. ✓
- 0 fives = $0. Need $17 from $2 bills — impossible ($17 is odd).
Only the rows with an odd number of fives work (since $2 bills add an even amount, but $17 is odd). That gives 2 combinations.
Listing by 'number of $5 bills used' hits every case exactly once. The parity observation (the number of $5s must be odd) skips the impossible rows in one step.
Pick a definite ordering before listing. Walk through systematically. Stop when you've covered every case in your ordering.
2015 · #4 The Centerville Middle School chess team consists of two boys and three girls. A photographer wants to take a picture of the team to...
The Centerville Middle School chess team consists of two boys and three girls. A photographer wants to take a picture of the team to appear in the local newspaper. She decides to have them sit in a row with a boy at each end and the three girls in the middle. How many such arrangements are possible?
Show answer
Show hint
Show solution
- Boys at the two ends: 2! = 2 arrangements.
- Girls in the middle three spots: 3! = 6 arrangements.
- Total: 2 × 6 = 12.
2004 · #8 Find the number of two-digit positive integers whose digits total 7.
Find the number of two-digit positive integers whose digits total 7.
Show answer
Show hint
Show solution
- a ∈ {1, …, 7}, units = 7 − a.
- Numbers: 16, 25, 34, 43, 52, 61, 70 ⇒ 7.
2009 · #12 The two spinners shown are spun once and each lands on one of the numbered sectors. What is the probability that the sum of the numbers...

Show answer
Show hint
Show solution
- Sums: 3, 5, 7, 5, 7, 9, 7, 9, 11. Non-prime: the two 9s.
- Prime probability: 7/9 = 7/9.
1991 · #11 There are several sets of three different numbers whose sum is 15 which can be chosen from {1, 2, 3, 4, 5, 6, 7, 8, 9}. How many of...
There are several sets of three different numbers whose sum is 15 which can be chosen from {1, 2, 3, 4, 5, 6, 7, 8, 9}. How many of these sets contain a 5?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- The other two numbers must sum to 15 − 5 = 10, both different and not 5.
- Those pairs are (1,9), (2,8), (3,7), (4,6) — 4 sets.
2011 · #8 Bag A has three chips labeled 1, 3, and 5. Bag B has three chips labeled 2, 4, and 6. If one chip is drawn from each bag, how many...
Bag A has three chips labeled 1, 3, and 5. Bag B has three chips labeled 2, 4, and 6. If one chip is drawn from each bag, how many different values are possible for the sum of the two numbers on the chips?
Show answer
Show hint
Show solution
- Possible sums: 1+2, 1+4, 1+6, 3+2, 3+4, 3+6, 5+2, 5+4, 5+6 = 3, 5, 7, 5, 7, 9, 7, 9, 11.
- Distinct: {3, 5, 7, 9, 11} ⇒ 5 values.
2003 · #10 Art, Roger, Paul, and Trisha bake cookies that are all the same thickness, in the shapes shown below (dimensions in inches). Each friend...
Art, Roger, Paul, and Trisha bake cookies that are all the same thickness, in the shapes shown below (dimensions in inches). Each friend uses the same amount of dough, and Art's batch makes exactly 12 cookies.
How many cookies will be in one batch of Trisha's cookies?
Show answer
Show hint
Show solution
- A batch is the dough for 12 of Art's 12 in² cookies, i.e. 144 in².
- Trisha's cookies are ½(3)(4) = 6 in², exactly half of Art's, so she makes twice as many: 24.
Multiplication principle — independent choices multiply
If you make a series of choices, and each choice's count is independent of the others, the total number of outcomes is the product of the counts.
MULTIPLICATION PRINCIPLE
If step 1 has m₁ options, step 2 has m₂ options (regardless of step 1's outcome), step 3 has m₃ options, etc., then the total number of ways to make all the choices is:
m₁ × m₂ × m₃ × …
Why does it work? Picture a tree. Each level is one choice. The first choice has m₁ branches; each of those splits into m₂ branches; each of those into m₃; and so on. The total number of leaves at the bottom is the product.
3 shirts × 4 pants — three branches, each splitting into four.
Add 2 hats and each leaf splits again: 3 × 4 × 2 = 24 outfits.
When the count changes after each step. If picking the second item depends on the first — say, you can't pick the same item again — then the count of choices shrinks at each step. For a 3-letter sequence from {A, B, C, D, E} with no letter repeated:
- 1st letter: 5 choices.
- 2nd letter: 4 choices (anything except the first).
- 3rd letter: 3 choices (anything except the first two).
Total: 5 × 4 × 3 = 60.
This shrinking-pool pattern is called a permutation (chapter 8 has more).
For each step, ask: how many options do I have now? Multiply. The hardest part isn't the multiplication; it's identifying the right number of choices at each step, which depends on whether earlier choices restrict later ones.
A haunted house has six windows. In how many ways can Georgie the Ghost enter the house by one window and leave by a different window?
Georgie enters through one window and leaves through a different window. Two steps:
- Choose an entry window: 6 ways.
- Choose an exit window, different from the entry: 5 ways (anything except the one used).
Total: 6 × 5 = 30 ways.
The "different" constraint shrinks the second count from 6 to 5. Always read the problem for these little restrictions — they change the count.
For independent choices: multiply. For "no repeats": shrink the count by 1 each step. For "distinct in some way": adjust the count at each step.
2004 · #4 Ms. Hamilton's eighth-grade class wants to participate in the annual three-person-team basketball tournament. Lance, Sally, Joy, and...
Ms. Hamilton's eighth-grade class wants to participate in the annual three-person-team basketball tournament. Lance, Sally, Joy, and Fred are chosen for the team. In how many ways can the three starters be chosen?
Show answer
Show hint
Show solution
- C(4, 3) = C(4, 1) = 4.
2014 · #12 A magazine printed photos of three celebrities along with three photos of the celebrities as babies. The baby pictures did not identify...
A magazine printed photos of three celebrities along with three photos of the celebrities as babies. The baby pictures did not identify the celebrities. Readers were asked to match each celebrity with the correct baby pictures. What is the probability that a reader guessing at random will match all three correctly?
Show answer
Show hint
Show solution
- 3 baby photos can be assigned in 3! = 6 ways. Exactly 1 is the correct matching.
- Probability = 1/6.
2004 · #2 How many different four-digit numbers can be formed by rearranging the four digits in 2004?
How many different four-digit numbers can be formed by rearranging the four digits in 2004?
Show answer
Show hint
Show solution
- Total arrangements: 4!/2! = 12 (the 0 repeats).
- Leading zero arrangements: arrange {2, 0, 4} in last 3 spots = 3! = 6.
- Valid: 12 − 6 = 6.
2011 · #12 Angie, Bridget, Carlos, and Diego are seated at random around a square table, one person to a side. What is the probability that Angie...
Angie, Bridget, Carlos, and Diego are seated at random around a square table, one person to a side. What is the probability that Angie and Carlos are seated opposite each other?
Show answer
Show hint
Show solution
- Fix Angie in any seat. Carlos has 3 equally likely seats among the remaining 3.
- Exactly 1 is opposite Angie ⇒ probability 1/3.
1997 · #9 Three students, with different names, line up single file. What is the probability that they are in alphabetical order from front to back?
Three students, with different names, line up single file. What is the probability that they are in alphabetical order from front to back?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Three people can line up in 3 × 2 × 1 = 6 ways.
- Exactly one is alphabetical, so the probability is 1/6.
Complementary counting — count what you don't want
Sometimes the question asks for the count of something messy ("at least one of X happens"), but counting the opposite is much cleaner. Then you subtract.
COMPLEMENTARY COUNTING
|Wanted| = |All| − |Not wanted|
This works because every item is either wanted or not — those two groups together are everything. So if you know how many total there are and how many are NOT wanted, the wanted count is the difference.
The classic signal: phrases like at least one, at least k, contains at least one X, has at least one event A. Trying to count these directly forces you into messy casework ("exactly 1, exactly 2, exactly 3, …"). Instead, count the complement (zero events) and subtract from the total.
Concrete example. How many 4-digit numbers contain at least one digit 2?
- Total 4-digit numbers: 9000 (from 1000 to 9999).
- How many contain no 2? The thousands digit has 8 choices (1, 3, 4, 5, 6, 7, 8, 9 — not 0, not 2). The other three digits each have 9 choices (any digit 0–9 except 2). Total without 2: 8 × 9 × 9 × 9 = 5832.
- So how many contain at least one 2? 9000 − 5832 = 3168.
Counting these directly would require casework on "exactly one 2 / exactly two 2s / exactly three 2s / four 2s" — many cases. Complementary counting collapsed it to one subtraction.
The signal phrase is "at least one". When you see it, immediately think: count the "none" case instead, then subtract.
In a town of 351 adults, every adult owns a car, motorcycle, or both. If 331 adults own cars and 45 adults own motorcycles, how many of the car owners do not own a motorcycle?
351 adults. Every adult owns a car or a motorcycle (or both). 331 own cars; 45 own motorcycles. How many car owners don't own a motorcycle?
Pure complementary counting. Since every adult owns at least one vehicle, the people who don't own a motorcycle must all own a car. So:
car-only = (total) − (motorcycle owners) = 351 − 45 = 306.
You never had to compute how many own both. The complement of 'owns a motorcycle' is exactly 'owns only a car' — one subtraction.
The 'everyone owns at least one' line is the key. It collapses 'car-only' to 'not-a-motorcycle-owner', and the total minus that subgroup gives the answer in one step.
For "at least one" or "at least k of X", count the complement ("none" or "fewer than k") and subtract.
2002 · #12 A board game spinner is divided into three regions labeled A, B, and C. The probability the arrow stops on region A is 13 and on region...
A board game spinner is divided into three regions labeled A, B, and C. The probability the arrow stops on region A is 13 and on region B is 12. What is the probability the arrow stops on region C?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Since the arrow must land somewhere, P(C) = 1 − 13 − 12.
- Over a denominator of 6: 66 − 26 − 36 = 16.
2004 · #21 Spinners A and B are spun. On each spinner, the arrow is equally likely to land on each number. What is the probability that the product...

Show answer
Show hint
Show solution
- P(both odd) = (2/4)(2/3) = 1/3.
- P(even) = 1 − 1/3 = 2/3.
2009 · #10 On a checkerboard composed of 64 unit squares, what is the probability that a randomly chosen unit square does not touch the outer edge...
On a checkerboard composed of 64 unit squares, what is the probability that a randomly chosen unit square does not touch the outer edge of the board?
Show answer
Show hint
Show solution
- Interior: 6 × 6 = 36.
- Probability: 36 / 64 = 9/16.
2014 · #11 Jack wants to bike from his house to Jill's house, which is located three blocks east and two blocks north of Jack's house. After biking...
Jack wants to bike from his house to Jill's house, which is located three blocks east and two blocks north of Jack's house. After biking each block, Jack can continue either east or north, but he needs to avoid a dangerous intersection one block east and one block north of his house. In how many ways can he reach Jill's house by biking a total of five blocks?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Total E/N paths: C(5, 2) = 10.
- Paths through (1,1): C(2, 1) × C(3, 1) = 2 × 3 = 6.
- Allowed paths: 10 − 6 = 4.
- To avoid (1,1) Jack's first two moves must be either EE or NN.
- After EE he is at (2, 0) and needs 1 E + 2 N in some order: C(3,1) = 3 paths. After NN he is at (0, 2) and needs 3 E + 0 N: 1 path.
- Total: 3 + 1 = 4.
2009 · #13 A three-digit integer contains one of each of the digits 1, 3, and 5. What is the probability that the integer is divisible by 5?
A three-digit integer contains one of each of the digits 1, 3, and 5. What is the probability that the integer is divisible by 5?
Show answer
Show hint
Show solution
- By symmetry of the 6 arrangements, units digit is 5 with probability 1/3.
Listing, multiplication, complement
Three problems on the most basic counting moves.
2004 · #8 Find the number of two-digit positive integers whose digits total 7.
Find the number of two-digit positive integers whose digits total 7.
Show answer
Show hint
Show solution
- a ∈ {1, …, 7}, units = 7 − a.
- Numbers: 16, 25, 34, 43, 52, 61, 70 ⇒ 7.
2007 · #4 A haunted house has six windows. In how many ways can Georgie the Ghost enter the house by one window and leave by a different window?
A haunted house has six windows. In how many ways can Georgie the Ghost enter the house by one window and leave by a different window?
Show answer
Show hint
Show solution
- 6 · 5 = 30.
2011 · #6 In a town of 351 adults, every adult owns a car, motorcycle, or both. If 331 adults own cars and 45 adults own motorcycles, how many of...
In a town of 351 adults, every adult owns a car, motorcycle, or both. If 331 adults own cars and 45 adults own motorcycles, how many of the car owners do not own a motorcycle?
Show answer
Show hint
Show solution
- Each non-motorcycle-owner must own a car (since every adult has at least one).
- Car-only = 351 − 45 = 306.
Casework — split, count, add
When choices split into types and the counts are different in each type, count each type separately and add. This is called casework.
How to set up clean casework:
- Pick the splitting criterion. (Often: "based on what the smallest item is" or "based on which of a few cases applies.")
- List the cases. They must be mutually exclusive (no overlap) and exhaustive (cover everything).
- Count each case independently.
- Add the counts.
The critical rules:
- If cases overlap, you'll double-count. Bad.
- If cases miss some items, you'll undercount. Also bad.
Concrete example. How many ways can two dice show a sum of 7?
Casework on the first die's value:
- First die = 1: second must be 6. (1 way)
- First die = 2: second must be 5. (1 way)
- First die = 3: second must be 4. (1 way)
- First die = 4: second must be 3. (1 way)
- First die = 5: second must be 2. (1 way)
- First die = 6: second must be 1. (1 way)
Total: 6 ways.
Casework on "first die value" gives mutually exclusive cases (first die can only be one number) and exhaustive (covers all 6 possibilities). Perfect.
Pick the casework variable that gives the fewest cases. If splitting on "value of the first card" gives 10 cases but splitting on "parity of the sum" gives 2 cases, prefer parity.
Also: cases don't have to be of equal size. The case "first letter is A" might have 100 sub-counts while "first letter is Z" might have 5 — that's fine. The total is just the sum.
How many 3-digit positive integers have digits whose product equals 24?
How many 3-digit positive integers have digits whose product equals 24?
Casework on the unordered multiset of digits (ignore order first). We need three digits from 1–9 whose product is 24. List the triples:
- {1, 3, 8}: 1·3·8 = 24 ✓ — three distinct digits ⇒
3! = 6arrangements. - {1, 4, 6}: 1·4·6 = 24 ✓ — three distinct ⇒ 6.
- {2, 3, 4}: 2·3·4 = 24 ✓ — three distinct ⇒ 6.
- {2, 2, 6}: 2·2·6 = 24 ✓ — one digit repeats ⇒
3! / 2! = 3.
Any case using 0 would make the product 0, so skip. The digit 5, 7, or 9 doesn't divide 24, so any triple with them fails.
Sum: 6 + 6 + 6 + 3 = 21.
The casework variable is the unordered multiset. Each case is either 3! (all distinct) or 3!/2! (one repeat). Mutually exclusive (different multisets) and exhaustive (we ruled out every other multiset). Add the counts.
Casework: pick a splitting variable with few options. List, count each case, add. Confirm cases are mutually exclusive and exhaustive.
2018 · #16 Professor Chang has nine different language books lined up on a bookshelf: two Arabic, three German, and four Spanish. How many ways are...
Professor Chang has nine different language books lined up on a bookshelf: two Arabic, three German, and four Spanish. How many ways are there to arrange the nine books on the shelf keeping the Arabic books together and keeping the Spanish books together?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Treat the 2 Arabic books as one block and the 4 Spanish books as one block. Together with the 3 German books, we have 5 objects to order: 5! = 120 ways.
- Inside the Arabic block: 2! = 2 orderings. Inside the Spanish block: 4! = 24 orderings.
- Total: 120 × 2 × 24 = 5760.
2007 · #24 A bag contains four pieces of paper, each labeled with one of the digits 1, 2, 3, or 4, with no repeats. Three of these pieces are...
A bag contains four pieces of paper, each labeled with one of the digits 1, 2, 3, or 4, with no repeats. Three of these pieces are drawn, one at a time without replacement, to construct a three-digit number. What is the probability that the three-digit number is a multiple of 3?
Show answer
Show hint
Show solution
- Subsets of size 3 from {1, 2, 3, 4}: 4 total ({1,2,3}, {1,2,4}, {1,3,4}, {2,3,4}).
- Digit sums: 6 ✓, 7, 8, 9 ✓ ⇒ 2 subsets give a multiple of 3.
- Probability: 2/4 = 1/2.
2003 · #12 When a fair six-sided die is tossed on a table top, the bottom face cannot be seen. What is the probability that the product of the...
When a fair six-sided die is tossed on a table top, the bottom face cannot be seen. What is the probability that the product of the numbers on the five faces that can be seen is divisible by 6?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- 6 = 2 × 3, so the product is divisible by 6 as long as a 2 and a 3 both appear among the visible faces.
- Only one face is hidden. If it isn't the 6, then the 6 is visible. If it is the 6, then 2 and 3 are both still visible.
- Either way the product is divisible by 6, so the probability is 1.
2018 · #19 (figure problem)

Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Encode + as 0 and − as 1. The rule ("+ iff same") makes each upper cell the XOR of the two below.
- After 3 layers, the top cell = bottom1 ⊕ bottom2 ⊕ bottom3 ⊕ bottom4 (the binomial coefficients 1, 3, 3, 1 are all odd).
- Top = + (= 0) ⇔ even number of −'s in the bottom row.
- Of the 24 = 16 bottom configurations, exactly half have even parity: 8.
2011 · #23 How many 4-digit positive integers have four different digits, where the leading digit is not zero, the integer is a multiple of 5, and...
How many 4-digit positive integers have four different digits, where the leading digit is not zero, the integer is a multiple of 5, and 5 is the largest digit?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Case A: units = 0. The remaining three slots contain 5 and two distinct digits chosen from {1, 2, 3, 4}: C(4, 2) = 6 ways to pick the other two; 3! = 6 ways to arrange them. Subtotal: 6 × 6 = 36.
- Case B: units = 5. The remaining three slots use three distinct digits from {0, 1, 2, 3, 4}. Choose and arrange: 5 · 4 · 3 = 60. Subtract leading-zero arrangements: 4 · 3 = 12 with 0 first. Subtotal: 60 − 12 = 48.
- Total: 36 + 48 = 84.
Probability — favorable over total
Probability of an event = favorable outcomes / total outcomes, when all outcomes are equally likely.
PROBABILITY FORMULA
P(event) = |favorable| ÷ |total|
So a probability question is really TWO counting questions: how many ways the event happens, and how many total ways anything can happen.
Watch it work — two-dice sum
Roll two dice. What’s the probability the sum is 7? Total outcomes: 6 × 6 = 36 (one for each (A, B) pair). Favorable: count the cells in the grid where the sum is 7.
Six cells light up — one for each pair (1,6), (2,5), (3,4), (4,3), (5,2), (6,1). So P(sum=7) = 6/36 = 1/6.
Four rules to KNOW COLD
| Rule | When to use | Example |
|---|---|---|
| P(certain) = 1, P(impossible) = 0 | Sanity bounds — all probabilities live in [0, 1]. | P(die ≤ 6) = 1; P(die = 7) = 0 |
| P(NOT A) = 1 − P(A) | If counting “not” is easier than counting “is.” | P(not 6 on a die) = 1 − 1/6 = 5/6 |
| P(A OR B) = P(A) + P(B) (mutually exclusive) | Events can’t both happen at once. | P(die = 1 or die = 2) = 1/6 + 1/6 = 2/6 |
| P(A AND B) = P(A) · P(B) (independent) | Events don’t affect each other. | P(coin heads AND die = 6) = ½ · 1/6 = 1/12 |
The phrase "each outcome is equally likely" is doing the heavy lifting. It means the probability formula works as a count ratio. If outcomes have different likelihoods, you'd need a weighted sum instead — but on AMC 8, problems are almost always equally-likely.
For "or" problems: if events overlap, you need inclusion-exclusion (chapter 6). If they don't overlap, just add the probabilities.
A complete cycle of a traffic light takes 60 seconds. During each cycle the light is green for 25 seconds, yellow for 5 seconds, and red for 30 seconds. At a randomly chosen time, what is the probability that the light will NOT be green?
A traffic light has a 60-second cycle: 25 sec green, 5 sec yellow, 30 sec red. At a random moment, what's the probability the light is NOT green?
This is geometric probability: favorable time / total time.
- Total: 60 seconds (one full cycle).
- Favorable (not green): yellow + red =
5 + 30 = 35 seconds.
So P(not green) = 35/60 = 7/12.
'Not green' just bundles two colors. Add their times, divide by the cycle length. No casework, no transitions to worry about.
Probability = favorable / total. Count both. For independent events, multiply. For mutually exclusive events, add. "Not A" has probability 1 − P(A).
2013 · #8 A fair coin is tossed 3 times. What is the probability of at least two consecutive heads?
A fair coin is tossed 3 times. What is the probability of at least two consecutive heads?
Show answer
Show hint
Show solution
- Outcomes with two consecutive heads: HHH, HHT, THH. That's 3.
- Total outcomes: 23 = 8.
- Probability: 3/8.
2013 · #14 Abe holds 1 green and 1 red jelly bean in his hand. Bob holds 1 green, 1 yellow, and 2 red jelly beans in his hand. Each randomly picks...
Abe holds 1 green and 1 red jelly bean in his hand. Bob holds 1 green, 1 yellow, and 2 red jelly beans in his hand. Each randomly picks a jelly bean to show the other. What is the probability that the colors match?
Show answer
Show hint
Show solution
- Both green: (1/2)(1/4) = 1/8.
- Both red: (1/2)(2/4) = 1/4.
- Total: 1/8 + 1/4 = 1/8 + 2/8 = 3/8.
2009 · #12 The two spinners shown are spun once and each lands on one of the numbered sectors. What is the probability that the sum of the numbers...

Show answer
Show hint
Show solution
- Sums: 3, 5, 7, 5, 7, 9, 7, 9, 11. Non-prime: the two 9s.
- Prime probability: 7/9 = 7/9.
1990 · #14 A bag contains only blue balls and green balls. There are 6 blue balls. If the probability of drawing a blue ball at random from this...
A bag contains only blue balls and green balls. There are 6 blue balls. If the probability of drawing a blue ball at random from this bag is 14, then the number of green balls in the bag is
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Blue = 1/4 of all, so the total is 4 × 6 = 24 balls.
- Green = 24 − 6 = 18.
2007 · #21 Two cards are dealt from a deck of four red cards labeled A, B, C, D and four green cards labeled A, B, C, D. A winning pair is two of...
Two cards are dealt from a deck of four red cards labeled A, B, C, D and four green cards labeled A, B, C, D. A winning pair is two of the same color or two of the same letter. What is the probability of drawing a winning pair?
Show answer
Show hint
Show solution
- Same color: 3 of the remaining 7.
- Same letter (different color): 1 of the remaining 7.
- Probability: (3 + 1)/7 = 4/7.
Independent vs. dependent — with or without replacement
Two events are INDEPENDENT if the outcome of one doesn’t change the probability of the other:
- Flipping a coin twice — the first flip doesn’t affect the second.
- Rolling a die twice.
- Drawing a card and putting it back before drawing again.
Two events are DEPENDENT when one outcome affects the next:
- Drawing two cards WITHOUT replacement — the deck shrinks.
- Picking marbles without putting them back.
See the difference
FORMULAS
| Kind | P(A and B) | Why |
|---|---|---|
| Independent | P(A) × P(B) | B’s probability doesn’t change based on A. |
| Dependent | P(A) × P(B | A) | Compute B’s probability AFTER removing A’s outcome from the pool. |
The trap signal: read the words
| Phrase | Means |
|---|---|
| “with replacement” | Independent — pool unchanged |
| “without replacement” | Dependent — pool shrinks |
| “then draws a second” (no put-back mentioned) | Usually dependent — assume the marble stays out |
| “draws TWO at once” | Same as without replacement (the second can’t be the same marble) |
Read the problem carefully: "with replacement" means independent draws (probability stays the same each time). "without replacement" means the pool shrinks for the second draw.
For events that AND together (both happen), multiply probabilities. For events that OR together but can't both happen, add. For events that can both happen, use inclusion-exclusion (chapter 7).
Abe holds 1 green and 1 red jelly bean in his hand. Bob holds 1 green, 1 yellow, and 2 red jelly beans in his hand. Each randomly picks a jelly bean to show the other. What is the probability that the colors match?
Abe holds 1 green and 1 red. Bob holds 1 green, 1 yellow, and 2 red. Both randomly pick one bean from their own hand and show. What's the probability both show the same color?
Abe's beans: 2 total (G, R), so P(Abe G) = 1/2, P(Abe R) = 1/2.
Bob's beans: 4 total (G, Y, R, R), so P(Bob G) = 1/4, P(Bob R) = 2/4 = 1/2, P(Bob Y) = 1/4.
Abe doesn't have yellow, so they can match only on G or R.
P(both G) = P(Abe G) × P(Bob G) = (1/2)(1/4) = 1/8.
P(both R) = P(Abe R) × P(Bob R) = (1/2)(1/2) = 1/4 = 2/8.
P(match) = 1/8 + 2/8 = 3/8.
The two draws are independent (Abe and Bob have their own hands). Multiply within each color, then add across colors (since the colors are mutually exclusive — only one can match at a time).
With replacement: the draws ARE independent — multiply P(A) · P(B) directly. Without replacement: the second draw is conditional on the first — use P(A) · P(B | A), i.e. shrink the pool after removing A's outcome. Use × for AND, + for mutually-exclusive OR.
2007 · #21 Two cards are dealt from a deck of four red cards labeled A, B, C, D and four green cards labeled A, B, C, D. A winning pair is two of...
Two cards are dealt from a deck of four red cards labeled A, B, C, D and four green cards labeled A, B, C, D. A winning pair is two of the same color or two of the same letter. What is the probability of drawing a winning pair?
Show answer
Show hint
Show solution
- Same color: 3 of the remaining 7.
- Same letter (different color): 1 of the remaining 7.
- Probability: (3 + 1)/7 = 4/7.
2014 · #12 A magazine printed photos of three celebrities along with three photos of the celebrities as babies. The baby pictures did not identify...
A magazine printed photos of three celebrities along with three photos of the celebrities as babies. The baby pictures did not identify the celebrities. Readers were asked to match each celebrity with the correct baby pictures. What is the probability that a reader guessing at random will match all three correctly?
Show answer
Show hint
Show solution
- 3 baby photos can be assigned in 3! = 6 ways. Exactly 1 is the correct matching.
- Probability = 1/6.
1986 · #24 The 600 students at King Middle School are divided into three groups of equal size for lunch. Each group has lunch at a different time....
The 600 students at King Middle School are divided into three groups of equal size for lunch. Each group has lunch at a different time. A computer randomly assigns each student to one of three lunch groups. The probability that three friends, Al, Bob, and Carol, will be assigned to the same lunch group is approximately
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Whatever group Al is in, Bob lands there with chance ≈ 1⁄3 and Carol independently with chance ≈ 1⁄3.
- Combined: 1⁄3 × 1⁄3 = 1⁄9.
2011 · #12 Angie, Bridget, Carlos, and Diego are seated at random around a square table, one person to a side. What is the probability that Angie...
Angie, Bridget, Carlos, and Diego are seated at random around a square table, one person to a side. What is the probability that Angie and Carlos are seated opposite each other?
Show answer
Show hint
Show solution
- Fix Angie in any seat. Carlos has 3 equally likely seats among the remaining 3.
- Exactly 1 is opposite Angie ⇒ probability 1/3.
Casework, probability, independent events
Three problems that combine casework and probability rules.
2003 · #12 When a fair six-sided die is tossed on a table top, the bottom face cannot be seen. What is the probability that the product of the...
When a fair six-sided die is tossed on a table top, the bottom face cannot be seen. What is the probability that the product of the numbers on the five faces that can be seen is divisible by 6?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- 6 = 2 × 3, so the product is divisible by 6 as long as a 2 and a 3 both appear among the visible faces.
- Only one face is hidden. If it isn't the 6, then the 6 is visible. If it is the 6, then 2 and 3 are both still visible.
- Either way the product is divisible by 6, so the probability is 1.
2013 · #14 Abe holds 1 green and 1 red jelly bean in his hand. Bob holds 1 green, 1 yellow, and 2 red jelly beans in his hand. Each randomly picks...
Abe holds 1 green and 1 red jelly bean in his hand. Bob holds 1 green, 1 yellow, and 2 red jelly beans in his hand. Each randomly picks a jelly bean to show the other. What is the probability that the colors match?
Show answer
Show hint
Show solution
- Both green: (1/2)(1/4) = 1/8.
- Both red: (1/2)(2/4) = 1/4.
- Total: 1/8 + 1/4 = 1/8 + 2/8 = 3/8.
2007 · #21 Two cards are dealt from a deck of four red cards labeled A, B, C, D and four green cards labeled A, B, C, D. A winning pair is two of...
Two cards are dealt from a deck of four red cards labeled A, B, C, D and four green cards labeled A, B, C, D. A winning pair is two of the same color or two of the same letter. What is the probability of drawing a winning pair?
Show answer
Show hint
Show solution
- Same color: 3 of the remaining 7.
- Same letter (different color): 1 of the remaining 7.
- Probability: (3 + 1)/7 = 4/7.
Inclusion-exclusion — overlap correction
What if two events can both happen? Then |A or B| isn't just |A| + |B| — that double-counts the overlap. You have to subtract the overlap once.
INCLUSION-EXCLUSION (two sets)
|A ∪ B| = |A| + |B| − |A ∩ B|
Picture it as a Venn diagram. Two overlapping circles. When you write |A| (the whole left circle), you've counted the overlap once. When you write |B| (the whole right circle), you've counted the overlap a second time. So |A| + |B| over-counts the overlap. Subtracting |A ∩ B| once fixes it.
Three sets. The pattern continues: add singletons, subtract overlaps, add the triple overlap back.
|A ∪ B ∪ C| = |A| + |B| + |C| − |A∩B| − |A∩C| − |B∩C| + |A∩B∩C|
Where this shows up on AMC:
- "X students play soccer, Y play basketball, Z play both — how many play at least one?" → |A| + |B| − |both|.
- "Numbers divisible by 2 or 3 in a range" → |mult of 2| + |mult of 3| − |mult of 6|.
- "Three overlapping shapes — how much total area?" → inclusion-exclusion on the shapes.
For "A OR B" problems where both can happen: |A ∪ B| = |A| + |B| − |both|. The "both" piece is what you'd otherwise double-count.
Often the problem gives you everything except the overlap, and asks for it. Then rearrange: |both| = |A| + |B| − |A ∪ B|.
Each of the 39 students in the eighth grade at Lincoln Middle School has one dog or one cat or both a dog and a cat. Twenty students have a dog and 26 students have a cat. How many students have both a dog and a cat?
39 students. Every one owns a dog or cat (or both). 20 own dogs; 26 own cats. How many own both?
Let A = dog owners, B = cat owners. We know:
- |A ∪ B| = 39 (every student owns at least one)
- |A| = 20
- |B| = 26
Apply inclusion-exclusion: 39 = 20 + 26 − |A ∩ B|.
So |A ∩ B| = 46 − 39 = 7 students own both.
This is the classic IE setup. "Every X is in A or B" tells you |A ∪ B|. You're given |A| and |B|. Then |both| falls out of the formula directly.
For overlapping conditions: |A ∪ B| = |A| + |B| − |A ∩ B|. Rearrange to solve for whichever quantity is missing.
2007 · #13 Sets A and B, shown in the Venn diagram, have the same number of elements. Their union has 2007 elements and their intersection has 1001...

Show answer
Show hint
Show solution
- 2007 = 2|A| − 1001 ⇒ 2|A| = 3008 ⇒ |A| = 1504.
1999 · #9 (figure problem)

Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Adding the beds gives 500 + 450 + 350 = 1300, but the 50 + 100 = 150 shared plants were each counted twice.
- Subtract the overlap once: 1300 − 150 = 1150 plants.
2015 · #15 At Euler Middle School, 198 students voted on two issues in a school referendum with the following results: 149 voted in favor of the...
At Euler Middle School, 198 students voted on two issues in a school referendum with the following results: 149 voted in favor of the first issue and 119 voted in favor of the second issue. If there were exactly 29 students who voted against both issues, how many students voted in favor of both issues?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- At least one yes: 198 − 29 = 169.
- By inclusion-exclusion: 169 = 149 + 119 − (both).
- Both = 149 + 119 − 169 = 99.
2010 · #20 In a room, 2/5 of the people are wearing gloves, and 3/4 of the people are wearing hats. What is the minimum number of people in the...
In a room, 2/5 of the people are wearing gloves, and 3/4 of the people are wearing hats. What is the minimum number of people in the room wearing both a hat and a glove?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Total people: multiple of 20. Take 20 (the smallest).
- Gloves: 2/5 · 20 = 8. Hats: 3/4 · 20 = 15.
- Min(both) = max(0, gloves + hats − total) = max(0, 8 + 15 − 20) = 3.
1991 · #23 The Pythagoras High School band has 100 female and 80 male members. The orchestra has 80 female and 100 male members. There are 60...
The Pythagoras High School band has 100 female and 80 male members. The orchestra has 80 female and 100 male members. There are 60 females who are in both band and orchestra. Altogether there are 230 students who are in either band or orchestra or both. The number of males in the band who are NOT in the orchestra is
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Distinct females = 100 + 80 − 60 = 120, so distinct males = 230 − 120 = 110. Then males in both = 80 + 100 − 110 = 70.
- Males in band but not orchestra = 80 − 70 = 10.
Permutations and combinations — the two big formulas
Two classical formulas for counting arrangements:
PERMUTATIONS vs COMBINATIONS
- Permutations (order MATTERS): how many ways to arrange k items chosen from n. Notation: P(n, k) or
nP_k. Formula:n! / (n−k)! = n · (n−1) · … · (n−k+1). - Combinations (order DOESN'T MATTER): how many ways to choose k items from n. Notation: C(n, k) or
nC_kor(n choose k). Formula:n! / (k! · (n−k)!) = P(n, k) / k!.
Factorial. n! ("n factorial") = n × (n−1) × (n−2) × … × 2 × 1. So 5! = 120, 6! = 720, 7! = 5040. (Also 0! = 1 by convention.)
How to choose between permutations and combinations. Ask: does the order matter?
- "How many ways to seat 5 people in a row of 5 chairs?" Order matters → permutation. Answer: 5! = 120.
- "How many ways to choose 3 of 10 people for a team?" Order doesn't matter (Alice-Bob-Carol is the same team as Bob-Alice-Carol) → combination. Answer: C(10, 3) = 120.
- "How many ways to rank 3 winners (gold, silver, bronze) from 10 contestants?" Order matters (gold is different from silver) → permutation. Answer: P(10, 3) = 10·9·8 = 720.
The most-used combination. C(n, 2) = n(n−1)/2 is the number of pairs you can choose from n items — i.e., the number of handshakes among n people. For 5 people: 5·4/2 = 10 handshakes. For 10 people: 10·9/2 = 45. For 20 people: 20·19/2 = 190.
Three more facts worth knowing by sight
1. SUBSETS — 2n
A set with n elements has 2n subsets (counting the empty set and the whole set).
Why? For each of the n elements, decide independently: in or out. That’s 2 choices, multiplied n times. A set of 3 items {A, B, C} has 23 = 8 subsets: {}, {A}, {B}, {C}, {A,B}, {A,C}, {B,C}, {A,B,C}.
So “how many subsets” questions never need a formula — just 2 to the power of the count.
2. CIRCULAR ARRANGEMENTS — (n − 1)!
To seat n distinct people around a round table, where rotations of the same arrangement count as the same:
(n − 1)!
Why fewer than a row? Look at the same five friends arranged the same way, once in a row and once around a table:
In a row, each of the 5! = 120 shuffles is a brand-new arrangement — the chair you sit in matters. Around a table, only your neighbors matter. Rotating everyone one seat clockwise gives the “same” seating — you still see B on your left and E on your right. There are 5 rotations of every arrangement, so we divide: 120 ÷ 5 = 24.
Equivalent shortcut: fix one person in place (say A always at the top). Then arrange the other 4 in the remaining seats: 4! = 24. Same answer.
Example. 5 people round a table: 4! = 24. 6 people: 5! = 120. 8 people: 7! = 5040.
3. ARRANGING LETTERS WITH REPEATS — n! / (d₁! · d₂! · …)
To arrange n letters where one letter appears d₁ times, another d₂ times, etc.:
n! / (d₁! · d₂! · …)
Let’s see why. Take a smaller word: BOOK (4 letters, but the two O’s are identical).
The MISSISSIPPI example
MISSISSIPPI has 11 letters: 1 M, 4 I’s, 4 S’s, 2 P’s.
| Step | What we count | Number |
|---|---|---|
| 1 | Arrangements pretending all 11 letters are distinct | 11! = 39,916,800 |
| 2 | ÷ 4! for the 4 identical I’s | ÷ 24 |
| 3 | ÷ 4! for the 4 identical S’s | ÷ 24 |
| 4 | ÷ 2! for the 2 identical P’s | ÷ 2 |
| = | real arrangements | 34,650 |
For LEVEL (two E’s, two L’s): 5! / (2! · 2!) = 30. For LOOK (two O’s): 4! / 2! = 12. Same recipe every time.
For "how many handshakes if n people each shake every other person's hand once": always n(n−1)/2. Memorize this. It appears constantly.
For "how many lines through n distinct dots, no three collinear": same answer, C(n, 2) = n(n−1)/2 (each pair of dots determines one line; the no-three-collinear hypothesis guarantees they are all distinct). For "how many distinct triangles": C(n, 3) (and no-three-collinear ensures every triple gives a real triangle).
Professor Chang has nine different language books lined up on a bookshelf: two Arabic, three German, and four Spanish. How many ways are there to arrange the nine books on the shelf keeping the Arabic books together and keeping the Spanish books together?
Professor Chang has 9 different language books: 2 Arabic, 3 German, 4 Spanish. How many ways to arrange them so the Arabic books stay together and the Spanish books stay together? (The German books are free to interleave anywhere.)
Glue the Arabic block into one 'super-book' and the Spanish block into another 'super-book'. Now you have 5 objects to line up: [A-block], G1, G2, G3, [S-block].
- Order the 5 objects:
5! = 120ways. - Inside the Arabic block:
2! = 2orderings. - Inside the Spanish block:
4! = 24orderings.
Total: 120 × 2 × 24 = 5760.
The 'block trick' is the standard move for 'these k things must stay adjacent'. Glue them into one super-object, count outer arrangements, then multiply by the internal arrangements of each block. The German books are NOT blocked, so they each count as separate objects in the outer line-up.
Order matters → permutations P(n,k). Order doesn't matter → combinations C(n,k). When in doubt, ask whether "Alice then Bob" is the same as "Bob then Alice." For pairs: C(n,2) = n(n−1)/2.
2014 · #12 A magazine printed photos of three celebrities along with three photos of the celebrities as babies. The baby pictures did not identify...
A magazine printed photos of three celebrities along with three photos of the celebrities as babies. The baby pictures did not identify the celebrities. Readers were asked to match each celebrity with the correct baby pictures. What is the probability that a reader guessing at random will match all three correctly?
Show answer
Show hint
Show solution
- 3 baby photos can be assigned in 3! = 6 ways. Exactly 1 is the correct matching.
- Probability = 1/6.
2004 · #4 Ms. Hamilton's eighth-grade class wants to participate in the annual three-person-team basketball tournament. Lance, Sally, Joy, and...
Ms. Hamilton's eighth-grade class wants to participate in the annual three-person-team basketball tournament. Lance, Sally, Joy, and Fred are chosen for the team. In how many ways can the three starters be chosen?
Show answer
Show hint
Show solution
- C(4, 3) = C(4, 1) = 4.
2004 · #2 How many different four-digit numbers can be formed by rearranging the four digits in 2004?
How many different four-digit numbers can be formed by rearranging the four digits in 2004?
Show answer
Show hint
Show solution
- Total arrangements: 4!/2! = 12 (the 0 repeats).
- Leading zero arrangements: arrange {2, 0, 4} in last 3 spots = 3! = 6.
- Valid: 12 − 6 = 6.
2007 · #4 A haunted house has six windows. In how many ways can Georgie the Ghost enter the house by one window and leave by a different window?
A haunted house has six windows. In how many ways can Georgie the Ghost enter the house by one window and leave by a different window?
Show answer
Show hint
Show solution
- 6 · 5 = 30.
2005 · #14 The Little Twelve Basketball League has two divisions, with six teams in each division. Each team plays each of the other teams in its...
The Little Twelve Basketball League has two divisions, with six teams in each division. Each team plays each of the other teams in its own division twice and every team in the other division once. How many games are scheduled?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Intra: 2 · C(6, 2) · 2 = 2 · 15 · 2 = 60.
- Inter: 6 · 6 = 36.
- Total: 60 + 36 = 96.
Lattice paths — counting paths on a grid
A lattice path is a path on a grid that only uses fixed directions. The classic AMC question: how many paths from one corner of a grid to another, going only RIGHT or UP?
The clean observation
To get from (0,0) to (m, n), you ALWAYS need exactly m right-moves and n up-moves. The path is m+n moves total — you’re just choosing the ORDER.
LATTICE-PATHS FORMULA
Paths from (0, 0) to (m, n) using only right and up:
C(m + n, m) = C(m + n, n)
(Same thing — choose which positions are R, or which positions are U.)
Why combinations, not permutations?
The 3 R-moves are interchangeable — they all do the same thing. The 2 U-moves are also interchangeable. So we’re choosing POSITIONS for the R’s among 5 slots, not arranging 5 distinct items.
Path-through-a-point
“Paths from A to B that pass through P” — split into two legs.
| Leg | From | To | Paths |
|---|---|---|---|
| 1 | A | P | (some count) |
| 2 | P | B | (some count) |
| Multiply the two counts (multiplication principle) | total | ||
Path AVOIDING a forbidden cell
Use complementary counting: (all paths) − (paths through forbidden cell). The second piece is itself a path-through-a-point count.
For right-or-up only paths from (0,0) to (m,n): always C(m+n, m) = C(m+n, n). Don't try to draw all the paths.
For "paths through point P": split at P. Multiply the path counts for each leg.
Jack wants to bike from his house to Jill's house, which is located three blocks east and two blocks north of Jack's house. After biking each block, Jack can continue either east or north, but he needs to avoid a dangerous intersection one block east and one block north of his house. In how many ways can he reach Jill's house by biking a total of five blocks?
Jill's house is 3 east and 2 north of Jack's; Jack bikes only east or north; but the intersection 1 east + 1 north of Jack's is dangerous and must be avoided. How many safe paths?
Use complementary counting (chapter 3): total paths − paths through the dangerous corner.
- Total paths from (0,0) to (3,2): choose which 3 of the 5 moves are east.
C(5, 3) = 10. - Paths through the dangerous point (1,1): split at (1,1). Paths from (0,0) to (1,1) =
C(2, 1) = 2. Paths from (1,1) to (3,2) =C(3, 1) = 3. Multiply:2 × 3 = 6. - Safe paths = 10 − 6 = 4 (choice A).
You can verify by listing: the first two moves must avoid (1,1), so they must be either EE (giving 3 finishes from (2,0)) or NN (giving 1 finish from (0,2)). Total 4. ✓
The key word is 'avoid'. Whenever a path problem has a forbidden cell, the cleanest move is total minus (paths through the forbidden cell). Splitting at the forbidden cell turns the subtracted count into a product of two smaller lattice-path counts.
Right/up paths from (0,0) to (m,n): C(m+n, m). For paths through P: split at P, multiply the two leg counts. For paths avoiding a forbidden cell F: (total) − (paths through F).
2013 · #21 Samantha lives 2 blocks west and 1 block south of the southwest corner of City Park. Her school is 2 blocks east and 2 blocks north of...
Samantha lives 2 blocks west and 1 block south of the southwest corner of City Park. Her school is 2 blocks east and 2 blocks north of the northeast corner of City Park. On school days she bikes on streets to the southwest corner of City Park, then takes a diagonal path through the park to the northeast corner, and then bikes on streets to school. If her route is as short as possible, how many different routes can she take?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Home → SW corner: choose 1 of 3 step-orderings = C(3, 1) = 3.
- Diagonal through the park: 1 way.
- NE corner → school: C(4, 2) = 6.
- Total: 3 × 1 × 6 = 18.
1986 · #9 (figure problem)

Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Following the arrows carefully and listing each distinct path from M to N gives 6 routes.
- Answer: 6.
Pigeonhole principle — when something is forced
Imagine 10 pigeons and 9 nesting boxes. No matter how the pigeons choose, some box must contain at least 2 pigeons. That's the pigeonhole principle.
PIGEONHOLE PRINCIPLE
If you put n objects into k boxes and n > k, then some box must contain at least 2 objects.
Generalized: if you put n objects into k boxes, some box must contain at least ⌈n/k⌉ objects. (The ceiling function rounds up.)
The principle sounds obvious, but it's a precision tool. It lets you prove that something must exist without finding it explicitly — perfect for 'least number to guarantee' problems.
The contrapositive view (what AMC actually asks). 'Least number to guarantee N of the same kind.' Imagine the worst case: an adversary who spreads things as evenly as possible. How many more do you need to force a clump of N?
If you have k colors and want to guarantee N of one color, the worst case has N − 1 of each color before you finish — that's k(N − 1) items. The next item (one more) must complete a group of N.
WORST-CASE FORMULA
To guarantee N of the same color from k colors:
k · (N − 1) + 1 items.
Walkthrough. A drawer has socks in 3 colors. How many socks must you pull (worst case, in the dark) to guarantee a matching pair?
- k = 3 colors, N = 2 (matching = pair).
- Formula: 3·(2−1) + 1 = 4 socks.
- Worst case: first 3 socks could all be different colors. The 4th must match one of them.
This is a classic kindergarten-level pigeonhole. The same logic scales up: 9 colors, want 4 of one → 9·3 + 1 = 28 items.
When a problem asks 'least number to guarantee', think worst case. An adversary spreads things as evenly as possible — what's the most they can spread before they're forced to clump?
If items aren't equally available (e.g., 'a bag with 9 red, 7 white, 8 blue gumballs'), the worst case takes ALL of the smaller groups before forcing a clump. The formula k·(N−1) + 1 still works when there are enough of each color; when not, count carefully.
A gumball machine contains 9 red, 7 white, and 8 blue gumballs. The least number of gumballs a person must buy to be sure of getting four gumballs of the same color is
A gumball machine has 9 red, 7 white, 8 blue. How many do you have to buy to guarantee 4 of the same color?
Worst case (adversary giving you the meanest possible draw): you draw 3 of each color before the 4th-of-a-kind is forced. That's 3 + 3 + 3 = 9 gumballs, none of which yet completes a group of 4.
The 10th gumball MUST be a 4th red, 4th white, or 4th blue — there's nowhere else for it to go. So the answer is 10.
Check against the formula: k = 3 colors, N = 4 → k·(N−1) + 1 = 3·3 + 1 = 10 ✓. (We had enough of each color to spread evenly to 3, so the formula applies cleanly.)
The 'worst case' framing is the heart of pigeonhole. The adversary spreads things evenly to delay a clump, but eventually they run out of room. Compute the max even spread, add 1.
To guarantee N of the same kind from k categories: k(N−1) + 1 items. Imagine the worst-case adversary spreading as evenly as possible. The next item is forced.
2005 · #16 A five-legged Martian has a drawer full of socks, each of which is red, white or blue, and there are at least five socks of each color....
A five-legged Martian has a drawer full of socks, each of which is red, white or blue, and there are at least five socks of each color. The Martian pulls out one sock at a time without looking. How many socks must the Martian remove from the drawer to be certain there will be 5 socks of the same color?
Show answer
Show hint
Show solution
- After 12 socks, possible to have 4 red, 4 white, 4 blue (no color has 5).
- 13th sock must give some color 5 ⇒ minimum = 13.
1994 · #21 A gumball machine contains 9 red, 7 white, and 8 blue gumballs. The least number of gumballs a person must buy to be sure of getting...
A gumball machine contains 9 red, 7 white, and 8 blue gumballs. The least number of gumballs a person must buy to be sure of getting four gumballs of the same color is
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- You could draw 3 red, 3 white, 3 blue — 9 gumballs — with no color yet reaching four.
- The 10th gumball must complete a set of four, so the answer is 10.
Stars and bars — sharing things among people
Here’s a classic question that shows up a lot: you have 7 identical cookies to share among 3 kids. How many ways are there?
The kids don’t have to get the same number. One kid could even get zero. As long as the totals add up to 7, it counts as a valid sharing.
This sounds hard. There’s a beautiful picture-based trick that makes it easy.
The picture: stars and bars
Draw the 7 cookies in a row as stars. To split them among 3 kids, you need 2 dividers (called bars) between the stars. The cookies before the first bar go to kid 1, the cookies between the two bars go to kid 2, and the cookies after the second bar go to kid 3.
Every way of arranging 7 stars and 2 bars in a row corresponds to exactly one way of sharing the cookies. So now we just count arrangements of 7 stars and 2 bars.
Counting the arrangements
There are 7 + 2 = 9 positions in the row. We pick which 2 positions are bars; the rest are stars. From chapter 8, that's C(9, 2) = 9 · 8 / 2 = 36 ways.
So there are 36 ways to share 7 cookies among 3 kids (zeros allowed).
STARS & BARS
To split N identical items among k people (zeros allowed):
C(N + k − 1, k − 1)
(Imagine N stars and k−1 bars in a row; choose where the bars go.)
The “each kid gets at least one” trick
Often the problem says every kid must get at least one cookie. The trick: give every kid one cookie up front, then share what’s left freely.
Example. 7 cookies, 3 kids, each kid at least 1. Hand out 3 cookies up front (one per kid). Now share the remaining 4 cookies among the 3 kids with no minimum. That’s C(4 + 2, 2) = C(6, 2) = 15 ways.
Two clues that you should reach for stars and bars:
- The items are identical (cookies, apples, marbles — not labeled).
- The recipients are distinct (Alice, Bob, Carla — or kid 1, kid 2, kid 3).
If both are true, draw stars (the items) and bars (one fewer bar than there are recipients). Count the arrangements.
If the problem says “each recipient gets at least m,” hand out m to each up front; then run stars-and-bars on what’s left.
Alice has 24 apples. In how many ways can she share them with Becky and Chris so that each of the three people has at least two apples?
Alice has 24 apples to share among herself, Becky, and Chris — each of the three people gets at least 2 apples.
Step 1 — satisfy the minimums up front. Give 2 apples to each person right away. That uses 2 · 3 = 6 apples. We have 24 − 6 = 18 apples left to share freely (zeros now allowed).
Step 2 — stars and bars on the leftover. 18 identical apples among 3 distinct people, zeros allowed. By the formula:
C(18 + 2, 2) = C(20, 2) = 20 · 19 / 2 = 190 ways.
The “at least 2” restriction is a smokescreen. Just hand out the minimums and the problem becomes the standard “identical items, distinct recipients, zeros allowed” setup. Then it’s one combination away from the answer.
Identical items, distinct recipients: C(N + k − 1, k − 1). For minimums (each gets at least m): hand out the minimums first, then apply the formula to what’s left.
2019 · #25 Alice has 24 apples. In how many ways can she share them with Becky and Chris so that each of the three people has at least two apples?
Alice has 24 apples. In how many ways can she share them with Becky and Chris so that each of the three people has at least two apples?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Give 2 apples to each person first: that uses 6, leaving 18 to distribute with no minimum (each person already has 2).
- Distribute 18 indistinguishable apples among 3 people with no constraint: C(18 + 2, 2) = C(20, 2) = 190.
How many rectangles? — counting figures in a grid
“How many rectangles (or squares, or triangles) are in this figure?” looks like a spot-and-count chore. On a clean grid it's actually a choose problem in disguise.
Here's the key idea: every rectangle is fixed by two vertical lines and two horizontal lines. Pick the two lefts/rights, pick the two tops/bottoms — you've named exactly one rectangle.
So counting rectangles = counting ways to choose 2 lines from each direction:
A grid that is 3 squares wide and 2 tall has 4 vertical lines and 3 horizontal lines, so it holds C(4,2)×C(3,2) = 6×3 = 18 rectangles.
Squares are counted a different way — by size. A 1×1 square fits in many spots, a big square in few. Add up the per-size counts:
| square size | positions in a 3×2 grid | count |
|---|---|---|
| 1×1 | 3 across × 2 down | 6 |
| 2×2 | 2 across × 1 down | 2 |
| total squares | 8 | |
In an n×n grid this becomes 1²+2²+…+n² squares.
When the figure isn't a clean grid (overlapping boxes, an L-shape), the formula won't apply — so count systematically by size: all the smallest pieces first, then the next size up, then the combined ones. A size-by-size sweep never misses what random eyeballing does.
How many rectangles are in this figure?

How many rectangles are in this figure? The picture isn't a tidy grid, so reach for the systematic size-by-size sweep rather than the choose-2-lines formula.
Don't hunt randomly — that's how you miss three and double-count two. Go in order:
Count the smallest single rectangles first. Then every rectangle made of two pieces joined. Then the larger combinations. Keep a tally for each size and add at the end.
Worked through cleanly, the tally comes to 11 — choice (D). The lesson isn't the number; it's the habit: a fixed order (small → large) turns a messy figure into a checklist you can't lose track of.
On a clean grid, # rectangles = C(verticals,2)×C(horizontals,2) and squares add up by size (1²+2²+…). On a messy figure, sweep size by size — never eyeball.
2011 · #19 How many rectangles are in this figure?

Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- The three drawn rectangles themselves contribute 3.
- The overlapping lines cut the figure into smaller atomic rectangles. The center is where all three overlap. Each individual atom is a rectangle (there are several), and pairs of adjacent atoms that share a full side form another rectangle.
- Adding up all distinct rectangles — the three originals plus every smaller rectangle formed by the cuts — gives 11.
2017 · #15 In the arrangement of letters and numerals below, by how many different paths can one spell AMC8? Beginning at the A in the middle, a...
In the arrangement of letters and numerals below, by how many different paths can one spell AMC8? Beginning at the A in the middle, a path allows only moves from one letter to an adjacent (above, below, left, or right, but not diagonal) letter. One example of such a path is traced in the picture.
Show answer
Show hint
Show solution
- From A: 4 adjacent M's (up/down/left/right).
- From each M: 3 adjacent C's (one direction goes back to A, doesn't count).
- From each C: 2 adjacent 8's.
- Total: 4 × 3 × 2 = 24.
2024 · #16 Minh enters the numbers 1 through 81 into the cells of a 9 × 9 grid in some order. She calculates the product of the numbers in each row...
Minh enters the numbers 1 through 81 into the cells of a 9 × 9 grid in some order. She calculates the product of the numbers in each row and column. What is the least number of rows and columns that could have a product divisible by 3?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- There are 27 multiples of 3 in 1–81. Any row or column containing a multiple of 3 gets a product divisible by 3, so we want the multiples confined to as few rows and columns as possible.
- A 5×5 corner block holds only 25 multiples. The remaining 2 must spill out — place them in the 6th column of rows 1 and 2.
- Rows touched: 5 (rows 1–5). Columns touched: 6 (columns 1–6). Total: 5 + 6 = 11.
Stretch test
Five harder counting and probability problems. Each combines multiple techniques.
2018 · #16 Professor Chang has nine different language books lined up on a bookshelf: two Arabic, three German, and four Spanish. How many ways are...
Professor Chang has nine different language books lined up on a bookshelf: two Arabic, three German, and four Spanish. How many ways are there to arrange the nine books on the shelf keeping the Arabic books together and keeping the Spanish books together?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Treat the 2 Arabic books as one block and the 4 Spanish books as one block. Together with the 3 German books, we have 5 objects to order: 5! = 120 ways.
- Inside the Arabic block: 2! = 2 orderings. Inside the Spanish block: 4! = 24 orderings.
- Total: 120 × 2 × 24 = 5760.
2018 · #19 (figure problem)

Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Encode + as 0 and − as 1. The rule ("+ iff same") makes each upper cell the XOR of the two below.
- After 3 layers, the top cell = bottom1 ⊕ bottom2 ⊕ bottom3 ⊕ bottom4 (the binomial coefficients 1, 3, 3, 1 are all odd).
- Top = + (= 0) ⇔ even number of −'s in the bottom row.
- Of the 24 = 16 bottom configurations, exactly half have even parity: 8.
2013 · #21 Samantha lives 2 blocks west and 1 block south of the southwest corner of City Park. Her school is 2 blocks east and 2 blocks north of...
Samantha lives 2 blocks west and 1 block south of the southwest corner of City Park. Her school is 2 blocks east and 2 blocks north of the northeast corner of City Park. On school days she bikes on streets to the southwest corner of City Park, then takes a diagonal path through the park to the northeast corner, and then bikes on streets to school. If her route is as short as possible, how many different routes can she take?
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Home → SW corner: choose 1 of 3 step-orderings = C(3, 1) = 3.
- Diagonal through the park: 1 way.
- NE corner → school: C(4, 2) = 6.
- Total: 3 × 1 × 6 = 18.
1992 · #23 If two dice are tossed, the probability that the product of the numbers showing on the tops of the dice is greater than 10 is
If two dice are tossed, the probability that the product of the numbers showing on the tops of the dice is greater than 10 is
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Counting products over 10: a 2 works with 6 (1 way), a 3 with 4–6 (3), a 4 with 3–6 (4), a 5 with 3–6 (4), a 6 with 2–6 (5).
- That's 1 + 3 + 4 + 4 + 5 = 17 of 36, a probability of 17/36.
2000 · #21 Keiko tosses one penny and Ephraim tosses two pennies. The probability that Ephraim gets the same number of heads that Keiko gets is
Keiko tosses one penny and Ephraim tosses two pennies. The probability that Ephraim gets the same number of heads that Keiko gets is
Show answer
Show hints
Still stuck? Show hint 2 →
Show solution
- Keiko gets 1 head or 0 heads, each with probability ½. Ephraim's two tosses give 1 head with probability ½ (HT or TH) and 0 heads with probability ¼ (TT).
- Both at 1 head: ½ · ½ = ¼. Both at 0 heads: ½ · ¼ = ⅛.
- Add the two matching cases: ¼ + ⅛ = ⅜.
Counting & Probability quick-reference
FORMULAS TO KNOW COLD
- Multiplication principle: independent steps multiply.
- Factorial: n! = n·(n−1)·…·2·1. 5! = 120. 6! = 720. 7! = 5040. (0! = 1 by convention.)
- Permutations (order matters): P(n, k) = n! / (n−k)!.
- Combinations (order doesn't matter): C(n, k) = n! / (k! · (n−k)!).
- Symmetry: C(n, k) = C(n, n−k).
- Handshake formula: C(n, 2) = n(n−1) / 2.
- Subsets of an n-element set: 2n.
- Circular arrangements: (n−1)! (rotations of the same arrangement count once).
- Letters with repeats: n! / (d₁! · d₂! · …).
- Stars and bars: identical N items among k distinct recipients (zeros allowed) = C(N+k−1, k−1).
- Probability: favorable / total (with equally-likely outcomes).
- Independent events: P(A and B) = P(A) · P(B).
- Mutually exclusive: P(A or B) = P(A) + P(B).
- Complement: P(not A) = 1 − P(A).
- Inclusion-exclusion: |A ∪ B| = |A| + |B| − |A ∩ B|.
- Lattice paths (right/up): C(m+n, m).
- Pigeonhole (guarantee N from k): k(N−1) + 1 items.
- Order matters or not? Permutation vs. combination — read the problem carefully.
- With or without replacement? Without = the pool shrinks for the second draw.
- Forgetting to subtract overlap in "A or B" with both possible.
- "At least one" trap. Use complementary counting; count the "none" case and subtract.
- Over-counting symmetric arrangements. If items can be rotated/reflected to the same arrangement, divide by the symmetry count.
Drill these:
- 5! = 120. 6! = 720. 7! = 5040.
- C(5,2) = 10. C(10,2) = 45. C(10,3) = 120.
- 10 handshakes among 5 people. 45 among 10. 190 among 20.
- Rolling 2 dice: 36 outcomes. P(sum = 7) = 6/36 = 1/6. P(sum = 12) = 1/36.
- Flipping 3 coins: 8 outcomes. P(exactly 2 heads) = C(3, 2)/8 = 3/8.
- Paths from (0,0) to (4,3): C(7, 3) = 35.
Want to climb higher? — advanced counting tools (#22–#25 territory)
- PIE for 3 sets: |A ∪ B ∪ C| = |A| + |B| + |C| − |A∩B| − |A∩C| − |B∩C| + |A∩B∩C|.
- Pascal’s identity: C(n, k) + C(n, k+1) = C(n+1, k+1). (Useful for building Pascal’s triangle row-by-row.)
- Binomial sum: C(n,0) + C(n,1) + … + C(n,n) = 2n. (Same fact as “number of subsets” — two views.)
- Linearity of expectation: E[X + Y] = E[X] + E[Y], even when X and Y are NOT independent. Lets you compute the expected total without disentangling cases.
- Recursion-as-counting: when a problem builds on smaller cases, count f(1), f(2), f(3) and look for a relation like f(n) = f(n−1) + f(n−2) (Fibonacci). Then chase the recurrence.