40.05.04 · combinatorics / extremal-ramsey

Ramsey's Theorem and Ramsey Numbers

shipped3 tiersLean: none

Anchor (Master): Diestel 2017 *Graph Theory* (5th ed., Springer GTM 173) §9.1-§9.4 (Ramsey's theorem, induced Ramsey, the canonical Ramsey theorem of Erdős-Rado); Graham-Rothschild-Spencer 1990 *Ramsey Theory* (2nd ed., Wiley) Ch. 1-7 (van der Waerden, Hales-Jewett, Rado's theorem, the canonical theorem); the original sources Ramsey 1930 (*Proc. London Math. Soc.*), Erdős-Szekeres 1935 (*Compositio Math.*), Erdős 1947 (*Bull. AMS*), Schur 1916, van der Waerden 1927, Hales-Jewett 1963, Szemerédi 1975

Intuition Beginner

Complete disorder is impossible. That is the slogan of Ramsey theory, and it sounds almost backwards. We expect that if you scatter things randomly they will look like a mess with no pattern. Ramsey's theorem says the opposite: once a structure is large enough, some neat pattern is forced to appear no matter how hard you try to avoid it. You cannot make everything random; a big enough system always hides an island of order.

The cleanest example is a party. Suppose six people are in a room. Take any two of them; either they already know each other or they are strangers. Colour each pair: a red line if the two are acquainted, a blue line if they are strangers. The surprising fact is that among any six people you can always find three who are mutual acquaintances (a red triangle) or three who are mutual strangers (a blue triangle). With only five people you can dodge it, but at six it becomes unavoidable. You do not get to pick the friendships; whatever they are, the pattern is already there.

The smallest size that forces the pattern is called a Ramsey number. Here it is six, written : six people force a same-colour triangle. The numbers grow ferociously fast and become almost impossible to pin down exactly, which is part of what makes the subject so strange and so deep.

Visual Beginner

Picture five dots arranged in a ring, every pair joined by a line, and colour each line red or blue. With five dots you can be clever: draw the outer five-sided ring in red and the inner five-pointed star in blue. Now no three dots are joined by three lines of one colour. Five dots can escape.

Now add a sixth dot and look at it alone. It sends five lines out to the other five dots. Each line is red or blue, and five lines split into two colours, so one colour is used at least three times. Say three of its lines are red, reaching three other dots.

step count what it forces
lines from the sixth dot 5 two colours, so one colour appears times
same-colour lines (say red) 3 three dots all joined red to the sixth
lines among those three dots 3 if any is red, a red triangle appears
if none of the three is red all blue the three dots form a blue triangle

Either way a same-colour triangle appears. Six dots cannot escape, so the threshold is exactly six.

Worked example Beginner

Show by hand that any group of six people contains three mutual acquaintances or three mutual strangers.

Step 1. Pick one person, call her Ana. The other five people are each either an acquaintance or a stranger to Ana. That is five relationships, each one of two kinds.

Step 2. Split five into two kinds. Five things sorted into two boxes must overpack one box: at least three of Ana's five relationships are the same kind. Suppose at least three are acquaintances; call three of those acquaintances Beba, Cira, and Dina. (If instead three were strangers, the rest of the argument runs the same with the words swapped.)

Step 3. Look among Beba, Cira, Dina. Consider the three pairs Beba-Cira, Beba-Dina, Cira-Dina. If even one of these three pairs is a pair of acquaintances, then that pair together with Ana makes three mutual acquaintances, because Ana already knows both. We are done in that case.

Step 4. Handle the remaining case. If none of the three pairs is a pair of acquaintances, then Beba, Cira, and Dina are pairwise strangers. That is three mutual strangers, and we are done again.

What this tells us: there is no escape route. Every branch of the reasoning ends in three-of-a-kind. The only choices were "at least three same-kind" in Step 2 and "some pair matches or none does" in Step 4, and both choices lead to a same-kind triple. Six is enough to force the pattern, which is exactly the statement .

Check your understanding Beginner

Formal definition Intermediate+

Fix a complete graph on vertices and a set of colours. An -colouring of the edges is a map . A subset is monochromatic if all edges inside receive the same colour; if this is a monochromatic [Diestel 2017 §9.1]. The graph here is the complete graph on vertices, an object defined in the graph foundations 40.04.01.

