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=0nโs(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=0nโS(n,k) counts all partitions of an n-element set, regardless of number of parts
Exponential generating function:โn=0โโBnโn!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=0nโS(n,k)xkโ uses second kind to convert between polynomial bases
Falling factorials to powers:xnโ=โk=0nโs(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โ=โkโS(n,k)
Falling factorial expansion
xnโ=โkโs(n,k)xk
Power to falling factorial
xn=โkโS(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.