Combinatorics
Ramsey Theory
Color any 6-vertex complete graph with 2 colors and you'll always find a monochromatic triangle — R(3,3) = 6
Ramsey theory is the branch of combinatorics that studies the conditions under which order must appear in sufficiently large structures. The classical Ramsey number R(s, t) is the smallest N such that any 2-coloring of the edges of the complete graph K_N contains either a red K_s or a blue K_t. Ramsey (1930) proved R(s, t) is finite. Known values: R(3, 3) = 6, R(4, 4) = 18, R(3, 5) = 14. R(5, 5) is unknown — between 43 and 48 (as of 2024); Erdős famously said: "Imagine an alien force, vastly more powerful than us, demanding R(5,5) or it will destroy our planet. We should marshal all computers and mathematicians and try to find the value. But suppose, instead, they ask for R(6,6). In that case, we should attempt to destroy the aliens." Generalizations: hypergraphs, infinite Ramsey, arithmetic progressions (Van der Waerden, Szemerédi).
- Statement2-color K_N → mono K_s or K_t
- R(3, 3)= 6
- R(4, 4)= 18
- R(5, 5)43–48 (open)
- First provedF. P. Ramsey, 1930
- GeneralizationsVan der Waerden, Szemerédi
Watch the 60-second explainer
A condensed visual walkthrough — narrated, captioned, under a minute.
Why Ramsey theory matters
Ramsey's theorem is the formalization of an intuition: total disorder is impossible. Make a structure large enough and a substructure of any prescribed kind must appear, no matter how you arrange the rest. That is a strong statement, with consequences that ripple far beyond graph coloring.
- Combinatorial bounds. Ramsey-type theorems give us extremal counts in dozens of settings — Turán numbers, hypergraph thresholds, Erdős-Ko-Rado intersection bounds. Whenever a competition problem says "prove that some configuration must exist," the underlying machinery is often Ramsey-style pigeonhole on steroids.
- Computer science and data structures. Random graph models inherit Ramsey-style guarantees. Property testing, communication complexity (Yao's lower bounds use Ramsey), and lower bounds for various data structures all use Ramsey arguments. Erdős-Szekeres on monotone subsequences underpins comparison-sort lower bounds and patience sorting.
- Additive combinatorics. Szemerédi's theorem and Green-Tao on arithmetic progressions in the primes are direct descendants of Ramsey thinking. The regularity lemma — Szemerédi's main tool — has become a workhorse in graph theory, theoretical CS, and analytic number theory.
- Ergodic theory. Furstenberg recast Szemerédi's theorem as a multiple-recurrence statement for measure-preserving systems, opening a new bridge between combinatorics and dynamics. Hindman's theorem and IP-sets followed.
- Discrete geometry. The happy-ending theorem (Erdős-Szekeres): any set of ES(n) points in general position contains n in convex position. The exact value of ES(n) is conjectured to be 2^(n−2) + 1 — proved up to n = 6.
- Theoretical computer science lower bounds. Communication complexity uses the Ramsey-style observation that any large 2-coloring of a matrix contains a large monochromatic submatrix; this gives lower bounds on communication for multi-party protocols.
- Coding theory. Ramsey-style arguments give bounds on the size of codes with prescribed distance properties — anticodes, equidistant codes, and small-bias sample spaces.
Bounds and asymptotics
The classical recursive bound (Erdős-Szekeres, 1935): R(s, t) ≤ R(s − 1, t) + R(s, t − 1), which by induction gives R(s, t) ≤ C(s + t − 2, s − 1). For diagonal numbers this is R(k, k) ≤ 4^k roughly. The lower bound R(k, k) ≥ √2^k (Erdős, 1947) was the first probabilistic-method theorem in combinatorics — a coloring is shown to exist by a probability calculation, not by explicit construction. The gap between √2^k and 4^k has shrunk only modestly: in 2023, Campos-Griffiths-Morris-Sahasrabudhe announced R(k, k) ≤ (4 − ε)^k for some ε > 0, the first exponential improvement in 75 years.
For off-diagonal numbers, R(3, t) is known to grow like t^2 / log t (Kim 1995, matching Spencer's lower bound). R(4, t) is roughly t^3 up to log factors. These are some of the cleanest non-trivial bounds in extremal combinatorics.
The probabilistic method
Erdős's lower bound R(k, k) ≥ √2^k is paradigmatic. Color the edges of K_N independently red or blue with probability 1/2 each. The expected number of monochromatic K_k subgraphs is C(N, k) · 2 · 2^{−C(k, 2)}. If this expected value is less than 1, then some coloring has zero monochromatic K_k — a Ramsey-avoiding coloring exists. Crunching the inequality gives N ≤ √2^k · k / e (asymptotically), hence R(k, k) > √2^k for k large. The argument constructs nothing explicitly; it merely proves the existence of a good coloring by counting.
Generalizations beyond graphs
- Hypergraph Ramsey. R^{(r)}(s, t): smallest N such that any 2-coloring of r-element subsets of {1, …, N} contains a monochromatic K_s^{(r)} or K_t^{(r)}. Bounds grow tower-like in r.
- Infinite Ramsey. Any 2-coloring of the edges of the infinite complete graph K_ℕ contains an infinite monochromatic clique. The proof is a beautiful infinite pigeonhole iteration. Generalized by the Galvin-Prikry theorem to Borel partitions.
- Van der Waerden. Arithmetic progressions instead of cliques: any r-coloring of {1, …, W(r, k)} contains a monochromatic AP of length k. Generalized by Hales-Jewett to combinatorial lines in [k]^n.
- Szemerédi. Density rather than coloring: any subset of ℕ with positive upper density contains arbitrarily long arithmetic progressions.
- Graham-Rothschild. A massive structural Ramsey theorem on parameter words, with Graham's number as a famously enormous upper bound for a particular special case.
- Hindman's theorem. Any finite coloring of ℕ contains an infinite set whose finite-sum closure is monochromatic. Proved using the Stone-Čech compactification of ℕ.
Known values and best bounds
- R(3, 3) = 6 (the classical example).
- R(3, 4) = 9.
- R(3, 5) = 14.
- R(3, 6) = 18.
- R(3, 7) = 23.
- R(3, 8) = 28.
- R(3, 9) = 36.
- R(4, 4) = 18 (proved 1955).
- R(4, 5) = 25 (proved 1995, McKay-Radziszowski, computer-assisted).
- R(5, 5): 43 ≤ R(5, 5) ≤ 48 (open).
- R(6, 6): 102 ≤ R(6, 6) ≤ 161 (open).
Common misconceptions
- "Small numbers are easy." R(5, 5) is unknown despite decades of effort. The smallest open Ramsey number you can write on a postcard remains stubborn — the search space for K_43 is astronomical.
- "Growth rate known." The exponential gap between √2^k and 4^k for the diagonal Ramsey number stood unimproved for 75 years; even now we only know R(k, k) ≤ (4 − ε)^k for some unspecified small ε. We do not have matching upper and lower bounds.
- "Only graphs." Ramsey theory extends to hypergraphs, ordered sets, arithmetic progressions, geometric configurations, and combinatorial cubes. The graph case is just the most-cited.
- "Probabilistic method is constructive." Erdős's lower bound proves a Ramsey-avoiding coloring exists without ever exhibiting one. Explicit constructions matching the probabilistic bound were not known for decades and required deep algebraic structures.
- "Ramsey theorem says nothing about the substructure." The substructure can be highly constrained. Erdős-Hajnal conjecture says: for any fixed graph H, any H-free graph contains a clique or independent set of size N^{c(H)}. Open for most H — much stronger than ordinary Ramsey.
- "Bounds are tight." Even where exact values are known (R(4, 4) = 18) the proofs are subtle and the constructions extremal — a single missing edge often determines whether a coloring has a monochromatic clique.
Frequently asked questions
What is R(s, t) precisely?
The Ramsey number R(s, t) is the smallest positive integer N such that any 2-coloring of the edges of the complete graph K_N (using colors red and blue, say) must contain either a red K_s — a complete subgraph on s vertices with all edges red — or a blue K_t. Equivalently: in any group of N people, either s of them are mutual friends or t are mutual strangers. Ramsey (1930) proved R(s, t) is finite for every s, t. The diagonal numbers R(k, k) are the most-studied; off-diagonal R(s, t) with s ≠ t are easier to bound but still hard to compute.
Why is R(3, 3) = 6?
Two parts. First, R(3, 3) ≤ 6: take any 2-coloring of K_6's edges. Pick a vertex v; it has 5 edges. By pigeonhole, at least 3 are the same color — say red — going to vertices a, b, c. If any edge among a, b, c is red, that edge plus its endpoints and v form a red K_3. If all three edges among a, b, c are blue, those three vertices form a blue K_3. Either way, a monochromatic triangle exists. Second, R(3, 3) > 5: K_5 admits a 2-coloring with no monochromatic triangle — color the edges of one 5-cycle red and the other 5-cycle blue. So R(3, 3) = 6 exactly.
Why is R(5, 5) so hard to compute?
The number of 2-colorings of K_N's edges is 2^(N(N−1)/2), which for N = 43 is 2^903 ≈ 10^272. Even with massive computer searches and clever algebraic constructions, the lower bound has only crept up to 43 (a coloring of K_42 avoiding mono K_5 was found) and the upper bound has been pulled down to 48 by careful counting (Erdős-Szekeres recursion bounds R(5, 5) ≤ R(4, 5) + R(5, 4) = 25 + 25 = 50; refinements push it to 48). The gap remains because the search space is astronomical, the symmetry of colorings is hard to exploit, and the structural arguments needed for tighter bounds have resisted decades of effort.
What is the Erdős "alien" quote?
Paul Erdős's vivid illustration of how dramatically harder R(6, 6) is than R(5, 5): "Suppose aliens invade the earth and threaten to obliterate it in a year's time unless human beings can find R(5, 5). We could marshal the world's best minds and fastest computers, and within a year we could probably calculate the value. If the aliens demanded R(6, 6), however, we would have no choice but to launch a preemptive attack." The joke captures the truth that Ramsey-number computations explode in difficulty: known bounds for R(6, 6) are 102 ≤ R(6, 6) ≤ 161 (as of the most recent published results), and shrinking that gap looks hopeless with current methods.
What is Van der Waerden's theorem?
Van der Waerden (1927): for all positive integers r and k, there is a least integer W(r, k) such that any r-coloring of {1, 2, …, W(r, k)} contains a monochromatic arithmetic progression of length k. This is the arithmetic analogue of Ramsey's theorem: order (an arithmetic progression) is unavoidable in any coloring of a long enough interval. W(2, 3) = 9, W(2, 4) = 35, W(2, 5) = 178. The known bounds grow tower-like; only recently has Gowers' work given primitive recursive bounds. The Hales-Jewett theorem generalizes Van der Waerden to combinatorial lines in higher-dimensional grids.
What is Szemerédi's theorem on arithmetic progressions?
Szemerédi (1975): every subset of the natural numbers with positive upper density contains arbitrarily long arithmetic progressions. This was conjectured by Erdős and Turán in 1936 and is one of the deepest theorems of additive combinatorics. Szemerédi's original proof developed the regularity lemma — now a foundational tool. Furstenberg gave a different proof via ergodic theory (multiple recurrence). Gowers introduced higher-order Fourier analysis and proved quantitative bounds. Green-Tao (2004) extended Szemerédi to the primes, proving that the primes contain arbitrarily long arithmetic progressions despite their density being zero.