core27 min studyLesson 221 in Mathematics

Combinatorial classes and bijections

Specify finite structures precisely and prove equal counts by constructing reversible encodings.

On this page

What you’ll understand

  • Specify a graded class and its finite size layers.
  • Construct an encoding together with its inverse.
  • Distinguish bijections, many-to-one maps, and symmetry quotients.

A counting problem is a modeling problem before it is an arithmetic problem. A board with four sockets might distinguish left from right, permit empty sockets, and use two identical plugs. Changing any of those conventions changes the objects being counted. Enumerative combinatorics makes those conventions explicit, then looks for another description in which the same objects become easier to count. A reversible description is especially valuable: it explains the answer rather than merely reproducing a number.

Objects, size, and the empty structure

A graded combinatorial class is a collection split into size layers An\mathcal A_n, with finitely many objects in each layer. Size might mean the length of a word, the number of vertices of a tree, or the total weight of an integer partition. These are different statistics, so stating the size rule is essential. A class can be infinite overall while each counting problem remains finite. If infinitely many distinct zero-size decorations are allowed, however, even the zero layer is infinite and the ordinary counting setup breaks down.

An empty object often contributes one, rather than zero, to a count. There is exactly one empty binary word and exactly one way to choose no items. This convention makes product decompositions work at their boundaries. It does not require every class to contain an empty object: a class of nonempty words deliberately excludes one. Before writing a formula, specify whether labels matter, whether order matters, whether repetitions are allowed, and whether two drawings that differ only by rotation represent the same object.

an=∣An∣,A=⨆n≥0An,∣{empty word}∣=1a_n=|\mathcal A_n|,\qquad \mathcal A=\bigsqcup_{n\ge0}\mathcal A_n,\qquad |\{\text{empty word}\}|=1
The disjoint union records a unique size for each object. Finite layers make each coefficient an ordinary nonnegative integer.↔ Scroll wide equations horizontally.

A bijection requires a decoding rule

To count subsets of a set of numbered sockets, encode membership by a binary word: write one at exactly the occupied positions. The inverse sends a word to the set of positions carrying one. Checking these two procedures undo one another proves injectivity and surjectivity together. Merely writing down a plausible encoding is not enough. If two different objects produce the same code, information has been lost; if some proposed codes cannot occur, counting the full code space overcounts the objects.

A bijection can preserve a statistic as well as total size. Membership words preserve subset cardinality as the number of ones, so a fixed-cardinality count becomes a fixed-weight word count. Such a refinement explains an entire family of identities at once. A map that forgets order is usually many-to-one instead. Dividing by the number of orderings is justified only when every fiber has that same size; repeated entries or internal symmetries can make fiber sizes vary. The inverse test reveals exactly where an attempted shortcut fails.

ϕ:An⟶Bn,ψ∘ϕ=idAn,ϕ∘ψ=idBn⟹an=bn\phi:\mathcal A_n\longrightarrow\mathcal B_n,\quad \psi\circ\phi=\mathrm{id}_{\mathcal A_n},\quad\phi\circ\psi=\mathrm{id}_{\mathcal B_n}\quad\Longrightarrow\quad a_n=b_n
Two inverse identities prove that neither collisions nor missing codes occur. A size-preserving bijection yields equality separately in every layer.↔ Scroll wide equations horizontally.

Separating disjoint choices from paired choices

A disjoint alternative adds counts; an ordered pair of independent structural choices multiplies them. Here independent means that every allowed choice from the first set can be combined with every allowed choice from the second, not probabilistic independence. If a rule couples the choices, count compatible pairs instead. When total size is additive, split by the size of the first component before multiplying. This produces a convolution, because each total-size object belongs to exactly one size split.

For example, a word with one distinguished divider is equivalent to an ordered pair of words, obtained by cutting immediately before and after the divider. A word without a marked divider is different: several cuts may yield the same underlying word. Keeping the divider as part of the object restores unique decoding. This small example captures a general habit: whenever a product formula seems natural, identify the cut, mark, or canonical feature that lets a reader reconstruct its components uniquely.

cn=∑k=0nakbn−kc_n=\sum_{k=0}^{n}a_kb_{n-k}
A unique ordered decomposition into components of sizes k and n−k leads to a finite convolution, including any permitted empty components.↔ Scroll wide equations horizontally.

Four counters and two dividers

Count triples of nonnegative integers (u,v,w) whose sum is four by encoding each triple as a row of counters and two dividers.

  1. Write u counters, a divider, v counters, a divider, and w counters. Zero entries produce adjacent dividers or a divider at an endpoint, so no triple is excluded.

  2. Each encoding has six positions containing four identical counters and two identical dividers. Selecting the two divider positions determines the row, giving fifteen choices.

  3. Decode by counting counters in the three successive regions. The divider positions are recovered exactly, so the encoding is bijective. For example, divider positions one and four encode (0,2,2).

∣{(u,v,w)∈Z≥03:u+v+w=4}∣=(62)=15|\{(u,v,w)\in\mathbb Z_{\ge0}^3:u+v+w=4\}|=\binom{6}{2}=15
The positions are distinguishable even though counters of the same kind are not.↔ Scroll wide equations horizontally.
The result

There are fifteen triples. The endpoint and adjacent-divider cases are necessary because the variables are nonnegative, not strictly positive.

Explore the model

Interactive lab

Interactive lab · probability

Subsets as binary codes

Pause and Reset, then set p=0.5 and n=4. Predict the mass at two successes by counting two-element subsets of four positions. Compare the bar with six divided by sixteen. The bars are exact binomial masses, and Play only highlights outcomes.

Subsets as binary codesThese are exact binomial probabilities for independent trials with one fixed success probability. Playback tours the distribution; it does not resample outcomes. Current readings: Mean · np: 5; Variance · np(1−p): 2.5; Total probability: 1. All parameters are adjustable with the labeled controls below.03581000.070.150.220.3Successes kP(X = k)k = 0 · P = 9.77e-4
Exact probabilityHighlighted outcomeMean np
Mean · np
5
Variance · np(1−p)
2.5
Total probability
1
t = 0 s

These are exact binomial probabilities for independent trials with one fixed success probability. Playback tours the distribution; it does not resample outcomes. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.

Look forThe mass is 0.375: six of the sixteen equally likely membership words have weight two. This instrument groups words by weight; it does not display their individual encodings.

Check your understanding

An encoding sends two different colored arrangements to the same uncolored word. What has failed?

Try it yourself

Count triples of strictly positive integers summing to seven, using a reversible transformation to nonnegative triples.

Take a moment to make a prediction or work it out on paper. Open a hint when you need one.

Give me a hint

Remove one unit from each coordinate before choosing divider positions.

Compare with the solution

Subtracting one from each coordinate gives a nonnegative triple summing to four. Conversely add one to each coordinate to recover a unique positive triple summing to seven. The worked encoding therefore gives fifteen solutions. Using seven counters with dividers at arbitrary positions would incorrectly permit zero coordinates.

Take it with you

  • A counting model specifies size, order, labels, repetition, and equivalence.
  • An explicit inverse is the most direct check of a proposed bijection.
  • Product counting needs a uniquely recoverable decomposition.

Read further

Original sources and deeper explanations to follow at your own pace.

Optional progress, saved in this browser when available. Revisit any lesson at any time.

Lesson not marked complete.