Ramsey's theorem
Statement
Let \(r,s \in \mathbb{N}\) with \(r,s \geq 2\). Colour the edges of the complete graph \(K_n\) (on \(n\) labelled vertices, every pair joined by exactly one edge) using two colours, red and blue. Then there exists a least positive integer \(R(r,s)\), called the Ramsey number of \((r,s)\), with the property that for every \(n \geq R(r,s)\) and every red/blue colouring of the edges of \(K_n\), there is either a set of \(r\) vertices all of whose \(\binom{r}{2}\) joining edges are red (a red \(K_r\)), or a set of \(s\) vertices all of whose \(\binom{s}{2}\) joining edges are blue (a blue \(K_s\)). In particular \(R(r,s)\) is finite for every choice of \(r,s\).
Why it matters
Ramsey's theorem is the founding result of Ramsey theory: it asserts that total disorder — a colouring with no large monochromatic substructure — is impossible once the ambient structure is big enough. However you try to 2-colour the edges of a sufficiently large complete graph, some prescribed amount of order is forced upon you; you cannot design your way around it. This flips the usual combinatorial question ("can I build an example avoiding property \(P\)?") into an existence guarantee that holds for every colouring, adversarial or not.
The theorem is the prototype for an entire family of results (Ramsey theory for hypergraphs, Schur's theorem, van der Waerden's theorem on arithmetic progressions, the Hales–Jewett theorem) all of which share the same shape: sufficiently large + finitely coloured \(\Rightarrow\) monochromatic structured substructure. It is also a key early example of the probabilistic method's lower-bound counterpart, and it underlies applications from communication complexity to model theory.
Hypotheses
Proof
We prove the two-colour graph Ramsey theorem by induction on \(r+s\), establishing along the way the explicit finite bound \(R(r,s) \leq \binom{r+s-2}{r-1}\).
Result
Reading. No matter how adversarially you 2-colour the edges of a large enough complete graph, you cannot avoid producing a large monochromatic clique of one colour or the other — and "large enough" is a fixed finite number depending only on the two clique sizes you're trying to force, not on any property of the particular colouring.
Scope. Applies to finite complete graphs with a 2-edge-colouring. Extends verbatim (by the identical case-split argument, more colours in Step 5's pigeonhole split) to any fixed finite number of colours, and to \(k\)-uniform hypergraphs in place of graphs (edges = \(k\)-subsets rather than pairs) via the analogous but heavier induction; also extends to an infinite version (Infinite Ramsey theorem, for colourings of \(\mathbb{N}^{(2)}\)) by a different, non-quantitative compactness-style argument. Does not by itself give good bounds — the bound of Step 10 is exponential and known to be far from tight for the diagonal case \(R(r,r)\).
Corollaries & converses
- Party corollary. \(R(3,3)=6\): among any 6 people, there are 3 mutual acquaintances or 3 mutual strangers (colour "knows" red, "doesn't know" blue); this is sharp, since the 5-cycle colouring of \(K_5\) exhibits 5 people with neither.
- Symmetry. \(R(r,s)=R(s,r)\) for free, by relabelling red \(\leftrightarrow\) blue throughout the argument.
- Monotonicity. \(R(r,s)\) is non-decreasing in each argument: a colouring of \(K_n\) avoiding a red \(K_r\) and blue \(K_s\) restricts to one avoiding red \(K_{r'}\) and blue \(K_s\) for any \(r' \leq r\), on the same \(n\), so \(R(r',s) \leq R(r,s)\).
- Converse. The theorem is an existence/threshold statement, not an "if and only if" biconditional, so there is no converse to prove false in the usual sense; what can fail is the sharpness of a claimed value — asserting \(R(r,s)=N\) requires exhibiting both a colouring of \(K_{N-1}\) with no monochromatic clique of the right size (this the theorem itself does not supply) and the upper bound \(R(r,s)\leq N\) (which the theorem does supply, non-sharply, via Step 10). Exact values of \(R(r,s)\) are known only for very small \(r,s\); e.g. \(R(4,4)=18\) is known but \(R(5,5)\) is not, only bracketed between 43 and 48.
Fails without
- Drop "complete host graph": colour the empty graph on any number of vertices (no edges at all, so vacuously "properly" red/blue coloured) — it contains no monochromatic \(K_r\) for any \(r\geq 2\), however many vertices you take, because there are no edges to be red or blue in the first place.
- Drop "\(n\) large enough" (i.e. take \(n \lt R(r,s)\)): for \(r=s=3\), take \(n=5\) and colour the edges of \(K_5\) by a red 5-cycle and its complementary blue 5-cycle (the "pentagon/pentagram" colouring). Direct check: every vertex has exactly 2 red and 2 blue edges, and no three vertices are pairwise joined by edges of a single colour, so this colouring of \(K_5\) contains neither a red nor a blue triangle — showing \(R(3,3) \gt 5\), i.e. the conclusion genuinely fails at \(n=5\).
- Drop "finitely many colours" (allow a colouring by an infinite palette with no repetition forced): colouring each edge of \(K_n\) a distinct colour trivially has no monochromatic \(K_r\) for \(r\geq 3\) at any finite \(n\), for exactly the reason the pigeonhole step (Step 5) needs finitely many colour-classes to force one of them to be large.
Common errors
- Believing \(R(r,s)=r\cdot s\) or some other simple closed form; only a handful of exact Ramsey numbers are known, and the true growth rate of \(R(r,r)\) is not pinned down even up to matching constants in the exponent (best known bounds are exponential with distinct bases, an open problem since Erdős–Szekeres 1935).
- Applying the recursive bound \(R(r,s)\leq R(r-1,s)+R(r,s-1)\) as though it were an equality; it is generally strict (e.g. it gives \(R(3,3)\leq R(2,3)+R(3,2)=3+3=6\), which happens to be tight, but for larger \(r,s\) the bound of Step 10 is known to overshoot the truth substantially).
- Forgetting that the vertex \(v\) singled out in Step 4 must be excluded from \(A\) and \(B\) and then correctly re-attached in Steps 7–8; omitting the "\(\cup\{v\}\)" step is a common gap that leaves only a clique of size \(r-1\) or \(s-1\), not \(r\) or \(s\).
- Confusing the graph Ramsey number \(R(r,s)\) (edges 2-coloured) with the hypergraph or multicolour Ramsey numbers, which exist by the same style of argument but have different (typically much larger) values.
- Treating the sharp lower-bound colouring for one \((r,s)\) (e.g. the pentagon colouring for \((3,3)\)) as a general recipe; extremal colourings for larger Ramsey numbers are not simple cyclic patterns and in most cases are not explicitly known at all, only shown to exist via the probabilistic method.
Discussion
Ramsey's theorem was proved by Frank P. Ramsey in 1930, in a paper ("On a Problem of Formal Logic") whose actual motivation was a decision problem for first-order logic, not combinatorics for its own sake — the now-famous graph-theoretic statement was essentially a lemma. The finite party-problem formulation and small numerical values were popularised later, notably by Erdős and Szekeres (1935), who independently rediscovered the finite version and proved the exponential-type upper bound of Step 10 by exactly this induction.
The gap between the upper bound of Step 10 (roughly \(4^r\) for the diagonal case \(R(r,r)\)) and the best known lower bound (roughly \(\sqrt{2}^{\,r}\), from Erdős's 1947 probabilistic argument: a uniformly random 2-colouring of \(K_n\) has, in expectation, few monochromatic \(K_r\)'s when \(n\) is below that threshold, so some colouring must avoid them entirely) remains open; closing it — even determining the base of the exponential growth — is one of the best-known open problems in combinatorics.
The proof strategy generalises far beyond graphs: the same "fix a point, pigeonhole its links, induct" template proves Ramsey's theorem for \(k\)-uniform hypergraphs and for any fixed finite number of colours, and a genuinely different, non-constructive compactness argument (using König's lemma or an ultrafilter/ compactness-of-product-space argument) extends it to the infinite Ramsey theorem: any 2-colouring of the edges of the complete graph on \(\mathbb{N}\) contains an infinite monochromatic clique. The infinite theorem in fact implies the finite one (by a compactness argument extracting a uniform finite bound from the infinite statement), giving an alternative, non-elementary proof route.
Common misconception: many students read "complete disorder is impossible" as saying large random-looking colourings are somehow rare or unlikely; in fact the theorem says the opposite of a probabilistic near-miss — it holds for every single colouring, including deliberately adversarial ones, and gives no information about how many monochromatic cliques appear, only that at least one must.
Worked examples
Reading. Among any 6 people, there are always 3 mutual acquaintances or 3 mutual strangers.
Reading. This shows how the induction that proves the theorem also machine-generates concrete numerical bounds, and how those generic bounds can be loose compared to the true (much harder to compute) Ramsey number.
Problems
- Show using only the base cases of Step 1 and the recursion of Step 3 that \(R(4,2)=4\) and \(R(2,5)=5\), and explain why no computation is needed beyond quoting the base case directly.
Solution
These are literally the base cases of Step 1 with \(r=4\) (giving \(R(4,2)=4\)) and \(s=5\) (giving \(R(2,5)=5\)); no recursive step is needed since one of the two parameters already equals 2, which is exactly the regime the base case covers. Concretely for \(R(4,2)=4\): colouring \(K_4\) entirely red gives a red \(K_4\) trivially, and colouring \(K_3\) entirely red has no blue edge and only 3 vertices so no red \(K_4\), showing \(R(4,2) \gt 3\); combined, \(R(4,2)=4\). - Using the recursive bound of Step 3 and the values \(R(3,3)=6\), \(R(2,4)=4\), \(R(2,5)=5\), \(R(3,4)\leq 10\) (from Worked Example 2), derive an upper bound for \(R(4,4)\) (you will need \(R(3,4)\) twice).
Solution
Step 3 gives \(R(4,4)\leq R(3,4)+R(4,3)\). By the symmetry corollary, \(R(4,3)=R(3,4)\leq 10\). So \(R(4,4)\leq 10+10=20\). (The true value, proved by finer methods, is \(R(4,4)=18\); this shows the generic bound overshoots by only 2 in this case — much tighter than the diagonal bound tends to be for larger \(r\).) - A red/blue colouring of \(K_5\) is given by colouring edge \(\{i,j\}\) (vertices labelled \(0,1,2,3,4\)) red if \(|i-j| \bmod 5 \in \{1,4\}\) and blue if \(|i-j|\bmod 5 \in \{2,3\}\). Verify this has no monochromatic triangle, and explain precisely which hypothesis of the theorem this exhibits as necessary.
Solution
This is the "pentagon/pentagram" colouring: red edges form the 5-cycle \(0\text{-}1\text{-}2\text{-}3\text{-}4\text{-}0\), blue edges form the complementary 5-cycle \(0\text{-}2\text{-}4\text{-}1\text{-}3\text{-}0\). Checking all \(\binom{5}{3}=10\) triples: each triple of vertices in a 5-cycle spans at most 2 cycle-edges (since 3 vertices out of a 5-cycle cannot all be mutually adjacent in that cycle — the cycle has girth 5), so no triple is monochromatic red (needs all 3 pairs to be cycle-edges of the red 5-cycle) nor monochromatic blue by the same argument on the blue 5-cycle. This exhibits the necessity of the hypothesis "\(n\) large enough (\(n\geq R(r,s)\))" from the Hypotheses section: it shows \(R(3,3)\gt 5\), i.e. \(n=5\) is not large enough, matching Worked Example 1's proof that \(n=6\) suffices. - Prove that \(R(r,r) \geq 2^{r/2}\) for \(r \geq 3\) is suggested by (but not proved by) the probabilistic idea sketched in the Discussion: estimate the expected number of monochromatic \(K_r\)'s in a uniformly random 2-colouring of \(K_n\), and state for which \(n\) this expectation is less than 1.
Solution
There are \(\binom{n}{r}\) subsets of size \(r\); each is monochromatic with probability \(2\cdot 2^{-\binom{r}{2}}\) (the \(2\) choices of colour, times the probability all \(\binom{r}{2}\) edges match under independent fair coin flips). By linearity of expectation, the expected number of monochromatic \(K_r\)'s is \(\binom{n}{r}\cdot 2^{1-\binom{r}{2}}\). Using \(\binom{n}{r}\leq n^r/r!\), this expectation is less than 1 once \(n^r/r! \lt 2^{\binom{r}{2}-1}\), which holds for \(n\) around \(2^{r/2}\) (up to lower-order factors); when the expectation is \(\lt 1\), some colouring of \(K_n\) has zero monochromatic \(K_r\)'s (since a nonnegative integer random variable with mean \(\lt 1\) must take the value 0 with positive probability), so \(R(r,r) \gt n\), i.e. roughly \(R(r,r)\geq 2^{r/2}\). This is Erdős's 1947 argument referenced in the Discussion; it proves existence of a good colouring without constructing one explicitly. - Suppose you are told a colouring of \(K_{17}\) has been constructed with no red \(K_4\) and no blue \(K_4\) (this is possible, since \(R(4,4)=18 \gt 17\)). What, precisely, does Ramsey's theorem let you conclude about a red/blue colouring of \(K_{18}\), and what does it not let you conclude about a colouring of \(K_{17}\) in general?
Solution
Ramsey's theorem (via \(R(4,4)=18\), quoted, not re-derived here) guarantees that every red/blue colouring of \(K_{18}\) — not just ones extending the given \(K_{17}\) colouring — contains a red \(K_4\) or a blue \(K_4\); this is an unconditional statement about all colourings of \(K_{18}\), not a consequence of the specific \(K_{17}\) example. It does not let you conclude that every colouring of \(K_{17}\) avoids a monochromatic \(K_4\) — only that at least one such colouring exists; a different, e.g. all-red, colouring of \(K_{17}\) certainly does contain a red \(K_4\) (indeed a red \(K_{17}\)). The existence of one good colouring at \(n=17\) is exactly what makes \(R(4,4)=18\) sharp (matches the upper bound of the theorem), but it says nothing about other colourings at that same \(n\).