AMC 10 Step by Step

Topics / Counting & Probability

Distributions & Stars and Bars

Distributing objects into bins, integer partitions, compositions

5
primary-topic problems (0.4% of all)
1
more as a secondary topic
Where it appears
0
P1-10
1
P11-15
2
P16-20
2
P21-25

## What you need to know
- Stars and bars: nonnegative integer solutions of x1++xk=nx_1 + \cdots + x_k = n number (n+k1k1)\binom{n+k-1}{k-1}; positive solutions number (n1k1)\binom{n-1}{k-1}.
- Distributing nn identical objects into kk distinct boxes is the same count; a lower bound xiaix_i \ge a_i is removed by substituting yi=xiaiy_i = x_i - a_i.
- Upper bounds (ximx_i \le m) are handled by inclusion-exclusion over which variables exceed mm.
- Distinct objects into distinct boxes: knk^n, not stars and bars.
- Identical objects into identical boxes (partitions) have no formula; list them.
- Compositions of nn into positive parts, any number of parts: 2n12^{n-1}.

## How AMC 10 tests it
- Problems 10–18: "How many ways can 1010 identical candies be given to 44 children if each gets at least one?"
- Equations in disguise: digit sums equal to kk, number of terms in an expansion, ways to pay a total with coins.
- Problems 18–24: a cap ("no child receives more than 44") forcing inclusion-exclusion, or an identical-versus-distinct twist.
- Often the numerator or denominator of a probability.

## Standard approaches
1. Classify first (objects identical or distinct, boxes identical or distinct); only identical-into-distinct is stars and bars.
2. Shift variables to remove lower bounds, then apply (n+k1k1)\binom{n+k-1}{k-1}.
3. For upper bounds, count all, subtract cases with one variable too big, add back cases with two.
4. For small nn or identical boxes, list partitions from the largest part downward.
5. Verify with a tiny case you can enumerate.

## Worked example
How many ordered triples (a,b,c)(a, b, c) of nonnegative integers satisfy a+b+c=12a + b + c = 12 with a5a \le 5, b5b \le 5, and c5c \le 5?

(A) 77 (B) 1010 (C) 1919 (D) 2828 (E) 9191

Solution. Without caps there are (142)=91\binom{14}{2} = 91 solutions. If a6a \ge 6, put a=a6a' = a - 6; then a+b+c=6a' + b + c = 6 has (82)=28\binom{8}{2} = 28 solutions, and likewise for bb and cc: 328=843 \cdot 28 = 84. If two variables are at least 66, they already sum to 1212 and the third is 00: 33 solutions. All three is impossible. Inclusion-exclusion gives 9184+3=1091 - 84 + 3 = 10. Check: the valid triples are permutations of (5,5,2)(5,5,2), (5,4,3)(5,4,3), (4,4,4)(4,4,4), that is 3+6+1=103 + 6 + 1 = 10. Answer (B) 10\boxed{\textbf{(B)}\ 10}.

## Pitfalls
- Using (n+k1k1)\binom{n+k-1}{k-1} when the objects are distinct (should be knk^n) or the boxes are identical.
- Mixing up (n1k1)\binom{n-1}{k-1} (positive parts) with (n+k1k1)\binom{n+k-1}{k-1} (nonnegative parts).
- Forgetting to add back the double overlaps after subtracting over-cap cases.
- Miscounting bars: kk boxes need k1k - 1 bars.

Traps that recur

  • Distributing the five 2's without requiring every factor to exceed 1, which counts factors equal to 1 and overcounts badly. (2020 AMC 10B #25)
  • Forgetting that dice cannot show 0 and counting solutions to a sum of 10 over 7 nonnegative variables, or worrying about the upper bound 6 when it cannot bind. (2018 AMC 10A #11)
  • Dropping the constant 1 from the count (treating the exponents as summing to exactly N with no slack), which gives C(N-1, 3) and no matching choice. (2016 AMC 10A #20)
  • Treating the six cookies as distinguishable and answering 3^6 = 729, choice (E). (2003 AMC 10A #21)

Problems, easiest first

2018 AMC 10A · #11Distributions & Stars and Bars

When 77 fair standard 66 -sided dice are thrown, the probability that the sum of the numbers on the top faces is 1010 can be written as n67,\frac{n}{6^{7}}, where nn is a positive integer. What is nn ?

2016 AMC 10A · #20Distributions & Stars and Bars

For some particular value of NN , when (a+b+c+d+1)N(a+b+c+d+1)^N is expanded and like terms are combined, the resulting expression contains exactly 10011001 terms that include all four variables a,b,c,a, b,c, and dd , each to some positive power. What is NN ?

2003 AMC 10A · #21Distributions & Stars and Bars

Pat is to select six cookies from a tray containing only chocolate chip, oatmeal, and peanut butter cookies. There are at least six of each of these three kinds of cookies on the tray. How many different assortments of six cookies can be selected?

2001 AMC 10 · #19Distributions & Stars and Bars

Pat wants to buy four donuts from an ample supply of three types of donuts: glazed, chocolate, and powdered. How many different selections are possible?

2020 AMC 10B · #25Distributions & Stars and Bars

Let D(n)D(n) denote the number of ways of writing the positive integer nn as a product n=f1f2fk,n = f_1\cdot f_2\cdots f_k, where k1k\ge1 , the fif_i are integers strictly greater than 11 , and the order in which the factors are listed matters (that is, two representations that differ only in the order of the factors are …