Stirling numbers are the workhorses of combinatorial enumeration—they answer two fundamental questions that appear throughout algebraic combinatorics: How many ways can we arrange elements into cycles? and How many ways can we partition a set into groups? These questions connect directly to permutation groups, symmetric functions, and generating function techniques that form the backbone of the course. When you encounter problems about distributing objects, counting permutations by structure, or expanding polynomials in different bases, Stirling numbers are almost certainly lurking beneath the surface.
You're being tested on your ability to recognize which type of Stirling number applies to a given problem, derive values using recurrence relations, and connect these numbers to broader structures like Bell numbers and generating functions. Don't just memorize the formulas—understand what each Stirling number counts and why the recurrences make combinatorial sense. If you can explain why adding an element either creates a new cycle/subset or joins an existing one, you've mastered the conceptual core.
Stirling Numbers of the First Kind: Counting Cycles
The first kind counts permutations by their cycle structure. Every permutation can be uniquely decomposed into disjoint cycles, and c(n,k) tells you exactly how many permutations of n elements have exactly k cycles.
Unsigned Stirling Numbers of the First Kind
Denoted c(n,k) or [nk]—counts permutations of n elements with exactly k disjoint cycles
Recurrence relation: c(n,k)=c(n−1,k−1)+(n−1)⋅c(n−1,k)—the new element either forms its own 1-cycle or inserts into one of (n−1) positions in existing cycles
Boundary conditions:c(n,0)=0 for n>0, c(0,0)=1, and c(n,n)=1 since the identity permutation has n fixed points
Signed Stirling Numbers of the First Kind
Denoted s(n,k) with lowercase—these incorporate the sign (−1)n−k based on permutation parity
Relationship to unsigned version:s(n,k)=(−1)n−kc(n,k), connecting cycle count to even/odd permutation classification
Appears in polynomial expansions: the falling factorial xn=x(x−1)(x−2)⋯(x−n+1) expands as ∑k=0ns(n,k)xk
Compare: Unsigned c(n,k) vs. signed s(n,k)—both count the same permutations, but signed versions track parity. If a problem involves expanding falling factorials into standard powers, you need signed Stirling numbers; if you're just counting cycle structures, use unsigned.
Stirling Numbers of the Second Kind: Counting Partitions
The second kind counts set partitions. A partition divides elements into non-empty, non-overlapping groups where order within groups doesn't matter, and S(n,k) counts partitions of n elements into exactly k such subsets.
Definition and Recurrence
Denoted S(n,k) or {nk}—counts ways to partition an n-element set into exactly k non-empty subsets
Recurrence relation: S(n,k)=k⋅S(n−1,k)+S(n−1,k−1)—the new element either joins one of k existing subsets or forms a new singleton subset
Always non-negative integers with boundaries S(n,0)=0 for n>0, S(0,0)=1, and S(n,1)=S(n,n)=1
Combinatorial Interpretation
Models "balls into boxes" problems—specifically, n distinguishable objects into k indistinguishable non-empty groups
Multiply by k! for distinguishable boxes—the number of surjective functions from an n-set to a k-set is k!⋅S(n,k)
Connects to equivalence relations: each partition corresponds to an equivalence relation on the set, making S(n,k) fundamental to abstract algebra
Compare: First kind c(n,k) vs. second kind S(n,k)—first kind counts arrangements into cycles (order matters within cycles), second kind counts partitions into subsets (no internal order). Both recurrences have the same structure: new element either starts fresh or joins existing structure.
Generating Functions and Analytic Tools
Generating functions transform Stirling number sequences into algebraic objects, enabling powerful techniques for deriving identities and asymptotic behavior.
The factor (ex−1) represents "at least one element"—raising it to the kth power captures k non-empty subsets
Derives the explicit formula:S(n,k)=k!1∑j=0k(−1)k−j(jk)jn via inclusion-exclusion
Compare: The generating functions reveal deep structure—first kind uses ln(1−x) (connected to cycles via logarithm of permutation series), second kind uses (ex−1) (the exponential minus identity). Recognizing these forms helps you identify which Stirling numbers appear in unfamiliar generating function problems.
Connections to Other Combinatorial Objects
Stirling numbers don't exist in isolation—they're nodes in a network of combinatorial relationships that frequently appear on exams.
Bell Numbers
Definition:Bn=∑k=0nS(n,k) counts all partitions of an n-element set, regardless of number of parts
Exponential generating function:∑n=0∞Bnn!xn=eex−1, derived directly from the second kind's generating function
Bell triangle construction provides efficient computation similar to Pascal's triangle for binomial coefficients
Relationship to Binomial Coefficients
Conversion formulas exist between Stirling numbers and binomial coefficients via combinatorial identities
Powers to falling factorials:xn=∑k=0nS(n,k)xk uses second kind to convert between polynomial bases
Falling factorials to powers:xn=∑k=0ns(n,k)xk uses signed first kind for the inverse conversion
Compare: Bell numbers vs. individual S(n,k) values—Bell numbers sum over all possible partition sizes, losing information about how many subsets. If a problem asks about partitions into a specific number of groups, you need S(n,k); if it asks about all possible partitions, use Bn.
Asymptotic Analysis and Applications
Stirling's Approximation
The famous formula:n!∼2πn(en)n provides asymptotic estimates for factorials
Named connection but distinct concept—Stirling's approximation relates to Stirling the mathematician, not directly to Stirling numbers
Useful for analyzing growth rates of expressions involving Stirling numbers when n becomes large
Applications in Partition Theory
Algorithm analysis: counting ways to distribute tasks among processors or hash table collision analysis
Statistical mechanics: partition functions and state counting in physical systems
Symmetric function theory: Stirling numbers appear as coefficients when changing between polynomial bases in the ring of symmetric functions
Quick Reference Table
Concept
Best Examples
Counting permutations by cycles
c(n,k), unsigned first kind
Counting set partitions
S(n,k), second kind
Signed permutation counting
s(n,k), signed first kind
Total partition count
Bell numbers Bn=∑kS(n,k)
Falling factorial expansion
xn=∑ks(n,k)xk
Power to falling factorial
xn=∑kS(n,k)xk
Surjective function count
k!⋅S(n,k)
EGF for second kind
k!(ex−1)k
Self-Check Questions
A permutation of 5 elements has exactly 2 cycles. Which Stirling number counts how many such permutations exist, and what recurrence would you use to compute it?
Compare and contrast: Why does the recurrence for c(n,k) have a factor of (n−1) while the recurrence for S(n,k) has a factor of k? What combinatorial action does each factor represent?
If you need to count the number of ways to assign 6 distinct tasks to 3 distinct teams (each team must have at least one task), which expression gives the answer: S(6,3), 3!⋅S(6,3), or c(6,3)?
The generating function 4!(ex−1)4 is the EGF for which sequence? How would you extract the coefficient of 7!x7?
Explain why Bn>S(n,k) for any fixed k<n, and describe a problem where you'd need Bn instead of individual Stirling numbers of the second kind.