Definition (Ramsey number). For integers and , the Ramsey number is the least such that every -colouring of contains a monochromatic . For two colours one writes the off-diagonal number : the least such that every red/blue colouring of contains a red or a blue . The diagonal number is , and by swapping colours. By convention and , since a single red edge is a red and otherwise all edges are blue.

That is finite — that the least such exists at all — is the content of Ramsey's theorem below; the definition presupposes existence, which the theorem supplies.

Definition (the hypergraph form). Write for the set of -element subsets of . A colouring of -subsets of with colours is a map , and is monochromatic if is constant on . The edge version is the case . The general Ramsey number is the least with: every -colouring of has a monochromatic -subset.

Definition (partition regularity). A system of linear equations over is partition regular if, for every finite colouring of the positive integers , some colour class contains a solution with all variables in . Schur's equation and the van der Waerden configuration "an arithmetic progression of length " are the model cases; Rado's theorem characterises which systems are partition regular.

Counterexamples to common slips

  • Monochromatic means same colour on every internal edge, not most. On a red triangle plus one blue edge is not a monochromatic ; the witness must be complete in a single colour. A with five red edges and one blue still has no red .
  • The threshold is sharp, so lower bounds need a colouring. Stating is the easy half; proving requires exhibiting a colouring of with no monochromatic triangle (the pentagon/pentagram). Upper bounds are forcing arguments; lower bounds are constructions.
  • More colours change the number. is the two-colour value; the three-colour triangle number is different, and is not even known exactly. Fixing matters.
  • Off-diagonal is not symmetric in the obvious way. holds, but is governed by the larger of in a subtle way; for fixed , grows polynomially in , not exponentially.

Key theorem with proof Intermediate+

