Skip to content

Distribution and Partitions

11 lessons · 18 questions · 12 PYQs · ~70 s per question

The idea

Distributing nn identical items among kk people is the same as writing nn stars and k−1k-1 bars in a row: (n+k−1k−1)\binom{n+k-1}{k-1} ways. Lower bounds are removed by handing them out first; upper bounds by subtracting the cases that exceed them.

Textbook vs exam method

Exam method

  1. Shift then count. x1≥1x_{1}\ge1, x2≥2x_{2}\ge2, sum 5050, four variables: (47+33)=19600\binom{47+3}{3}=19600.Indore 2024
  2. Ranges. 21≤a+b+c≤2521\le a+b+c\le25 in positive integers: ∑(s−12)=1160\sum\binom{s-1}{2}=1160, or (253)−(203)\binom{25}{3}-\binom{20}{3} by the hockey stick.
  3. Identical boxes. Rohtak 2020 racquets: patterns (3,1,1)(3,1,1) and (2,2,1)(2,2,1): 10+15=2510+15=25.
  4. Odd parts. x=2a+1x=2a+1 turns 'odd positive' into 'non-negative'.

Worked examples

Example 1Sitter

1010 apples to 33 children, each at least 22

Example 2

(d2, Indore 2024 Q35) x1+x2+x3+x4=50x_{1}+x_{2}+x_{3}+x_{4}=50 with x1≥1x_{1}\ge1, x2≥2x_{2}\ge2

Example 3

(d2, Indore 2023 SA Q3) positive solutions of 21≤a+b+c≤2521\le a+b+c\le25

Example 4

(d3, Rohtak 2020 Q8) 55 different racquets in 33 identical boxes, none empty

Example 5

(d5, Indore 2024 Q32, corrected) 2020 identical balloons, 55 girls and 33 boys, each at least one, no girl below any boy

Traps

  • Lower index off by one; 'at least one' vs 'zero allowed'; equal groups counted twice; a bound forgotten.

Formulas

Non-negative solutions (stars and bars)

x1+⋯+xk=n, xi≥0: (n+k−1k−1)x_{1}+\cdots+x_{k}=n,\ x_{i}\ge0:\ \binom{n+k-1}{k-1}

n identical items among k people, zero allowed; shift lower bounds first (Indore 2024: 50 - 1 - 2 = 47, C(50, 3) = 19600).
Positive solutions

x1+⋯+xk=n, xi≥1: (n−1k−1)x_{1}+\cdots+x_{k}=n,\ x_{i}\ge1:\ \binom{n-1}{k-1}

Everyone gets at least one: give one each, then stars and bars.
Solutions of an inequality

x+y+z≤n, x,y,z≥0: (n+33)x+y+z\le n,\ x,y,z\ge0:\ \binom{n+3}{3}

Add a slack variable; a range L to U is a sum of equalities (Indore 2023: 1160).
Distinct objects into distinct boxes

kn (any),∑i=0k(−1)i(ki)(k−i)n (none empty)k^{n}\ \text{(any)},\qquad \sum_{i=0}^{k}(-1)^{i}\binom{k}{i}(k-i)^{n}\ \text{(none empty)}

Inclusion-exclusion on the empty boxes when none may be empty.
Dividing into equal groups

(mk)!(m!)k k! (equal unlabelled groups)\dfrac{(mk)!}{(m!)^{k}\,k!}\ \text{(equal unlabelled groups)}

Divide by k! only when the groups are unlabelled; equal shares to k people: (mk)!/(m!)^k.

In the exam

Shortcuts
  • Decide two things first: are the objects identical? are the boxes identical? - the four cases use different tools.
  • Identical into distinct: stars and bars. Distinct into distinct: knk^n. Distinct into identical: list the size patterns (Rohtak 2020: 10+15=2510+15=25). Identical into identical: list partitions.
  • Upper caps: stars and bars minus the cases over a cap (inclusion-exclusion), or list when small.
  • Coins: fix the number of the largest coin and count the rest (Indore 2026: 2,5,102,5,10 to make 5050 gives 2121).
  • Ordered factorisations: share each prime's exponent among the factors, (e+22)\binom{e+2}{2} per prime for three factors.
~70 s per question at exam speed
When to skip: Plain stars and bars is 30-45 s. Order constraints between people (Indore 2024 balloons) or many caps take 3 minutes - skip in a first pass.

Before this

What the exams ask here

  • x+y+z=n solutions with x>=a
  • distribute 5 distinct balls in 3 identical boxes
  • solutions with sum in a range
Next sub-topicCounting in Geometry and Grids

Practise this free. Every mistake is saved and comes back until you fix it.

Start free