Key Theorems
The key results and definitions of the masterclass, collected unit by unit as statements and formulas. Each one is proved or built in its unit, with worked examples on graphs you can redraw by hand.
Graph theory has a short list of definitions and results that do most of the work. The handshake lemma \(\sum_v \deg(v) = 2|E|\), Euler's theorem on tours, Cayley's formula \(n^{n-2}\), Hall's condition, Euler's formula \(v - e + f = 2\) with its consequence \(e \le 3v - 6\), the greedy bound \(\chi \le \Delta + 1\), the max-flow min-cut theorem, Turán's bound, and the Erdős and Szekeres bound \(R(s,t) \le \binom{s+t-2}{s-1}\) return in unit after unit, and a participant who can state each of them with its hypotheses has the subject in hand. This page collects those statements, in the order of the units. Definitions count as entries here: what a graph is, what a tree is, what a matching is, what a planar graph is, what the chromatic number is, what \(G(n,p)\) and \(R(s,t)\) mean are stated as carefully as the theorems that use them, because in this subject half of the results are stated in words and the words have to be exact.
Each card repeats a Key Result box of its unit: the title, the statement, and the one sentence of conditions under which it holds, such as connected for Euler's theorem and Euler's formula, simple for the edge count of \(K_n\), non-negative weights for Dijkstra's algorithm, or \(n \ge 3\) for Dirac's theorem. The proof, the worked example, and the history stay in the unit, which each card links to. Named theorems appear here in their compact form; their full statements and proofs are in the Theorem and Proof boxes of the units. The page grows as units are published, so a result you cannot find yet belongs to a unit that is still to come.
The quizzes and the final exam are open book, and this page is the sheet to have open while you take them. It is also the sheet to read again before an olympiad or an examination: if a line here looks unfamiliar, the unit it names is the one to reread.
The Language of Graphs
Definition of a graph
A graph is a pair \(G = (V, E)\) of a finite set \(V\) of vertices and a set \(E\) of edges, each edge being a two-element subset \(\{u, v\}\) of \(V\), written \(uv\). The number of vertices is \(n = |V|\) and the number of edges is \(m = |E|\). Graphs in this program are finite and simple: an edge never joins a vertex to itself, and two vertices are joined by at most one edge.
The handshake lemma and the odd vertices
\[ \sum_{v \in V} \deg(v) = 2m , \qquad \text{so the number of odd vertices is even.} \] The degrees of any graph add up to twice the number of edges, and in every graph the number of vertices of odd degree is even. In particular no graph has exactly one vertex of odd degree.
Edge counts of the standard graphs
\[ e(K_n) = \binom{n}{2} = \frac{n(n-1)}{2} , \quad e(K_{s,t}) = st , \quad e(C_n) = n , \quad e(P_n) = n - 1 , \quad e(Q_n) = n\,2^{n-1} , \] where \(e(G)\) denotes the number of edges of \(G\). There are \(2^{\binom{n}{2}}\) labelled graphs on a given set of \(n\) vertices, one for each subset of the edges of \(K_n\). The cycle \(C_n\) needs \(n \ge 3\), and \(P_n\) has \(n\) vertices and \(n - 1\) edges.
Isomorphism and invariants
Two graphs \(G\) and \(H\) are isomorphic, written \(G \cong H\), when there is a bijection \(f : V(G) \to V(H)\) such that for all vertices \(u\) and \(v\) of \(G\) \[ uv \in E(G) \quad \text{if and only if} \quad f(u) f(v) \in E(H) . \] Such an \(f\) is an isomorphism. Isomorphic graphs have the same number of vertices, the same number of edges, the same degree sequence, the same number of triangles, and the same girth; every quantity that does not depend on the names of the vertices is an invariant, and two graphs that differ in an invariant are not isomorphic. Agreement in all the invariants one has checked does not prove isomorphism.
Two vertices of equal degree
In every graph with at least two vertices, some two vertices have the same degree. The statement holds for every finite simple graph on \(n \ge 2\) vertices, with no condition on the edges.
The longest path lemma
Let \(G\) be a graph with minimum degree \(\delta(G) \ge k\), where \(k \ge 1\). Then \(G\) contains a path of length \(k\), that is, a copy of \(P_{k+1}\). If \(k \ge 2\), then \(G\) also contains a cycle of length at least \(k + 1\). In particular, every graph in which every vertex has at least two neighbours contains a cycle. The lemma needs \(G\) to be finite; its proof chooses a longest path, which an infinite graph need not have.
Paths, Distance, and Shortest Routes
Walk, trail, path, and cycle
A walk is a sequence of vertices \(v_0, v_1, \ldots, v_k\) with \(v_{i-1} v_i \in E\) for every \(i\), and its length is \(k\). A trail uses no edge twice, a path visits no vertex twice, and a cycle is a closed walk \(v_0, \ldots, v_k = v_0\) with \(k \ge 3\) whose vertices \(v_0, \ldots, v_{k-1}\) are all different. Every path is a trail and every trail is a walk; the converses are false, that is, a walk need not be a trail and a trail need not be a path.
The walk-to-path lemma
If a graph contains a walk from \(u\) to \(v\), then it contains a path from \(u\) to \(v\), and a shortest walk from \(u\) to \(v\) is already a path. It holds for \(u = v\) as well, with a path of length 0.
Edges of a connected graph
A connected graph on \(n\) vertices has at least \(n - 1\) edges. More generally, a graph on \(n\) vertices with \(m\) edges has at least \(n - m\) components. Both bounds hold for every finite simple graph; the first is attained exactly by the trees of Unit 4.
Distance and the triangle inequality
The distance \(d(u, v)\) is the length of a shortest path from \(u\) to \(v\), and \(\infty\) when there is none. For all vertices \(u\), \(v\), and \(w\) of a graph, \[ d(u, w) \le d(u, v) + d(v, w) , \] the triangle inequality, because a shortest walk from \(u\) to \(v\) followed by one from \(v\) to \(w\) is a walk from \(u\) to \(w\) of that length, and the shortest walk cannot be longer. The distance is symmetric, \(d(u, v) = d(v, u)\), and it is 0 only for \(u = v\).
Euler Tours and Hamilton Cycles
Multigraphs, trails, and Euler tours
A multigraph may have parallel edges and loops; a loop adds 2 to the degree of its vertex. A trail is a walk that uses no edge twice, and a closed trail ends where it started. An Euler trail of a multigraph is a trail that uses every edge exactly once, and an Euler tour is a closed Euler trail. A multigraph with an Euler tour is called Eulerian.
Fleury’s rule
To trace an Euler tour or an Euler trail of a connected multigraph in one walk:
- Start at an odd vertex if there are two, and at any vertex if there are none.
- At the current vertex, choose an unused edge and walk along it. Choose a cut edge of the unused part of the multigraph only if no other unused edge is available at the current vertex.
- Stop when no unused edge is available at the current vertex. The walk then uses every edge.
Hamilton paths and Hamilton cycles
A Hamilton path of \(G\) is a path with vertex set \(V(G)\), and a Hamilton cycle of \(G\) is a cycle with vertex set \(V(G)\). A graph with \(n \ge 3\) vertices is Hamiltonian if it has a Hamilton cycle; the condition \(n \ge 3\) is there because a cycle needs at least three vertices. Every Hamiltonian graph has a Hamilton path, obtained by deleting one edge of the cycle, but a graph with a Hamilton path need not be Hamiltonian.
The bipartite obstruction
Let \(G\) be a bipartite graph with sides \(X\) and \(Y\). If \(|X| \ne |Y|\), then \(G\) has no Hamilton cycle, and if \(|X|\) and \(|Y|\) differ by more than 1, then \(G\) has no Hamilton path either.
The hypercube has a Hamilton cycle
For every \(n \ge 2\) the hypercube \(Q_n\) has a Hamilton cycle. One is given by the reflected Gray code: list the words of length \(n - 1\) in Gray code order, write the list once forward with a 0 in front of each word and once backward with a 1 in front of each word, and join the two lists.
Trees and Spanning Trees
Tree, forest, and leaf
A forest is a graph without a cycle, and a tree is a connected graph without a cycle. The components of a forest are trees. A leaf is a vertex of degree 1. A single vertex is a tree, the path \(P_n\) for \(n \ge 2\) is a tree with two leaves, and the star \(K_{1,t}\) for \(t \ge 2\) is a tree with \(t\) leaves; the cycle \(C_n\) and the complete graph \(K_n\) for \(n \ge 3\) are not trees.
Two leaves
Every tree with at least two vertices has at least two leaves, and the two ends of a longest path are leaves. A leaf can be deleted without harm: if \(v\) is a leaf of a tree \(T\), then \(T - v\) is again a tree, because deleting a vertex of degree 1 creates no cycle and disconnects nothing.
Spanning trees
A spanning tree of a connected graph \(G\) is a tree \(T \subseteq G\) with \(V(T) = V(G)\). Every connected graph has a spanning tree, and every spanning tree of a graph with \(n\) vertices and \(m\) edges leaves out exactly \(m - n + 1\) edges.
The Prüfer code
Let \(T\) be a tree on the vertices \(1, 2, \ldots, n\) with \(n \ge 3\). Its Prüfer code is the sequence \((c_1, \ldots, c_{n-2})\) produced by the following steps.
- Find the leaf of the current tree with the smallest label.
- Write down the label of its unique neighbour as the next entry of the code.
- Delete the leaf and return to step 1, until only two vertices remain.
The code has \(n - 2\) entries, and every vertex \(v\) appears in it exactly \(\deg(v) - 1\) times. The label \(v\) is recorded each time one of its neighbours is deleted as a leaf, and this happens to all its neighbours but one, because as soon as only one neighbour is left, \(v\) is itself a leaf and is either deleted or left over at the end, so its last neighbour is never recorded on its account.
The cut property
Let \(G\) be a connected weighted graph in which all weights are different, let \(S\) be a set of vertices with \(\emptyset \ne S \ne V\), and let \(e\) be the cheapest edge with one end in \(S\) and one end outside \(S\). Then every minimum spanning tree of \(G\) contains \(e\). When weights may be equal, the statement becomes that some minimum spanning tree contains \(e\).
Matchings and Bipartite Graphs
Matchings
A matching \(M\) of a graph \(G\) is a set of edges no two of which share a vertex. It is maximal if no edge can be added to it, maximum if no matching of \(G\) has more edges, and perfect if every vertex of \(G\) is an end of an edge of \(M\). The matching number \(\nu(G)\) is the number of edges of a maximum matching; a perfect matching exists exactly when \(\nu(G) = n/2\). Every maximum matching is maximal, but a maximal matching need not be maximum.
The deficiency version of Hall’s theorem
For a bipartite graph with parts \(X\) and \(Y\), \[ \nu(G) = |X| - \max_{S \subseteq X} \bigl( |S| - |N(S)| \bigr) , \] where the maximum is taken over all subsets \(S\) of \(X\), the empty set included, so that it is never negative. The number of vertices of \(X\) that every matching must leave unmatched is the largest deficiency of a subset of \(X\).
Regular bipartite graphs have perfect matchings
Every \(d\)-regular bipartite graph with \(d \ge 1\) has a perfect matching, and its edge set can be split into \(d\) perfect matchings. The graph may have parallel edges as long as the degrees are counted with them; it need not be connected.
Stable matchings
Given \(n\) applicants and \(n\) hospitals, each with a strict ranking of all members of the other side, a perfect matching is stable when there is no blocking pair, that is, no applicant and hospital, not matched to each other, that would both prefer each other to their assigned partners. A stable matching always exists, and there may be several.
Planar Graphs
Planar graph, plane graph, and face
A graph is planar if it has a drawing in the plane in which no two edges cross. A plane graph is a planar graph with one such drawing fixed, and the regions into which the drawing cuts the plane are its faces, exactly one of which, the outer face, is unbounded. Planarity is a property of the graph; the faces belong to the drawing.
Euler’s formula
\[ v - e + f = 2 \] For a connected plane graph with \(v\) vertices, \(e\) edges, and \(f\) faces, the outer face included; with \(c\) components the right-hand side is \(1 + c\). The number of faces is the same for every plane drawing of a connected planar graph, since \(f = 2 - v + e\) depends only on the graph.
The edge bound for planar graphs
\[ e \le 3v - 6 \qquad\text{and, if the graph contains no triangle,}\qquad e \le 2v - 4 \] For every planar graph with \(v \ge 3\) vertices and \(e\) edges. The first bound is reached by the plane graphs in which every face is a triangle; the second by those in which every face is bounded by four edges. The bounds are necessary conditions only: a graph that satisfies them may still fail to be planar.
\(K_5\) and \(K_{3,3}\) are not planar
The complete graph \(K_5\) and the complete bipartite graph \(K_{3,3}\) have no plane drawing. The first has too many edges for five vertices, \(10 > 3 \times 5 - 6\), and the second too many for a triangle-free graph on six vertices, \(9 > 2 \times 6 - 4\).
A vertex of degree at most 5
Every planar graph has a vertex of degree at most 5, since its average degree \(2e/v\) is below \(6\) when \(v \ge 3\). The number 5 cannot be improved, because the graph of the icosahedron (Figure 3) is planar and every one of its \(12\) vertices has degree \(5\).
The five Platonic solids
A regular polyhedron with \(p\)-sided faces and \(q\) faces at each corner satisfies \(1/p + 1/q > 1/2\), which leaves exactly the five pairs \((p, q) = (3,3)\), \((4,3)\), \((3,4)\), \((5,3)\), and \((3,5)\): the tetrahedron, the cube, the octahedron, the dodecahedron, and the icosahedron, with the counts of Table 1. Each of the five exists; the inequality shows that no sixth can.
Graph Colouring
Colourings, the chromatic number, and the edge chromatic number
A colouring of \(G\) with \(k\) colours assigns to each vertex one of \(k\) colours so that adjacent vertices receive different colours. The chromatic number \(\chi(G)\) is the least \(k\) for which \(G\) has such a colouring. An edge colouring assigns a colour to each edge so that two edges with a common end receive different colours, and the edge chromatic number \(\chi'(G)\) is the least number of colours an edge colouring of \(G\) can use. Both numbers exist for every finite graph, since \(n\) colours always suffice for the vertices and \(m\) for the edges.
Two lower bounds for the chromatic number
For every graph \(G\) with \(n\) vertices, \[ \chi(G) \ge \omega(G) \qquad\text{and}\qquad \chi(G) \ge \frac{n}{\alpha(G)} , \] where \(\omega(G)\) is the number of vertices of a largest clique and \(\alpha(G)\) the number of vertices of a largest independent set. The first bound holds because the vertices of a clique need different colours, the second because every colour class is an independent set.
The greedy bound and the degeneracy bound
For every graph \(G\), \[ \chi(G) \le \Delta(G) + 1 , \] and the greedy algorithm finds a colouring with at most \(\Delta(G) + 1\) colours in any order of the vertices. More precisely, if every subgraph \(H\) of \(G\) has a vertex of degree at most \(d\) in \(H\), then \(\chi(G) \le d + 1\), and the greedy algorithm finds such a colouring when the vertices are taken in a smallest-last order, an order that is defined below.
The Mycielski construction
Let \(G\) be a graph with vertices \(v_1, \ldots, v_n\). The Mycielski graph \(\mu(G)\) has the vertices of \(G\), new vertices \(u_1, \ldots, u_n\), and one more vertex \(w\); its edges are the edges of \(G\), an edge \(u_i v_j\) for every edge \(v_i v_j\) of \(G\), and the edges \(w u_i\) for all \(i\). If \(G\) is triangle-free, so is \(\mu(G)\), and \(\chi(\mu(G)) = \chi(G) + 1\). Starting from \(K_2\), the construction gives \(C_5\), then the Grötzsch graph with 11 vertices and \(\chi = 4\), and after \(k - 2\) steps a triangle-free graph with \(\chi = k\).
Perfect graphs
A graph \(G\) is perfect if every induced subgraph \(H\) of \(G\), including \(G\) itself, satisfies \(\chi(H) = \omega(H)\). Bipartite graphs, complete graphs, and the line graphs of bipartite graphs, defined below, are perfect; the odd cycles \(C_5, C_7, \ldots\) and their complements are not.
Networks and Open Problems
Degree distribution, average distance, and clustering coefficient
For a graph \(G\) with \(n\) vertices and \(m\) edges, the degree distribution gives the number \(n_k\) of vertices of degree \(k\) for every \(k\), with \(\sum_k n_k = n\) and \(\sum_k k\,n_k = 2m\). The average distance is \[ \ell = \frac{1}{\binom{n}{2}} \sum_{\{u, v\}} d(u, v) , \] the mean over all pairs of a connected graph. The clustering coefficient of a vertex \(v\) with \(\deg(v) \ge 2\) is \[ C(v) = \frac{\text{number of edges between neighbours of } v}{\binom{\deg(v)}{2}} , \] which is the fraction of the pairs of neighbours of \(v\) that are adjacent, with \(C(v) = 0\) when \(\deg(v) \le 1\), and \(C\) is the average of \(C(v)\) over all \(n\) vertices. Each \(C(v)\) lies between 0 and 1, and \(C(v) = 1\) means that \(v\) and its neighbours form a complete graph.
Distances grow like the logarithm
In a connected graph of \(n\) vertices in which every vertex has degree \(d \ge 3\) and the neighbourhoods look like trees, the number of vertices within distance \(r\) of a vertex is at most \[ 1 + d + d(d-1) + \cdots + d(d-1)^{r-1} = 1 + d\,\frac{(d-1)^{r} - 1}{d - 2} , \] so from any vertex some other vertex lies at distance at least about \(\log_{d-1} n\), and when the graph has no short cycles the average distance is also about \(\log_{d-1} n = \ln n / \ln(d-1)\). For real networks, which have cycles and varying degrees, this is a rule of thumb rather than a theorem. What is proved is only the upper bound on the count, so distances can never be much shorter than \(\log_{d-1} n\); they can be longer.
Preferential attachment and the exponent 3
In the Barabási-Albert model a new vertex joins an existing vertex \(u\) with probability proportional to \(\deg(u)\). After many steps the number of vertices of degree \(k\) falls like \(k^{-3}\): the fraction of vertices of degree \(k\) is approximately \(2m^2/k^3\) for \(k \ge m\), so doubling the degree divides the count by 8, and a network of \(n\) vertices has a hub of degree about \(m\sqrt{n}\), which for a million vertices and \(m = 3\) is a vertex with about 3000 neighbours. The exponent 3 is stated here without proof.
Easy and hard problems of this masterclass
A problem is in P when an efficient algorithm solves it, in NP when a proposed solution can be checked efficiently, and NP-complete when it is in NP and an efficient algorithm for it would give one for every problem in NP. In P: connectedness, bipartiteness, shortest routes, Euler tours, minimum spanning trees, maximum matchings, planarity, and 2-colouring. NP-complete: Hamilton cycles, the travelling salesman problem, largest cliques, largest independent sets, 3-colouring, and smallest vertex covers in general graphs. Graph isomorphism is in NP and in neither list as far as anyone knows.
The chromatic number of the plane
Let \(\chi\) be the smallest number of colours with which the points of the plane can be coloured so that no two points at distance 1 have the same colour. Then \[ 5 \le \chi \le 7 . \] The upper bound comes from a tiling by regular hexagons of diameter a little less than 1, coloured with seven colours in a repeating pattern; the lower bound 4 comes from the Moser spindle, seven points with eleven pairs at distance 1, and the lower bound 5 from a graph of 1581 points found by Aubrey de Grey in 2018 and checked by computer. The exact value is open.
Connectivity and Network Flows
Cut vertex, bridge, connectivity, and edge connectivity
A cut vertex of a connected graph is a vertex whose removal disconnects the graph, and a bridge is an edge whose removal does so. The connectivity \(\kappa(G)\) is the largest \(k\) such that \(G\) has more than \(k\) vertices and stays connected after the removal of any \(k - 1\) vertices. For a graph with at least two vertices, the edge connectivity \(\kappa'(G)\) is the largest \(k\) such that \(G\) stays connected after the removal of any \(k - 1\) edges. For a connected graph that is not complete, these are the smallest numbers of vertices and of edges whose removal disconnects it.
Flows, cuts, and weak duality
A flow \(f\) satisfies \(0 \le f(uv) \le c(uv)\) on every arc and \(f^{\mathrm{in}}(v) = f^{\mathrm{out}}(v)\) at every vertex other than the source \(s\) and the sink \(t\), and its value is \(\operatorname{val}(f) = f^{\mathrm{out}}(s) - f^{\mathrm{in}}(s)\). A cut \((S, T)\) splits the vertices into \(S \ni s\) and \(T \ni t\), and its capacity \(c(S, T)\) is the total capacity of the arcs from \(S\) to \(T\). For every flow and every cut, \[ \operatorname{val}(f) = f(S, T) - f(T, S) \le c(S, T), \] so the value of a flow is its net flow across any cut, and no flow has a value above the capacity of any cut; in particular the value of a maximum flow is at most the capacity of a minimum cut.
The Ford and Fulkerson method and the Edmonds and Karp rule
- Start with the flow that is zero on every arc.
- Build the residual network \(G_f\) of the current flow and search for a directed path from \(s\) to \(t\) in it, for example by breadth-first search (Unit 2) along the arcs.
- If no such path exists, stop: the flow is maximum, and the vertices reached from \(s\) in the search form the source side of a minimum cut.
- Otherwise augment the flow along the path by its bottleneck and return to step 2.
The Edmonds and Karp rule chooses in step 2 an augmenting path with the fewest arcs, which breadth-first search finds first; the method then stops after at most \(nm/2\) augmentations for every network with \(n\) vertices and \(m\) arcs, whatever the capacities, and since one augmentation costs work proportional to \(m\), the total work is at most proportional to \(nm^2\).
The integrality theorem
If all capacities are integers, every bottleneck is a positive integer, so each augmentation raises the value by at least \(1\), and the Ford and Fulkerson method stops after at most as many augmentations as the value of a maximum flow, and the maximum flow it produces has an integer value on every arc. In particular a network with integer capacities has a maximum flow with integer values, and the same holds for rational capacities, which a common denominator turns into integers.
Extremal Graph Theory
The Turán number
For a graph \(H\) with at least one edge and an integer \(n \ge 1\), the Turán number \(\operatorname{ex}(n, H)\) is the largest number of edges of a graph on \(n\) vertices that contains no subgraph isomorphic to \(H\). Every graph on \(n\) vertices with more than \(\operatorname{ex}(n, H)\) edges contains \(H\), and some graph with exactly \(\operatorname{ex}(n, H)\) edges does not; a graph of the second kind is called extremal for \(H\).
Asymptotic notation
For positive functions \(f\) and \(g\) of \(n\),
- \(f = O(g)\) means that \(f(n) \le C g(n)\) for some constant \(C\) and all large \(n\): \(f\) grows at most as fast as \(g\), up to a constant factor;
- \(f = o(g)\) means that \(f(n)/g(n) \to 0\) as \(n \to \infty\): \(f\) is negligible next to \(g\);
- \(f = \Theta(g)\) means that \(c\, g(n) \le f(n) \le C g(n)\) for two positive constants \(c\) and \(C\) and all large \(n\): \(f\) and \(g\) have the same order of magnitude;
- \(f \sim g\) means that \(f(n)/g(n) \to 1\): \(f\) and \(g\) agree up to an error that is negligible next to \(g\).
The constants may depend on anything that is fixed in the problem, such as the graph \(H\), but never on \(n\); an expression such as \(n^2/4 + o(n^2)\) stands for \(n^2/4\) plus some function that is \(o(n^2)\).
The Turán graph
The Turán graph \(T_r(n)\) is the complete \(r\)-partite graph on \(n\) vertices whose part sizes differ by at most 1: if \(n = qr + s\) with \(0 \le s < r\), so that \(q\) is the quotient and \(s\) the remainder when \(n\) is divided by \(r\), then \(s\) parts have \(q + 1\) vertices and \(r - s\) parts have \(q\) vertices. Its number of edges is \[ t_r(n) = \binom{n}{2} - s \binom{q+1}{2} - (r - s) \binom{q}{2} \le \left( 1 - \frac{1}{r} \right) \frac{n^2}{2} , \] with equality exactly when \(r\) divides \(n\). For \(n < r\) some of the parts are empty and \(T_r(n)\) is the complete graph \(K_n\). The graph \(T_r(n)\) contains no \(K_{r+1}\), and \(T_2(n) = K_{\lfloor n/2 \rfloor, \lceil n/2 \rceil}\) is the extremal graph of Mantel’s theorem.
Turán’s bound
For \(r \ge 2\), every graph on \(n\) vertices with no \(K_{r+1}\) has at most \[ t_r(n) \le \left( 1 - \frac{1}{r} \right) \frac{n^2}{2} \] edges. A \(K_{r+1}\)-free graph has exactly \(t_r(n)\) edges only when it is the Turán graph \(T_r(n)\), and \(t_r(n)\) reaches the right-hand side only when \(r\) divides \(n\). For \(r = 2\) this is Mantel’s bound \(n^2/4\).
Turán numbers and the chromatic number
For every graph \(H\) with at least one edge, \[ \operatorname{ex}(n, H) = \left( 1 - \frac{1}{\chi(H) - 1} \right) \frac{n^2}{2} + o(n^2) , \] where \(\chi(H)\) is the chromatic number of \(H\). The leading term is Turán’s bound for \(K_{\chi(H)}\), so the Turán number of \(H\) depends, up to a negligible error, only on how many colours \(H\) needs; for bipartite \(H\) it says only that \(\operatorname{ex}(n, H) = o(n^2)\).
The 4-cycle bound
Every graph on \(n\) vertices without a 4-cycle has at most \[ \frac{n}{4}\bigl( 1 + \sqrt{4n - 3} \bigr) < \frac{n^{3/2}}{2} + \frac{n}{4} \] edges, so \(\operatorname{ex}(n, C_4) = O(n^{3/2})\); constructions from finite projective planes show that \(\operatorname{ex}(n, C_4) \sim n^{3/2}/2\), so the exponent \(3/2\) and the constant \(1/2\) are both correct.
Random Graphs
Expectation, linearity, and indicator variables
\[ \mathbb{E}[X_1 + \cdots + X_k] = \mathbb{E}[X_1] + \cdots + \mathbb{E}[X_k], \qquad \mathbb{E}[\mathbf{1}_A] = \Pr(A) \] Linearity holds for any random variables \(X_1, \ldots, X_k\) on a finite sample space, independent or not. If \(X\) counts the objects of a list that have some property, and \(A_i\) is the event that the \(i\)th object has it, then \(X = \sum_i \mathbf{1}_{A_i}\) and \(\mathbb{E}[X] = \sum_i \Pr(A_i)\).
The union bound and Markov’s inequality
\[ \Pr(A_1 \cup \cdots \cup A_k) \le \Pr(A_1) + \cdots + \Pr(A_k), \qquad \Pr(X \ge t) \le \frac{\mathbb{E}[X]}{t} \quad (X \ge 0,\ t > 0) \] The union bound holds for any events \(A_1, \ldots, A_k\). Markov’s inequality holds for any random variable \(X\) that never takes a negative value and any \(t > 0\).
The first moment method
\[ X \in \{0, 1, 2, \ldots\} \quad\Longrightarrow\quad \Pr(X \ge 1) \le \mathbb{E}[X] \] If a count \(X\) has \(\mathbb{E}[X] < 1\), then \(X = 0\) with positive probability, and if a sequence of counts \(X_n\) has \(\mathbb{E}[X_n] \to 0\), then \(X_n = 0\) with high probability. The expectation is computed with indicator variables and linearity.
The random graph \(G(n, p)\)
\[ \Pr\bigl(G(n, p) = H\bigr) = p^{m}(1-p)^{\binom{n}{2} - m} \quad\text{for every labelled graph $H$ on $n$ vertices with $m$ edges} \] Each of the \(\binom{n}{2}\) possible edges is present with probability \(p\), independently of the others. Its expected number of edges is \(\binom{n}{2}p\), its expected number of triangles is \(\binom{n}{3}p^3\), and the degree of any fixed vertex is a binomial random variable with \(n - 1\) trials and success probability \(p\).
The Caro and Wei bound
\[ \alpha(G) \ge \sum_{v \in V(G)} \frac{1}{\deg(v) + 1} \] Every graph \(G\) has an independent set at least this large. For a \(d\)-regular graph on \(n\) vertices the bound is \(n/(d+1)\), and for every graph it is at least \(n/(\bar{d} + 1)\), where \(\bar{d}\) is the average degree.
A dominating set by alteration
\[ \gamma(G) \le n\,\frac{1 + \ln(\delta + 1)}{\delta + 1} \] Every graph \(G\) on \(n\) vertices with minimum degree \(\delta \ge 1\) has a dominating set with at most this many vertices, where \(\gamma(G)\) is the domination number. The bound is close to the truth for large \(\delta\), since every dominating set needs at least \(n/(\delta + 1)\) vertices when \(G\) is \(\delta\)-regular.
Eigenvalues of Graphs
Eigenvalues, eigenvectors, and the spectral theorem
A number \(\lambda\) is an eigenvalue of the \(n \times n\) matrix \(M\) with eigenvector \(\mathbf{x} \ne \mathbf{0}\) when \(M\mathbf{x} = \lambda\mathbf{x}\). If \(M\) is real and symmetric, then it has \(n\) real eigenvalues \(\lambda_1 \ge \lambda_2 \ge \cdots \ge \lambda_n\), counted with multiplicity, and \(n\) eigenvectors \(\mathbf{q}_1, \ldots, \mathbf{q}_n\) for them that are pairwise orthogonal and of length 1, so that every vector is a combination \(\mathbf{x} = c_1\mathbf{q}_1 + \cdots + c_n\mathbf{q}_n\). Then \(\operatorname{tr} M = \lambda_1 + \cdots + \lambda_n\), the eigenvalues of \(M^k\) are \(\lambda_1^k, \ldots, \lambda_n^k\) with the same eigenvectors, and \[ \lambda_1 = \max_{\mathbf{x} \ne \mathbf{0}} \frac{\mathbf{x}^{\mathsf{T}} M \mathbf{x}}{\mathbf{x}^{\mathsf{T}}\mathbf{x}} , \qquad \lambda_n = \min_{\mathbf{x} \ne \mathbf{0}} \frac{\mathbf{x}^{\mathsf{T}} M \mathbf{x}}{\mathbf{x}^{\mathsf{T}}\mathbf{x}} . \] The quotient is called the Rayleigh quotient of \(\mathbf{x}\), and the maximum and minimum are reached at \(\mathbf{q}_1\) and \(\mathbf{q}_n\).
Walks and traces
For every \(k \ge 1\), the entry \((A^k)_{ij}\) is the number of walks of length \(k\) from the vertex \(i\) to the vertex \(j\). In particular, with \(t\) the number of triangles of \(G\), \[ \operatorname{tr} A = 0 , \qquad \operatorname{tr} A^2 = \sum_{i} \deg(i) = 2m , \qquad \operatorname{tr} A^3 = 6t , \] and since \(\operatorname{tr} A^k = \lambda_1^k + \cdots + \lambda_n^k\), the eigenvalues of \(A\) determine the number of edges and the number of triangles of \(G\).
The largest eigenvalue
For every graph \(G\) with maximum degree \(\Delta\) and average degree \(\bar{d}\), \[ \bar{d} \le \lambda_1 \le \Delta , \qquad |\lambda_i| \le \lambda_1 \ \text{ for every } i , \] and \(\lambda_1(H) \le \lambda_1(G)\) for every subgraph \(H\) of \(G\); a \(d\)-regular graph has \(\lambda_1 = d\), with the all-ones vector \(\mathbf{1}\) as an eigenvector.
Bipartite and connected in the spectrum
A graph is bipartite if and only if its spectrum is symmetric about 0, that is, \(\lambda_{n+1-i} = -\lambda_i\) for every \(i\). For a \(d\)-regular graph the multiplicity of the eigenvalue \(d\) equals the number of components, so a \(d\)-regular graph is connected if and only if \(d\) is a simple eigenvalue, one of multiplicity 1, and a connected \(d\)-regular graph is bipartite if and only if \(-d\) is an eigenvalue.
The Laplacian
The Laplacian \(L = D - A\) of a graph satisfies, for every vector \(\mathbf{x}\), \[ \mathbf{x}^{\mathsf{T}} L \mathbf{x} = \sum_{ij \in E} (x_i - x_j)^2 \ \ge 0 . \] Its eigenvalues are \(0 = \mu_1 \le \mu_2 \le \cdots \le \mu_n \le 2\Delta\), the multiplicity of \(0\) is the number of components, and \(\mu_2\), the algebraic connectivity, is positive exactly when the graph is connected. For a \(d\)-regular graph \(L = dI - A\) and \(\mu_i = d - \lambda_i\).
PageRank
Let \(M\) be the \(n \times n\) matrix of a web of \(n\) pages with \(M_{ij} = 1/\operatorname{out}(j)\) when page \(j\) links to page \(i\), where \(\operatorname{out}(j)\) is the number of links on page \(j\), and \(M_{ij} = 0\) otherwise. The Google matrix with damping factor \(d\) is \[ G = d\,M + \frac{1 - d}{n}\,J , \] where \(J\) is the all-ones matrix, and the PageRank vector \(\mathbf{r}\) is the solution of \(G\mathbf{r} = \mathbf{r}\) with non-negative entries adding up to 1. It is computed by power iteration, \(\mathbf{r}^{(k+1)} = G\mathbf{r}^{(k)}\) from \(\mathbf{r}^{(0)} = \mathbf{1}/n\), which converges for every web because every entry of \(G\) is positive. A page without links is treated as linking to every page.
Ramsey's Theorem and the Party Problem
The Ramsey number \(R(s, t)\)
\[ R(s, t) = \min\bigl\{\, n : \text{every two-colouring of } E(K_n) \text{ has a red } K_s \text{ or a blue } K_t \,\bigr\} \] In words, \(R(s, t)\) is the smallest \(n\) such that every two-colouring of the edges of \(K_n\) contains a red \(K_s\) or a blue \(K_t\). \(E(K_n)\) is the edge set of \(K_n\), and a two-colouring is a red and blue colouring of it. The colour named first always goes with the first argument, so \(R(s, t)\) asks for a red \(K_s\) or a blue \(K_t\), and \(R(k)\) abbreviates \(R(k, k)\). The party problem says \(R(3, 3) = 6\). That the minimum exists at all is the content of Ramsey’s theorem below.
The Erdős and Szekeres bound
\[ R(s, t) \le \binom{s + t - 2}{s - 1}, \qquad R(k) \le \binom{2k - 2}{k - 1} < 4^{k} \] Upper bounds for every Ramsey number, obtained from the recursion in 1935. Unit 14 proves that \(R(k)\) grows at least like \(\sqrt{2}^{\,k}\), and Unit 16 reports how far the gap between \(\sqrt 2\) and \(4\) has been narrowed since.
The parity refinement
\[ R(s - 1, t) \text{ and } R(s, t - 1) \text{ both even} \quad\Longrightarrow\quad R(s, t) \le R(s - 1, t) + R(s, t - 1) - 1 \] The inequality of the recursion is strict when both numbers on the right are even.
The known Ramsey numbers
\begin{gather*} R(3, 3) = 6, \quad R(3, 4) = 9, \quad R(3, 5) = 14, \quad R(3, 6) = 18, \quad R(3, 7) = 23, \\ R(3, 8) = 28, \quad R(3, 9) = 36, \quad R(4, 4) = 18, \quad R(4, 5) = 25, \\ 40 \le R(3, 10) \le 41, \qquad 43 \le R(5, 5) \le 46 \end{gather*} These are all the exactly known values with \(s, t \ge 3\), together with the two cases that come next, as listed in revision 18 (April 2026) of the dynamic survey of Stanisław Radziszowski (Rochester Institute of Technology) in the Electronic Journal of Combinatorics. Table 1 gives the year of each bound.
Random Colourings and Lower Bounds
The expected number of monochromatic cliques
\[ \mathbb{E}[X] = \binom{n}{k}\, 2^{1 - \binom{k}{2}} \] Here \(X\) counts the monochromatic \(K_k\) in a two-colouring of \(K_n\) in which every edge is red or blue by an independent fair coin. For \(k = 3\) the expectation is \(\binom{n}{3}/4\), so a quarter of all triangles are monochromatic on average.
The first moment and alteration recipes
\[ \mathbb{E}[X] < 1 \ \Longrightarrow\ R(k, k) > n , \qquad R(k, k) > n - \mathbb{E}[X] \ \text{ for every } n , \qquad \mathbb{E}[X] = \binom{n}{k}\, 2^{1 - \binom{k}{2}} . \] The first recipe chooses \(n\) so that the expected number of monochromatic \(K_k\) is below 1. The second takes a larger \(n\), accepts a few monochromatic cliques, and deletes one vertex from each; it is best when \(n\) is about \(k\, 2^{k/2}/e\), where it gives \(R(k, k) \ge (1 + o(1))\, k\, 2^{k/2}/e\), a factor \(\sqrt 2\) more than the first.
Spencer’s bound
\[ R(k, k) \ge (1 + o(1))\, \frac{\sqrt 2\, k\, 2^{k/2}}{e} \] The lower bound obtained from the local lemma, which improves the constant of Erdős’s bound \(k\, 2^{k/2}/(e\sqrt 2)\) by a factor of 2 and the constant of the alteration method by \(\sqrt 2\). The base \(\sqrt 2\) is untouched.
Explicit Ramsey graphs, the record over time
- Paley graphs (classical): \(\sqrt n\) at most, and nothing better proved.
- Frankl and Wilson (1981): \(2^{c \sqrt{\log_2 n \,\log_2 \log_2 n}}\).
- Barak, Rao, Shaltiel, and Wigderson (conference 2006, Annals of Mathematics 2012): \(2^{(\log_2 n)^{o(1)}}\).
- Chattopadhyay and Zuckerman (2016, Annals of Mathematics 2019), and independently Cohen (2016): \(2^{(\log_2 \log_2 n)^{C}}\) for a constant \(C\).
- Li (2023): \((\log_2 n)^{C}\) for a constant \(C\).
The target set by Erdős is \(C \log_2 n\), which the random colouring reaches with \(C = 2\); every entry is a colouring given by a rule and verified by a proof, never by a search.
The triangle-free process
\[ e(G) = \left(\frac{1}{2\sqrt 2} + o(1)\right) n^{3/2} \sqrt{\ln n} , \qquad \alpha(G) \le \bigl(\sqrt 2 + o(1)\bigr) \sqrt{n \ln n} \quad \text{with high probability}, \] where \(G\) is the final graph of the triangle-free process on \(n\) vertices. Since \(G\) is triangle-free, it shows \(R(3, t) > n\) for \(t = \alpha(G) + 1\); solving \(t = \sqrt 2 \sqrt{n \ln n}\) for \(n\) gives \(t^2 = 2 n \ln n\), and since \(n\) is \(t^2\) up to a logarithm, \(\ln n\) is close to \(2 \ln t\), so \(t^2\) is about \(4 n \ln t\) and \(n = (1/4 + o(1))\, t^2/\ln t\), which is the lower constant \(1/4\).
Ramsey Theory in the Integers
The Schur numbers
The Schur number \(S(r)\) is the largest \(N\) such that \(\{1, \ldots, N\}\) can be \(r\)-coloured without a monochromatic solution of \(x + y = z\); Schur’s theorem says that it exists. The known values are \[ S(1) = 1, \quad S(2) = 4, \quad S(3) = 13, \quad S(4) = 44, \quad S(5) = 160 , \] with \(S(4)\) found by Baumert and Golomb by computer search in 1965 and \(S(5)\) by Heule in 2017. Some authors call \(S(r) + 1\) the Schur number, so that the sequence reads \(2, 5, 14, 45, 161\). The value \(S(6)\) is unknown; colourings of 1 to 536 with six colours and no monochromatic solution are known (Fredricksen and Sweet 2000).
The van der Waerden number \(W(r, k)\)
\(W(r, k)\) is the smallest \(N\) such that every \(r\)-colouring of \(\{1, \ldots, N\}\) contains a monochromatic arithmetic progression of \(k\) terms. The number of colours comes first and the length second in this masterclass; the literature also writes \(W(k, r)\) and \(w(k; r)\), so the order must be checked in every paper one reads.
\(W(2, 3) = 9\)
Every two-colouring of \(\{1, \ldots, 9\}\) contains a monochromatic three-term arithmetic progression, and the colouring RRBBRRBB of \(\{1, \ldots, 8\}\) contains none. The proof for nine numbers is the forced chain starting from the colours of 4, 5, and 6.
The known van der Waerden numbers
Apart from the trivial values \(W(1, k) = k\) and \(W(r, 2) = r + 1\), exactly seven van der Waerden numbers are known: \begin{gather*} W(2, 3) = 9, \quad W(2, 4) = 35, \quad W(2, 5) = 178, \quad W(2, 6) = 1132, \\ W(3, 3) = 27, \quad W(3, 4) = 293, \quad W(4, 3) = 76 . \end{gather*} Every one of them beyond \(W(2, 3)\) was found by computer, and \(W(2, 7)\) is unknown and larger than 3703.
Colouring statements and density statements
A colouring statement says that in every \(r\)-colouring of \(\{1, \ldots, N\}\), for \(N\) large, one colour class contains the pattern. A density statement says that every subset of \(\{1, \ldots, N\}\) with at least \(\delta N\) elements contains the pattern, for \(N\) large and any fixed \(\delta > 0\). A density statement implies the colouring statement, because the largest colour class has at least \(N/r\) elements. For three-term progressions, \(r_3(N)\) denotes the largest number of elements of a subset of \(\{1, \ldots, N\}\) with no three-term progression; the density statement for three-term progressions is the same as \(r_3(N)/N \to 0\).
Diagonal Ramsey Numbers Today
The lower bound of 1947
\[ R(k) > 2^{k/2} \quad (k \ge 3), \qquad R(k) \ge (1 + o(1))\,\frac{k\,2^{k/2}}{e\sqrt{2}}, \qquad R(k) \ge (1 + o(1))\,\frac{\sqrt{2}\,k\,2^{k/2}}{e} . \] The first bound is Erdős’s theorem of 1947, proved in Unit 14 by colouring the edges of \(K_n\) at random and counting the expected number of monochromatic \(K_k\). The second is what the same count gives with Stirling’s formula for factorials, which Section 2 states, and the third is Spencer’s improvement of 1975 by a factor of 2, proved with the Lovász local lemma, a tool of Unit 14. In both, the factor \((1 + o(1))\) stands for a quantity that tends to 1 as \(k\) grows, as in Unit 14. The base \(\sqrt{2} = 1.414\) has not been improved since 1947.
The polynomial and superpolynomial improvements
\[ R(k) \le f(k)\,\binom{2k - 2}{k - 1} \qquad\text{with}\qquad f(k) = k^{-1/2 + A/\sqrt{\ln k}},\quad k^{-c \ln k / \ln\ln k},\quad e^{-c (\ln k)^{2}} \] for Thomason (1988), Conlon (2009), and Sah (2023) in turn, with positive constants \(A\) and \(c\). Each factor tends to zero faster than the one before, and each is of the form \(e^{o(k)}\), where \(o(k)\) stands for a quantity that grows more slowly than \(k\), so that \(f(k)^{1/k} \to 1\) and the base 4 of the bound is unchanged.
Books and the book observation
A red book \((S, T)\) has a red clique \(S\) as its spine and a set \(T\) of pages joined to every vertex of \(S\) in red. If every red and blue colouring of the edges of \(K_n\) contains a monochromatic book \((S, T)\) with \[ |T| \ge R(k - |S|,\, k), \] then \(R(k) \le n\). To bound \(R(k)\) it therefore suffices to find, in every colouring, a book that is large enough in both its spine and its pages.
The multicolour bound (2024)
\[ R_r(k) \le e^{-\delta k}\, r^{rk} \quad\text{for every fixed } r \ge 2 \text{ and all sufficiently large } k, \] with a constant \(\delta = \delta(r) > 0\). Balister, Bollobás, Campos, Griffiths, Hurley, Morris, Sahasrabudhe, and Tiba proved it in a paper posted in October 2024 and published in the Journal of the American Mathematical Society in 2026. For \(r \ge 3\) it is the first exponential improvement of the bound of 1935; for \(r = 2\) it is a third proof of the theorem of 2023.