Sign in to save

Bookmark this page so you can find it later.

Sign in to save

Bookmark this page so you can find it later.

Stars and Bars Counting Reference cheat sheet - grade 11-12

Click image to open full size

Math Grade 11-12

Stars and Bars Counting Reference Cheat Sheet

A printable reference covering stars and bars, nonnegative solutions, positive solutions, upper bounds, and identical object distributions for grades 11-12.

Download PNG

Study as Flashcards

Stars and bars is a counting method for distributing identical objects into distinct boxes. It helps students count solutions to equations without listing every possibility. This cheat sheet is useful for combinations problems, integer solutions, and probability questions involving repeated choices.

It gives quick formulas and decision rules for common cases in grades 11-12.

The core idea is to represent objects as stars and dividers between groups as bars. The number of nonnegative integer solutions to x1+x2++xk=nx_1+x_2+\cdots+x_k=n is (n+k1k1)\binom{n+k-1}{k-1}. For positive integer solutions, first give each variable 11, then count the remaining objects.

Problems with upper bounds often need subtraction, cases, or inclusion-exclusion.

Key Facts

  • The number of nonnegative integer solutions to x1+x2++xk=nx_1+x_2+\cdots+x_k=n is (n+k1k1)\binom{n+k-1}{k-1}.
  • The number of positive integer solutions to x1+x2++xk=nx_1+x_2+\cdots+x_k=n is (n1k1)\binom{n-1}{k-1} when nkn\ge k.
  • Stars and bars counts distributions of nn identical objects into kk distinct boxes using nn stars and k1k-1 bars.
  • The binomial coefficient formula is (ab)=a!b!(ab)!\binom{a}{b}=\frac{a!}{b!(a-b)!}.
  • If each variable must satisfy ximix_i\ge m_i, substitute yi=ximiy_i=x_i-m_i so that yi0y_i\ge 0.
  • If a variable has an upper bound such as xirx_i\le r, count all solutions and subtract the solutions with xir+1x_i\ge r+1.
  • The number of ways to choose nn items from kk types with repetition allowed is (n+k1k1)\binom{n+k-1}{k-1}.
  • Stars and bars does not apply directly when the objects are distinct or when the boxes are identical.

Vocabulary

Stars and bars
A counting method that uses stars for identical objects and bars for dividers between distinct groups.
Nonnegative integer solution
A solution in which every variable is an integer greater than or equal to 00.
Positive integer solution
A solution in which every variable is an integer greater than or equal to 11.
Binomial coefficient
The value (nr)\binom{n}{r}, which counts the number of ways to choose rr items from nn items.
Upper bound
A maximum allowed value for a variable, such as xi5x_i\le 5.
Inclusion-exclusion
A counting strategy that subtracts forbidden cases and adds back cases that were subtracted more than once.

Common Mistakes to Avoid

  • Using (n+k1k1)\binom{n+k-1}{k-1} for positive solutions is wrong because that formula allows variables to equal 00. For positive solutions, use (n1k1)\binom{n-1}{k-1}.
  • Treating distinct objects as identical is wrong because stars and bars assumes the objects being distributed are identical. If the objects are distinct, use a different counting method.
  • Forgetting that the boxes are distinct is wrong because stars and bars counts different assignments to labeled categories. Swapping values between two named variables usually creates a different solution.
  • Ignoring upper bounds is wrong because the basic formula only handles lower bounds. When restrictions like xirx_i\le r appear, subtract invalid cases or use inclusion-exclusion.
  • Choosing the wrong number of bars is wrong because kk groups require exactly k1k-1 dividers. Using kk bars overcounts the number of groups.

Practice Questions

  1. 1 How many nonnegative integer solutions are there to x+y+z=12x+y+z=12?
  2. 2 How many positive integer solutions are there to a+b+c+d=18a+b+c+d=18?
  3. 3 How many ways can 1010 identical pencils be distributed among 44 students if each student receives at most 55 pencils?
  4. 4 Explain why stars and bars can count the number of ways to buy 88 donuts from 55 flavors, but cannot directly count the number of ways to assign 88 different books to 55 students.