Attempt these before you open a book or a video. Write the argument in the work box and the conclusion in the answer box. Check counts the problem only when both pass, and it does not open the solution. The solution stays locked for twenty minutes after you start the timer.
Attack 1
How many ways can you choose 2 elements from a set of \(n\)? Derive the formula, do not quote it.
Timer not started. Twenty minutes of real work before a solution.
There are \(n(n-1)\) ordered pairs of distinct elements, and each unordered pair was counted twice, so \(\binom{n}{2}=n(n-1)/2\).
Attack 2
Prove the handshake lemma: the sum of degrees in a graph is twice the number of edges.
Timer not started. Twenty minutes of real work before a solution.
Count the set of pairs \((v,e)\) with \(v\) incident to \(e\) in two ways. Summing degrees counts each edge twice, once at each end.
Attack 3
Use inclusion–exclusion to count the integers from 1 to 100 that are divisible by 2 or 3 or 5.
Timer not started. Twenty minutes of real work before a solution.
Combinatorics on this page means counting, bijections, generating functions, and the first graph-theoretic facts you need in order to not be helpless on an olympiad or a Putnam A1. The binomial theorem, inclusion–exclusion, pigeonhole, and recurrence relations are the whole elementary theory. Ordinary generating functions turn linear recurrences into algebra. A graph is a set of vertices and edges; trees, bipartite graphs, and the handshake lemma are the part you must be able to prove in a paragraph.
Lehman, Leighton, and Meyer’s Mathematics for Computer Science is free and contains a serious counting and graph section. It is the working text. Wilf’s generatingfunctionology is the right specialized book; the Penn URL that used to host it did not return a stable copy in this check, so it is not linked. Use the generating-function chapters of the MIT notes instead. AIME and Putnam counting problems are the ceiling.
A counting argument that does not say what is being counted, and in what order, is a guess with binomial coefficients glued on.
Core results
Statements only. Write the argument before you reveal it. A revealed proof you did not attempt is a paragraph you will not be able to rebuild at 2am.
Binomial theorem. \((x+y)^n=\sum_{k=0}^n\binom{n}{k}x^{n-k}y^k\). Pascal’s recurrence \(\binom{n}{k}=\binom{n-1}{k}+\binom{n-1}{k-1}\) has a bijective proof.
The binomial theorem is the distributive law: each term picks \(x\) or \(y\) from each factor. Pascal: a \(k\)-subset of an \(n\)-set either contains a distinguished element or it does not.
Inclusion–exclusion and pigeonhole. The size of a union is the alternating sum of the sizes of intersections. If more than \(kn\) pigeons sit in \(n\) holes, some hole has at least \(k+1\) pigeons.
Inclusion–exclusion is induction on the number of sets, or an indicator-function identity: \(\prod(1-1_{A_i})\) expands to the alternating sum. Pigeonhole is the contrapositive of “\(k\) per hole gives at most \(kn\).”
Recurrences and generating functions. The ordinary generating function of a sequence turns a linear recurrence into a rational function. The Fibonacci generating function is \(x/(1-x-x^2)\). Partial fractions extract coefficients.
Multiply the recurrence by \(x^n\) and sum. The initial conditions fix the numerator. Partial fractions and the geometric series give the Binet-style closed form if you want it; the generating function is already the answer for many problems.
Graphs. Handshake lemma. A tree on \(n\) vertices has \(n-1\) edges and is connected and acyclic; any two of those properties imply the third, among the usual list. A graph is bipartite if and only if it has no odd cycle.
A tree has a leaf; delete it and induct to get \(n-1\) edges. Bipartite: color by distance from a vertex on each component; an odd cycle makes the color inconsistent. Conversely an odd cycle cannot be 2-colored.
Double counting. If you count a set of pairs in two ways, you get an identity. This is the source of the handshake lemma, of \(\sum k\binom{n}{k}=n2^{n-1}\), and of most olympiad counting proofs that look like magic.
The identity \(\sum k\binom{n}{k}=n2^{n-1}\) counts pairs \((x,S)\) with \(x\in S\subseteq\{1,\ldots,n\}\): choose the distinguished element first, or choose the set and then the element.
The ladder
Four rungs, in order. Do not skip a rung because the next one looks more serious.
Mathematics for Computer Science, Lehman, Leighton, Meyer Free. The counting, induction, and graph chapters are the main text. Better than a paid combinatorics survey you will not finish, because the problems are inline and the book is complete.
Tier 2 / Hard problems
The problem book.
AIME counting problems The hard-problem layer. Filter by combinatorics using the AoPS index or Po-Shen Loh: https://live.poshenloh.com/
Tier 3 / The ceiling
The hardest questions that exist at this level.
Putnam combinatorics, Borisov’s list The ceiling at this level. Generatingfunctionology is the right extra book if you find a legal copy you can verify yourself; a stable free URL was not confirmed here.
Hardest questions
Names and links. The problem text stays on the source site. Copyrighted contest problems are not copied here. What follows is where they are and why they hurt.
Pass: handshake lemma, binomial theorem, and inclusion–exclusion for three sets, from memory, plus five AIME counting problems numbered 8 or higher and two Putnam combinatorics problems with full proofs. Fail if a count does not name the set being counted.
Diagrams
Four vertices, three edges, connected, no cycle. Any two of those force the third, in the usual theorem.
Escalating sets
Five sets. Finish a set before you touch the next. Full sentences, not a circled answer.
Set 1. Counts
Derive \(\binom{n}{2}\).
Pascal’s identity, bijectively.
Binomial theorem for \(n=3\), expanded by hand, then the general proof.
How many subsets does an \(n\)-set have? Two proofs.
\(\sum k\binom{n}{k}=n2^{n-1}\), by double counting.
Set 2. Inclusion and pigeons
Integers from 1 to 100 divisible by 2, 3, or 5.
Derangements of 3 items, by inclusion–exclusion.
Pigeonhole: among 5 integers, two have the same remainder mod 4.
Five points in a square of side 1; two are at most \(\sqrt{2}/2\) apart. Prove it.
State inclusion–exclusion for three sets from memory.
Set 3. Recurrences
Fibonacci recurrence, first ten terms, and the generating function.
Number of binary strings of length \(n\) with no two consecutive 1s. Find the recurrence.
Solve \(a_n=3a_{n-1}\), \(a_0=2\).
A linear recurrence of order 2, characteristic polynomial, one example.
Partial fractions of \(x/(1-x-x^2)\), as far as you are willing to go.
Set 4. Graphs
Handshake lemma.
A tree has \(n-1\) edges.
Prove bipartite iff no odd cycle.
Draw a connected graph with exactly one cycle and count its edges.
Euler’s formula \(V-E+F=2\) for a connected plane graph, proved by induction or clearly cited as not yet proved.
Set 5. Ceiling
Five AIME counting problems.
Two Putnam combinatorics proofs.
Generating function of the no-consecutive-1s strings.
Oral handshake lemma.
One double-counting identity you invent and then prove.
Return bank
Ten problems to meet again. Logging a writeup schedules them at 1 day, 7 days, and 30 days in this browser.
\(\binom{n}{2}\) derived.
Handshake lemma.
Inclusion–exclusion, 2, 3, 5 up to 100.
Pascal’s identity.
Fibonacci generating function.
No two consecutive ones.
Bipartite iff no odd cycle.
Tree edge count.
\(\sum k\binom{n}{k}\).
One Putnam counting problem.
Oral pass
Derive the binomial coefficient, prove the handshake lemma, and state inclusion–exclusion for three sets. No notes.