Counting is pairing: two finite collections have the same size when their elements can be matched one-to-one (Section 7). Every basic method of combinatorics is one of the primitives used to build or compare such matchings.
The primitives at work.
Joining and substituting give the sum and product rules.
Idempotents give indicator functions; expanding a product of complementary idempotents is inclusion–exclusion, and partitions of a set are partitions of the identity.
Involutions that reverse signs cancel everything except their fixed points: the reflection principle, alternating sums, and Euler’s pentagonal theorem.
Order with closure gives the incidence algebra and Möbius inversion.
The averaging idempotent counts orbits (Burnside).
Positivity of expectation proves existence without construction.
Size. \(|X|=|Y|\) when \(X\) and \(Y\) can be paired. Writing \([n]\) for a row of \(n\) marks, \(|X|=n\) means \(X\) pairs with \([n]\).
Pigeonhole. A finite row cannot be paired with a proper part of itself. Hence, if \(|X|>|Y|\), every map \(X\to Y\) sends two elements to the same place.
Bijective proof. To show two counts agree, exhibit a pairing between the collections they count.
Sum rule. For disjoint \(X,Y\), \(|X\sqcup Y|=|X|+|Y|\): the pairing for \(X\sqcup Y\) joins those for \(X\) and for \(Y\).
Product rule. \(|X\times Y|=|X|\cdot |Y|\): replacing each element of \(Y\) by a copy of \(X\) is substitution, which is multiplication.
Consequences.
| Count | Value |
| maps \([k]\to [n]\) | \(n^k\) |
| injective maps \([k]\to [n]\) | \(n(n-1)\cdots (n-k+1)\) |
| permutations of \([n]\) | \(n!\) |
| subsets of \([n]\) | \(2^n\) |
| \(k\)-subsets of \([n]\) | \(\binom nk=\dfrac {n!}{k!\,(n-k)!}\) |
The last entry divides the injective maps by the \(k!\) orders of the same set.
Pascal and the binomial theorem. A \(k\)-subset of \([n]\) either omits \(n\) or contains it:
Method. Count a set of pairs \(R\subseteq X\times Y\) through each projection:
Example. For a graph, counting (vertex, incident edge) pairs gives
Indicators. For \(A\subseteq X\), the indicator \(1_A\) is idempotent, and \(1-1_A\) is the indicator of the complement.
The formula. The points lying in none of \(A_1,\ldots ,A_n\) have indicator
Derangements. Permutations of \([n]\) with no fixed point: with \(A_i\) the permutations fixing \(i\), \(|A_S|=(n-|S|)!\), so
Correspondence. A partition of \([n]\) into blocks \(B_1,\ldots ,B_k\) is a family of orthogonal idempotents summing to \(1\):
Stirling numbers of the second kind. \(S(n,k)\), the number of partitions into \(k\) blocks, satisfies
Surjections. The number of surjections \([n]\to [k]\) is \(k!\,S(n,k)\), and by inclusion–exclusion
Principle. Let \(X\) be finite with signs \(\varepsilon :X\to \{\pm 1\}\) and an involution \(\iota \) (\(\iota ^2=\mathrm {id}\)) that reverses the sign of every non-fixed point. Non-fixed points cancel in pairs, so
Alternating binomial sum. On subsets of \([n]\), \(n\ge 1\), with sign \((-1)^{|S|}\), toggling the element \(1\) is a sign-reversing involution with no fixed points:
Reflection principle and Catalan numbers. Paths of \(n\) up-steps and \(n\) down-steps from height \(0\) number \(\binom {2n}n\). A path that dips below \(0\) is reflected after its first visit to \(-1\); this is a pairing between bad paths and all paths ending at \(-2\), which number \(\binom {2n}{n+1}\). The paths that stay at or above \(0\) number
Euler’s pentagonal theorem.
Incidence algebra. For a finite order \((P,\le )\), the incidence algebra consists of functions on intervals \(\{(x,y):x\le y\}\) with convolution
Inversion.
Cases.
| Order | \(\mu \) | Inversion becomes |
| subsets by inclusion | \((-1)^{|T\setminus S|}\) | inclusion–exclusion |
| divisibility on \(\mathbb N\) | classical \(\mu (n)\) | number-theoretic Möbius inversion |
| a chain | \(\mu =1,-1\) on steps | finite differences |
On a chain, inversion is the telescoping identity of Subsection 349.1.
Burnside. For a finite group \(G\) acting on a finite set \(X\),
Necklaces. Necklaces of \(n\) beads in \(k\) colours, up to rotation:
Method. A sequence is encoded as \(\sum a_nx^n\). Joining corresponds to adding series, and pairing structures side by side corresponds to multiplying them.
Fibonacci. Tilings of a strip of length \(n\) by pieces of length \(1\) and \(2\) satisfy \(f_n=f_{n-1}+f_{n-2}\), so
Integer partitions.
Distinct parts and odd parts.
Hall’s theorem. A bipartite graph on \(X\sqcup Y\) has a matching covering \(X\) if and only if
if every nonempty proper \(S\) has \(|N(S)|>|S|\), match one edge and recurse;
otherwise some \(S\) is tight, \(|N(S)|=|S|\); match \(S\) into \(N(S)\) and the rest of \(X\) into the rest of \(Y\), both of which satisfy the condition.
Ramsey. Every red–blue colouring of the edges of \(K_6\) contains a one-coloured triangle. A vertex has \(5\) edges, three of one colour, say red. Among their three far ends, a red edge closes a red triangle, and no red edge leaves a blue triangle. \(K_5\) coloured as a red pentagon with blue diagonals has none, so \(R(3,3)=6\).
Principle. If a random object has \(\mathbb E[N]<1\) for a nonnegative integer count \(N\), then some object has \(N=0\): a quantity whose average is below \(1\) is \(0\) somewhere.
Lower bound for Ramsey numbers. Colour the edges of \(K_n\) independently and uniformly. The expected number of one-coloured \(K_k\) is
| Method | Example | Primitive |
| bijection | equal counts | pairing |
| pigeonhole | two in one place | no pairing into a proper part |
| sum and product rules | \(n^k\), \(n!\), \(\binom nk\) | joining, substituting |
| double counting | \(\sum \deg =2|E|\) | two projections |
| inclusion–exclusion | \(D_n/n!\to 1/e\) | product of \(1-1_{A_i}\) |
| set partitions | \(S(n,k)\), Bell numbers | partitions of \(1\) |
| sign-reversing involution | Catalan, pentagonal theorem | involution |
| Möbius inversion | inclusion–exclusion, \(\mu (n)\), differences | order, closure |
| Burnside | necklaces | averaging idempotent |
| generating functions | Fibonacci, partitions | joining as products |
| Hall, Ramsey | matchings, monochromatic triangles | pairing |
| probabilistic method | \(R(k,k)>2^{k/2}\) | positivity of expectation |