Combinatorics Created 2026-09-24 Updated 2026-10-13
Combinatorics studies discrete structures through counting, construction, and extremal questions. Its objects include subsets, permutations, graphs, and set partitions. The question is often easy to ask: how many teams can we choose, how many arrangements avoid a collision, or how few connections are enough? The challenge is to organize the possibilities so that every permitted object is counted exactly as intended.
For example, choosing two people from five gives ten teams. Choosing a captain and deputy from those same five gives twenty assignments. The difference is whether order is part of the object: a team is a subset, while the two named roles distinguish an ordered pair. The binomial coefficient and the rule of product encode these two counting problems. Choosing the right objects comes before manipulating a formula.
The beauty is that a change of viewpoint can turn enumeration into an explanation. Double counting connects two descriptions of one collection; Pascal's identity splits a selection into cases; the inclusion-exclusion principle repairs overlapping counts. These methods also supply exact finite models for probability and help measure the possibilities an algorithm must handle. Richard Stanley's textbook introduces the subject through counting questions and then develops these general tools. [ref]
Ferrers diagram 2026-10-14
A Ferrers diagram of an integer partition is a left-aligned array of dots with dots in row , using the longest row at the top here. Replacing each dot by a square cell gives a Young diagram. Reading the column lengths gives the conjugate partition.[ref]
Enumerative Combinatorics, Volume 1 (second-edition draft) by Richard Stanley. section 1.7, Ferrers and Young diagrams
Gaussian binomial coefficient 2026-10-13
A Gaussian binomial coefficient refines an ordinary binomial coefficient into a polynomial that remembers a size statistic. For nonnegative integers and , writeThe product represents a polynomial; it is not an instruction to divide by zero when or a denominator vanishes. The Gaussian binomial coefficient recurrence gives a way to compute it with only addition and multiplication. The empty product for is one, and as well. Setting after obtaining the polynomial recovers .
For example,At this gives six objects, but its coefficients reveal how those six objects are distributed across sizes : there are two of size two and one of each other size. The lattice-path interpretation of Gaussian binomial coefficients makes that information visible. Take unit steps north or east from to . A north step at horizontal coordinate contributes shaded cells to its left. The six step words have total shaded areas .
This is useful because an aggregate count can hide the feature one actually wants. A generating function retains the distribution of a statistic, so coefficient extraction answers questions such as “how many allowed diagrams contain exactly two cells?” The partition interpretation of Gaussian binomial coefficients makes every coefficient a nonnegative integer without relying on cancellation in the product formula.
An unexpected second use comes from linear algebra. If is a prime power, the value counts the -dimensional vector subspaces of . Thus the same expression that counts six paths at counts 35 two-dimensional subspaces of at . The Gaussian binomial coefficient counts finite-field subspaces article explains why selecting a vector subspace differs from selecting a subset of coordinates. [ref]
This relationship illustrates a q-analogue: the parameter can encode a statistic in one interpretation and the size of a finite field in another. Here denotes the formal variable, while denotes a finite field's cardinality when we evaluate the polynomial. The interpretation using a finite field requires to be a prime power; evaluating the polynomial at an arbitrary number does not construct a field of that size.
For a prime power and , count ordered lists of linearly independent vectors in . The first has choices. After independent choices, their linear span contains vectors, so the next has choices. Every -dimensional vector subspace has exactly ordered bases. Dividing the list count by this common multiplicity givesThe notation refers to the Grassmannian, here considered simply as the finite collection of these vector subspaces.[ref]
For , there are ordered independent pairs. Each two-dimensional vector subspace has ordered bases, leaving vector subspaces. There are only coordinate-selected vector subspaces; most of the 35 also contain vectors combining coordinates.
A unique reduced row echelon form gives another count. Its six possible pivot-column patterns have freely chosen entries. Each free entry lies in , giving vector subspaces, respectively. The diagram fixes the zero entries required to make each pivot the first nonzero entry in its row and the only nonzero entry in its column. Different choices describe different row spaces.
Integer partition Created 2026-09-28 Updated 2026-10-14
An integer partition of a nonnegative integer is a multiset of positive integers whose sum is : repetitions matter, but the order of the summands does not. Equivalently, write its parts in decreasing order, allowing equality:The notation says that is an integer partition of . The partition count counts all integer partitions of , with any number of parts. Zero has one empty integer partition, so . The partition of an integer article develops the same objects in representation theory of the symmetric group.[ref]
Enumerative Combinatorics, Volume 1 (second-edition draft) by Richard Stanley. section 1.7, definitions of partitions and diagrams
Computed example. The seven integer partitions of five are exactlyThus . Sorting each list of positive summands into decreasing order prevents repetitions in this enumeration. Grouping by largest part verifies completeness: largest parts contribute respectively possibilities. For largest part , the remaining is either or ; for largest part , the remaining uses only and , giving or .
All seven integer partitions of five, drawn as Ferrers diagrams: each row has as many dots as its part
. Details. An integer partition keeps sizes without named positions. The compositions of an integer and are different tuples, but sorting either gives the same integer partition . A weak composition of an integer also retains its empty first position; dropping its zero and sorting gives that same integer partition. Conversely, a set partition records which distinct elements belong to each block. For example, the set partitions and differ even though both have the same integer partition of block sizes.
The Ferrers diagram makes an integer partition into a shape. For , the column lengths are : exchanging rows and columns gives its conjugate partition . Exchanging again recovers , so this operation is a bijection. In particular, the three integer partitions of five with at most two parts are , , and ; their conjugate partitions , , and are precisely the three with largest part at most two. This visible symmetry explains the equal counts for these two restrictions. The square-cell version is the existing Young diagram.
Counting by a generating function. An integer partition is determined by its multiplicities , the number of parts equal to . Its size condition is . Consequently its ordinary generating function isProof outline. Choose the term from the th geometric series. The product contributes exactly when those multiplicities describe an integer partition of , once for each such integer partition. As a formal power series, each coefficient is determined by finitely many factors: factors with contribute only their constant term to the coefficient of . For , multiplication through gives up to degree five, independently recovering . Restricting the factors gives the generating function for partitions with bounded parts. This is useful because restrictions on summands become choices of factors, while conjugate partitions turn restrictions on numbers of rows into restrictions on row lengths.[ref]
Enumerative Combinatorics, Volume 1 (second-edition draft) by Richard Stanley. section 1.8, conjugation and partition generating functions
The Young diagrams of partitions in a rectangle with at most rows and at most cells in each row correspond to the lattice paths in the lattice-path interpretation of Gaussian binomial coefficients. Read the shaded row lengths from top to bottom; the result is a nonincreasing list of nonnegative integers. This bijection preserves the number of cells.
In a two-by-two rectangle, the possibilities are the empty integer partition, , , , , and . Their sizes are , giving . In particular, there are two allowed diagrams of size two, explaining the middle coefficient.[ref]
Set partition Created 2026-09-24 Updated 2026-10-13
A set partition of a finite set is a set of nonempty subsets, called blocks of a set partition, withThus every set element of belongs to exactly one block of a set partition. This is the finite counting version of a partition of a set. The blocks of a set partition are unlabelled: their subscripts help describe them, but give them no roles or order. Stanley uses this definition in his classification of counting problems.[ref]
Enumerative Combinatorics, Volume 1 (second-edition draft) by Richard Stanley. section 1.9: set partitions and their blocks
All possibilities for three elements. The set has exactly five set partitions:For two blocks of a set partition, one must have size two and the other size one; the three choices of the lone element give the middle row. One block of a set partition forces the whole set, and three blocks of a set partition force three singleton sets. This proves the enumeration complete, with counts by number of blocks of a set partition. Their sum is the Bell number .
Exact enumeration of the five set partitions of : outlines show blocks of a set partition, whose positions and colours carry no labels
. Details. What information is kept? Exchanging the two blocks of a set partition in leaves the same set partition; writing the tuple instead makes an ordered list, different from . Exchanging elements within a block of a set partition also changes nothing. In contrast, is a different set partition, because the actual memberships differ. Both have the same integer partition of sizes. An integer partition, or its Ferrers diagram, forgets which distinct objects were grouped together.
For four named people, and therefore describe different ways of making two unnamed teams, although both have sizes . If every team must have exactly two people, only three set partitions qualify; if any nonempty team sizes are permitted, the Stirling number of the second kind counts them. Naming the teams changes the counting problem again.
A set partition is useful whenever membership matters but category names do not. Define when and belong to the same block of a set partition. This is an equivalence relation, and its equivalence classes recover the set partition. Conversely, an equivalence relation supplies its set partition of equivalence classes. The beautiful simplification is that one grouping can be described by whole subsets or by a rule comparing two elements. Additional distinctions are organized by refinement of a set partition.
The empty set has one set partition, the empty collection , with zero blocks of a set partition. This differs from , which is forbidden because its proposed block of a set partition is empty.
Stirling numbers of the second kind 2026-10-14
For nonnegative integers , the Stirling number of the second kindcounts the set partitions of an -element finite set into exactly unlabelled blocks of a set partition. Set , for , and for . Also for . Grassl and Levin develop these counts through explicit set partitions and a recurrence relation. [ref]
https://discrete.openmathbooks.org/more/mdm/sec_adv-partitions.html. Grassl and Levin, More Discrete Mathematics via Graph Theory, section 3.1: counting partitions
Insert one distinguished element. For and , the Stirling numbers of the second kind obeyProof outline. Inspect the block of a set partition containing . If it contains another element, removing leaves a set partition into blocks of a set partition; conversely, insert into any of those blocks of a set partition. If is alone, remove its singleton set and obtain a set partition into blocks of a set partition. The cases cannot overlap, and deletion reverses each construction. This explains the factor even though the blocks of a set partition have no names. [ref]
https://discrete.openmathbooks.org/more/mdm/sec_adv-stirling.html. Grassl and Levin, More Discrete Mathematics via Graph Theory, section 3.4: Stirling recurrence
For , start with the three two-block set partitions of . Inserting into either block of a set partition gives six possibilities. The remaining possibility is , obtained by making a singleton set. Hence . The seven set partitions in the diagram comprise four with sizes and three with sizes ; this grouping by sizes independently gives .
Exact construction of all seven two-block set partitions of : six insert into an existing block of a set partition, and one creates a singleton set
. Details. Three different counting questions. The binomial coefficient selects one -element subset. The Stirling number of the second kind groups all distinct elements into nonempty unnamed blocks of a set partition. The power counts all functions to a specified -element finite set, allowing some destination labels to go unused. At , these counts are respectively , , and . Choosing two people, making two unnamed nonempty teams, and assigning each person a red or blue label are different tasks.
When the destinations have labels. For fixed finite sets of sizes , respectively, the number of surjective functions isHere every element of must be used. Each surjective function gives a set partition of into its nonempty preimages . Conversely, assign the distinct destination labels to the blocks of a set partition in ways, where is a factorial. For two labelled teams of four people this gives : of the assignments, exactly two use only one label. Dividing arbitrary function counts by fails in general because unused labels can be permuted without changing a function. For example, cannot count set partitions. The empty-to-empty function is a surjection, consistent with . Stanley gives the bijection underlying this qualification.[ref]
For example, the inclusion-exclusion principle counts the surjections from four elements to three labelled destinations as . Thus . An independent check chooses the only two-element block of a set partition in ways; the other two elements form singleton sets.
Why these numbers also occur in algebra. Classifying all functions to an -element finite set by the size of their image givesFor a fixed set partition, the falling factorial counts assignments of distinct labels to its blocks of a set partition, and is zero when . At , this reads . Replacing by yields a polynomial identity: both sides agree at every nonnegative integer. Thus the Stirling numbers of the second kind translate powers into falling factorials. Grouping by equal values turns a counting rule into an algebraic change of coordinates. Summing without destination labels instead gives the Bell number.




