💁🏽Algebraic Combinatorics
Stirling Numbers
Study smarter with Fiveable
Get study guides, practice questions, and cheatsheets for all your subjects. Join 500,000+ students with a 96% pass rate.
Why This Matters
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 tells you exactly how many permutations of elements have exactly cycles.
Unsigned Stirling Numbers of the First Kind
- Denoted or —counts permutations of elements with exactly disjoint cycles
- Recurrence relation: —the new element either forms its own 1-cycle or inserts into one of positions in existing cycles
- Boundary conditions: for , , and since the identity permutation has fixed points
Signed Stirling Numbers of the First Kind
- Denoted with lowercase—these incorporate the sign based on permutation parity
- Relationship to unsigned version: , connecting cycle count to even/odd permutation classification
- Appears in polynomial expansions: the falling factorial expands as
Compare: Unsigned vs. signed —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 counts partitions of elements into exactly such subsets.
Definition and Recurrence
- Denoted or —counts ways to partition an -element set into exactly non-empty subsets
- Recurrence relation: —the new element either joins one of existing subsets or forms a new singleton subset
- Always non-negative integers with boundaries for , , and
Combinatorial Interpretation
- Models "balls into boxes" problems—specifically, distinguishable objects into indistinguishable non-empty groups
- Multiply by for distinguishable boxes—the number of surjective functions from an -set to a -set is
- Connects to equivalence relations: each partition corresponds to an equivalence relation on the set, making fundamental to abstract algebra
Compare: First kind vs. second kind —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.
Generating Function for First Kind
- Exponential generating function:
- Ordinary generating function form: connects to rising/falling factorial expansions in polynomial bases
- Useful for extracting coefficients and proving identities involving factorials and cycle counts
Generating Function for Second Kind
- Exponential generating function:
- The factor represents "at least one element"—raising it to the th power captures non-empty subsets
- Derives the explicit formula: via inclusion-exclusion
Compare: The generating functions reveal deep structure—first kind uses (connected to cycles via logarithm of permutation series), second kind uses (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: counts all partitions of an -element set, regardless of number of parts
- Exponential generating function: , 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: uses second kind to convert between polynomial bases
- Falling factorials to powers: uses signed first kind for the inverse conversion
Compare: Bell numbers vs. individual 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 ; if it asks about all possible partitions, use .
Asymptotic Analysis and Applications
Stirling's Approximation
- The famous formula: 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 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 | , unsigned first kind |
| Counting set partitions | , second kind |
| Signed permutation counting | , signed first kind |
| Total partition count | Bell numbers |
| Falling factorial expansion | |
| Power to falling factorial | |
| Surjective function count | |
| EGF for second kind |
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 have a factor of while the recurrence for has a factor of ? 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: , , or ?
-
The generating function is the EGF for which sequence? How would you extract the coefficient of ?
-
Explain why for any fixed , and describe a problem where you'd need instead of individual Stirling numbers of the second kind.