Theorem (Ramsey's theorem and the Erdős-Szekeres bounds). For all integers the Ramsey number is finite. For two colours and , $$ R(s, t) ;\le; R(s-1, t) + R(s, t-1), $$ and consequently $$ R(s, t) ;\le; \binom{s + t - 2}{s - 1}, \qquad R(k, k) ;\le; \binom{2k - 2}{k - 1} ;\le; 4^{k}. $$ (See [Ramsey 1930]; [Erdős-Szekeres 1935]; [Diestel 2017 §9.1].)

Proof. The recursion. Suppose and are both finite, and set . Take any red/blue colouring of and fix a vertex . Its incident edges split into the red-neighbour set and the blue-neighbour set , with . Were and both to hold, then , a contradiction; so or .

In the first case, the red-neighbourhood spans a complete graph on vertices, hence contains a red or a blue . A blue finishes the proof; a red together with — joined in red to all of — yields a red . In the second case, symmetrically, contains a red or a blue , and the blue plus gives a blue . Either way the colouring has a red or a blue , so .

Finiteness. The base cases and , are finite, and the recursion produces every from smaller ones, so all two-colour numbers are finite by induction on . For colours, group the last two colours into one to reduce to : a monochromatic in the merged colour is a that is entirely colour or entirely colour , which a further two-colouring of its edges resolves, giving and finiteness by induction on .

The binomial bound. Induct on . The base holds. For the step, Pascal's identity and the recursion give $$ R(s,t) \le R(s-1,t) + R(s,t-1) \le \binom{s+t-3}{s-2} + \binom{s+t-3}{s-1} = \binom{s+t-2}{s-1}. $$ Setting gives , and since a single binomial coefficient is at most the sum of its row.

Bridge. This theorem builds toward the whole of Ramsey theory and appears again in the probabilistic lower bound, the canonical theorem, and the density results below, because it is the prototype of every "large structure forces order" statement. The foundational reason the recursion works is the neighbourhood split: a single vertex partitions the rest by colour, and the pigeonhole forces one part large enough to recurse — this is exactly the inductive engine that the infinite Ramsey theorem runs to its limit and that van der Waerden's and Hales-Jewett's theorems re-enact in arithmetic and combinatorial-line settings. The upper bound is dual to the probabilistic lower bound proved in 40.07.01: putting these together pins the diagonal Ramsey number between bases and , the central insight that the exact growth of is one of the hardest open problems in combinatorics, and the gap generalises into the off-diagonal and hypergraph regimes where even the order of magnitude is contested.

Exercises Intermediate+

Advanced results Master

Theorem 1 (the diagonal gap and small values). The diagonal numbers satisfy , the lower bound being Erdős's probabilistic estimate proved in 40.07.01 and the upper bound the Erdős-Szekeres count above. In this traps the growth base between and . The constant stood from 1935 until Campos, Griffiths, Morris, and Sahasrabudhe (2023) obtained for an absolute ; no exponential improvement to the lower base is known. Exact values are known only for tiny cases: , , and is merely bracketed . Erdős dramatised the difficulty: if hostile aliens demanded the value of we should marshal every computer and mathematician to find it, but if they asked for we should attempt to destroy the aliens first.

Theorem 2 (the canonical Ramsey theorem of Erdős-Rado). When the number of colours is unbounded — a colouring with no finiteness restriction — one cannot force a monochromatic infinite set. Erdős and Rado (1950) proved the exact replacement: for every there is a finite list of canonical colouring patterns on such that every colouring of has an infinite subset on which agrees with one canonical pattern. For pairs () the four canonical patterns are: constant; "colour determined by the smaller element"; "colour determined by the larger element"; and "all distinct" (the rainbow pattern, injective on the subset). Ramsey's theorem is the special case where only the constant pattern can occur because the colour palette is finite.

Theorem 3 (van der Waerden and Hales-Jewett). Van der Waerden's theorem (1927): for all there is such that every -colouring of contains a monochromatic arithmetic progression of length . Its abstract source is the Hales-Jewett theorem (1963): for all there is a dimension such that every -colouring of the cube contains a monochromatic combinatorial line — a set of points obtained by fixing some coordinates and letting a nonempty set of "active" coordinates run together through . Hales-Jewett is the pinnacle from which van der Waerden (project a line to its arithmetic progression of coordinate-sums) and Gallai's multidimensional theorem follow by colour-preserving reductions; it is purely combinatorial, with no arithmetic input.

Theorem 4 (Rado's theorem and Schur). Schur's theorem (1916) — every finite colouring of has a monochromatic solution of — is the first partition-regularity result. Rado's theorem (1933) characterises all partition-regular linear systems: a system with integer matrix is partition regular iff satisfies the columns condition — the columns can be ordered and grouped into blocks so that each block's sum lies in the rational span of the earlier blocks' columns, with the first block summing to zero. Schur's equation has column vector sum but satisfies the columns condition with the single nonzero-but-spanning grouping; van der Waerden's length- progression is the partition regularity of the system .

Theorem 5 (from partition to density: Szemerédi). Ramsey-type theorems guarantee a monochromatic pattern in some colour class; the deeper density versions guarantee the pattern in any sufficiently dense set, regardless of colouring. Szemerédi's theorem (1975): every subset of of positive upper density contains arbitrarily long arithmetic progressions, with van der Waerden as the immediate corollary (some colour class has positive density). The density Hales-Jewett theorem (Furstenberg-Katznelson 1991) plays the same apex role for combinatorial lines, and the Green-Tao theorem (2008) extends Szemerédi to the primes despite their vanishing density. The infinite-set Ramsey theory of and these density theorems are the two directions in which the finite combinatorial core of this unit deepens.

Synthesis. Putting these together, the foundational reason Ramsey theory coheres is a single mechanism seen at every scale: a large enough host structure, finitely coloured, contains a monochromatic copy of any fixed target, and the neighbourhood-split induction of the Key theorem is the prototype that the infinite, arithmetic, and combinatorial-line versions each re-enact. The diagonal gap is exactly the dual pairing of the probabilistic lower bound of 40.07.01 against the Erdős-Szekeres forcing count, so closing it is the open problem of beating either the random construction from below or the recursion from above — the central insight that quantitative Ramsey theory is genuinely hard where the qualitative theory is clean. The canonical theorem generalises Ramsey to unbounded palettes by replacing "monochromatic" with "one of finitely many canonical patterns", and this is exactly the move that keeps a finiteness conclusion alive when the colour count is infinite. Hales-Jewett is dual to van der Waerden: the abstract combinatorial line projects to the arithmetic progression, so the arithmetic theorem is a shadow of a purely set-theoretic one, and Rado's columns condition is the bridge that turns "which configurations are forced" into a decidable algebraic test. The density theorems of Szemerédi and Green-Tao are the bridge onward, trading the colouring hypothesis for a density hypothesis and thereby subsuming the partition results, the deepest current form of the slogan that complete disorder is impossible.

Full proof set Master

Proposition 1 (Erdős-Szekeres recursion and finiteness). For , , and every is finite.

Proof. With and any red/blue colouring of , fix and partition the other vertices into the red-neighbour set and blue-neighbour set . Since , not both and can hold, so or . In the former case contains a blue (done) or a red , which with gives a red ; in the latter contains a red (done) or a blue , which with gives a blue . Thus . The base values are finite, so induction on makes all two-colour numbers finite. For colours, merge colours and into one to obtain an -colouring; a monochromatic in the merged colour is two-coloured internally and yields a monochromatic , giving and finiteness by induction on .

Proposition 2 (binomial and exponential upper bounds). , and .

Proof. Induct on . For or , (one of the two lower indices is ). For the step, Proposition 1 and Pascal's rule give $$ R(s,t) \le R(s-1,t) + R(s,t-1) \le \binom{s+t-3}{s-2} + \binom{s+t-3}{s-1} = \binom{s+t-2}{s-1}. $$ At , . The whole row of sums to , so a single entry is at most .

Proposition 3 (lower bound and exact value). .

Proof. Upper bound: Proposition 1 gives . Lower bound: colour on vertices by making red iff (the outer pentagon) and blue iff (the inner pentagram). The red graph is the 5-cycle and the blue graph is also a -cycle; neither contains a triangle, since is triangle-free. Hence this colouring of has no monochromatic triangle, so . Together .

Proposition 4 (infinite Ramsey theorem for -sets). For every and every colouring there is an infinite with constant on .

Proof. Induct on . For this is the pigeonhole principle: an -colouring of has an infinite monochromatic class. Assume the claim for . Given on , build a sequence and infinite sets as follows. Having chosen and infinite , pick and define a colouring of by . By the induction hypothesis there is an infinite on which is constant, with value . The colour has the property that every -set with — in particular with — has colour . Some value occurs for infinitely many ; let . For any -subset of with , its colour is by construction, so is constant on .

Proposition 5 (Schur's theorem). For every there is such that every -colouring of has a monochromatic solution of ; indeed .

Proof. Put and let be an -colouring of . Colour edge of () with . The number forces a monochromatic triangle , whence . Set , , ; then and all three share a colour. So .

Proposition 6 (van der Waerden from Hales-Jewett). The Hales-Jewett theorem implies van der Waerden's theorem.

Proof. Fix and let . Given an -colouring of (translate so progressions start at ), colour the cube by , an -colouring of symbols per coordinate. By Hales-Jewett (applied to the alphabet ) there is a monochromatic combinatorial line: a set of points obtained by fixing coordinates outside an active set and letting the active coordinates equal a common value . As runs , the coordinate-sum runs through an arithmetic progression of length with common difference , all of whose terms receive a single colour under . This is a monochromatic -term arithmetic progression, so is finite.

Connections Master

  • The probabilistic method: first-moment and counting arguments 40.07.01. That unit owns the lower bound , proved by colouring at random and computing that the expected number of monochromatic is below one when . This unit supplies the matching upper bound by the Erdős-Szekeres forcing recursion. Together they trap between and ; the two arguments are the same clique-count read in opposite directions — existence-by-averaging versus existence-by-pigeonhole — and the persistence of the gap is the headline open problem both units point at.

  • Graphs, basic invariants, and the foundational lemmas 40.04.01. Ramsey's theorem is a statement about complete graphs, monochromatic cliques, and vertex neighbourhoods, all defined there; the neighbourhood split that drives the recursion is exactly the degree/adjacency bookkeeping of that unit, and the parity refinement of Exercise 3 invokes the handshake lemma directly. The triangle-free certifying is a cycle in the sense fixed there.

  • Extremal graph theory: Turán's theorem and the Erdős-Stone-Simonovits theorem 40.05.01 and the Szemerédi regularity lemma and triangle removal 40.05.03. The co-produced extremal unit 40.05.01 and the regularity unit 40.05.03 are the density side of the same chapter: where Ramsey forces a monochromatic clique in some colour class, Turán-type results force a clique once the edge density crosses a threshold, and the regularity lemma of 40.05.03 is the engine behind the density Ramsey theorems (Szemerédi, removal lemma) that this unit points to as its deepest generalisation. Ramsey colourings and extremal edge bounds are the two halves of how local order is forced in dense graphs.

Historical & philosophical context Master

The theorem is due to Frank Plumpton Ramsey, who proved both the finite and infinite partition theorems in his 1930 paper On a problem of formal logic (Proceedings of the London Mathematical Society, 2nd series, 30) [Ramsey 1930]. Ramsey's goal was not combinatorics: he wanted a decision procedure for a fragment of first-order logic (the Bernays-Schönfinkel class), and the partition theorem was a lemma. He died in 1930 at twenty-six, and the combinatorial theorem outgrew the logical application that motivated it. The quantitative theory began with Paul Erdős and George Szekeres, whose 1935 A combinatorial problem in geometry (Compositio Mathematica 2) [Erdős-Szekeres 1935] rediscovered the finite theorem, proved the recursion and the binomial bound, and applied it to show that sufficiently many points in general position contain a convex polygon of any prescribed size — the "happy ending problem", so named because it led to the marriage of Szekeres and Esther Klein.

The partition-regularity strand is older in part: Issai Schur proved the monochromatic result in 1916 while studying Fermat's congruence, and Bartel van der Waerden proved the monochromatic-arithmetic-progression theorem in 1927. Richard Rado, Schur's student, characterised all partition-regular linear systems in his 1933 dissertation. The abstract apex, the combinatorial-line theorem, is due to Alfred Hales and Robert Jewett in 1963 (Transactions of the American Mathematical Society 106) [Hales-Jewett 1963]. Richard Rado and Erdős established the canonical Ramsey theorem in 1950, settling the unbounded-colour case. The density turn came with Endre Szemerédi's 1975 proof that positive-density sets contain long progressions, for which the regularity lemma was invented; the textbook organisation followed in Diestel's Graph Theory [Diestel 2017] and the monograph of Graham, Rothschild, and Spencer [Graham-Rothschild-Spencer 1990].

Bibliography Master

@article{Ramsey1930,
  author  = {Ramsey, Frank P.},
  title   = {On a problem of formal logic},
  journal = {Proceedings of the London Mathematical Society},
  series  = {2},
  volume  = {30},
  year    = {1930},
  pages   = {264--286}
}

@article{ErdosSzekeres1935,
  author  = {Erd\H{o}s, Paul and Szekeres, George},
  title   = {A combinatorial problem in geometry},
  journal = {Compositio Mathematica},
  volume  = {2},
  year    = {1935},
  pages   = {463--470}
}

@article{Schur1916,
  author  = {Schur, Issai},
  title   = {\"Uber die Kongruenz $x^m + y^m \equiv z^m \pmod p$},
  journal = {Jahresbericht der Deutschen Mathematiker-Vereinigung},
  volume  = {25},
  year    = {1916},
  pages   = {114--117}
}

@article{vanderWaerden1927,
  author  = {van der Waerden, Bartel L.},
  title   = {Beweis einer Baudetschen Vermutung},
  journal = {Nieuw Archief voor Wiskunde},
  volume  = {15},
  year    = {1927},
  pages   = {212--216}
}

@phdthesis{Rado1933,
  author  = {Rado, Richard},
  title   = {Studien zur Kombinatorik},
  school  = {University of Berlin},
  year    = {1933},
  note    = {published in Mathematische Zeitschrift 36 (1933) 424--470}
}

@article{HalesJewett1963,
  author  = {Hales, Alfred W. and Jewett, Robert I.},
  title   = {Regularity and positional games},
  journal = {Transactions of the American Mathematical Society},
  volume  = {106},
  year    = {1963},
  pages   = {222--229}
}

@article{ErdosRado1950,
  author  = {Erd\H{o}s, Paul and Rado, Richard},
  title   = {A combinatorial theorem},
  journal = {Journal of the London Mathematical Society},
  volume  = {25},
  year    = {1950},
  pages   = {249--255}
}

@article{Szemeredi1975,
  author  = {Szemer\'edi, Endre},
  title   = {On sets of integers containing no $k$ elements in arithmetic progression},
  journal = {Acta Arithmetica},
  volume  = {27},
  year    = {1975},
  pages   = {199--245}
}

@article{Campos2023,
  author  = {Campos, Marcelo and Griffiths, Simon and Morris, Robert and Sahasrabudhe, Julian},
  title   = {An exponential improvement for diagonal Ramsey},
  journal = {arXiv preprint arXiv:2303.09521},
  year    = {2023}
}

@book{GrahamRothschildSpencer1990,
  author    = {Graham, Ronald L. and Rothschild, Bruce L. and Spencer, Joel H.},
  title     = {Ramsey Theory},
  edition   = {2nd},
  publisher = {Wiley},
  year      = {1990}
}