PrevNext

Overview

Generating functions encode sequences into algebraic objects. Even simple applications can simplify counting and recurrence problems.

Key Ideas

  • The coefficient of xnx^n in (1+x+x2+)k(1+x+x^2+\cdots)^k counts solutions to x1++xk=nx_1+\cdots+x_k=n with nonnegative integers.
  • Finite options become finite polynomials like (1+x+x2)(1+x+x^2).
  • Multiplying series corresponds to combining choices.

Worked Example

Count solutions to a+b+c=5a+b+c=5 with a,b,c0a,b,c\ge0.

The generating function is (1+x+x2+)3=1(1x)3(1+x+x^2+\cdots)^3=\frac{1}{(1-x)^3}. The coefficient of x5x^5 is (5+3131)=21\binom{5+3-1}{3-1}=21.

Practice Problems

StatusSourceProblem NameDifficultyTags
AIMEVery Hard
Show TagsGenerating Functions
AIMEVery Hard
Show TagsCounting

Module Progress:

Join the AoPS Community!

Stuck on a problem, or don't understand a module? Join the AoPS community and get help from other math contest students.

PrevNext