Key idea of this section
R(3, 3) = 6, R(s, t) ≤ R(s − 1, t) + R(s, t − 1) ≤ C(s + t − 2, s − 1) "Complete disorder is impossible." — T. S. Motzkin
Pigeonhole
If n objects are placed in k boxes, some box contains at least ⌈n/k⌉ objects. This trivial statement has nontrivial consequences.
Theorem 11.1 (Erdős–Szekeres, 1935). Every sequence of rs + 1 distinct real numbers contains an increasing subsequence of length r + 1 or a decreasing subsequence of length s + 1. The bound is sharp.
Proof. Label the i-th term by the pair (aᵢ, dᵢ), the lengths of the longest increasing and decreasing subsequences ending at it. For i < j, if the j-th term is larger than the i-th, then aⱼ > aᵢ; otherwise dⱼ > dᵢ; so the labels are distinct. If every aᵢ ≤ r and dᵢ ≤ s, there are at most rs labels for rs + 1 terms, a contradiction. For sharpness, concatenate s increasing blocks of length r, each block lying entirely below the previous one. ∎
Theorem 11.2 (Dirichlet, 1842). For every real α and integer N ≥ 1 there are integers p and q with 1 ≤ q ≤ N and |qα − p| < 1/N.
Proof. The N + 1 numbers {0·α}, {1·α}, …, {N·α} (fractional parts) lie in [0, 1), which is the union of N intervals of length 1/N. Two of them, say {iα} and {jα} with i < j, lie in the same interval; take q = j − i and p the difference of the integer parts. ∎
Ramsey numbers
The Ramsey number R(s, t) is the least n such that every red–blue colouring of the edges of Kₙ contains a red Kₛ or a blue Kₜ. Ramsey (1930) proved that such n exists in a lemma on decidability in logic; Erdős and Szekeres rediscovered it in 1935.
Theorem 11.3. R(3, 3) = 6.
Proof. Colour the edges of K₆ and fix a vertex v. Of its five edges, at least three have the same colour, say red, to vertices a, b, c. If any edge among a, b, c is red, it forms a red triangle with v; otherwise a, b, c form a blue triangle. So R(3, 3) ≤ 6. For the lower bound, colour the edges of a pentagon (the 5-cycle) red and its diagonals blue; the red graph C₅ and the blue graph (again a C₅) contain no triangle. ∎
Theorem 11.4 (Erdős–Szekeres). For s, t ≥ 2, R(s, t) ≤ R(s − 1, t) + R(s, t − 1). If both terms on the right are even, the inequality is strict. Consequently R(s, t) ≤ C(s + t − 2, s − 1).
Proof. Let n = R(s − 1, t) + R(s, t − 1) and colour Kₙ. A vertex v has n − 1 neighbours, so either at least R(s − 1, t) of them are joined to v by red edges or at least R(s, t − 1) by blue edges. In the first case, the red neighbourhood contains a blue Kₜ (done) or a red Kₛ₋₁, which together with v forms a red Kₛ. The second case is symmetric. If both numbers are even and n − 1 is odd, a colouring with no red Kₛ and no blue Kₜ on n − 1 vertices would need every vertex to have red degree exactly R(s − 1, t) − 1, which is odd; but then the red graph would have an odd number of vertices of odd degree, contradicting the handshake lemma. The binomial bound follows by induction from R(2, t) = t and Pascal's rule. ∎
Thus R(3, 4) ≤ R(2, 4) + R(3, 3) − 1 = 4 + 6 − 1 = 9, and in fact R(3, 4) = 9. Known exact values include R(3, 5) = 14, R(4, 4) = 18 (Greenwood and Gleason, 1955, using the Paley graph on 17 vertices, whose edges join residues mod 17 differing by a quadratic residue) and R(4, 5) = 25 (McKay and Radziszowski, 1995). For R(5, 5) only 43 ≤ R(5, 5) ≤ 46 is known, the upper bound due to Angeltveit and McKay (2024). Erdős famously remarked that if aliens demanded the value of R(5, 5) we should marshal all our computers to find it, but if they asked for R(6, 6) we should try to destroy them.
Multicolour Ramsey numbers
The same argument shows that R(3, 3, 3), the least n such that every 3-colouring of Kₙ has a monochromatic triangle, satisfies R(3, 3, 3) ≤ 3(R(3, 3) − 1) + 2 = 17: a vertex of K₁₇ has 16 edges, so six of them have one colour, and the six neighbours span a monochromatic triangle in that colour or a 2-coloured K₆. Greenwood and Gleason showed R(3, 3, 3) = 17. This is closely tied to Schur's theorem (1916): for every r there is N such that any r-colouring of [N] contains x, y, z of one colour with x + y = z; colour the edge {i, j} of KN+1 by the colour of |i − j| and look for a monochromatic triangle.
Asymptotics of diagonal Ramsey numbers
Theorem 11.4 gives R(k, k) ≤ C(2k − 2, k − 1) < 4ᵏ, and Erdős's probabilistic argument (Lesson 13) gives R(k, k) > 2k/2. For more than seventy-five years the exponential bases √2 and 4 were not improved, apart from lower-order factors. In 2023 Campos, Griffiths, Morris and Sahasrabudhe proved R(k, k) ≤ (4 − ε)ᵏ for some fixed ε > 0, the first exponential improvement of the upper bound. The lower bound has seen only a constant-factor improvement since 1947 (Spencer, via the local lemma). The infinite Ramsey theorem — every 2-colouring of the pairs of ℕ has an infinite monochromatic set — follows by a compactness or a direct greedy argument, and its finite form, through the Paris–Harrington variant, gives a true statement of arithmetic unprovable in Peano arithmetic.
Exercise
- (a)Show that every 2-colouring of K₆ contains at least two monochromatic triangles.
- (b)What is the least N such that every sequence of N distinct reals has a monotone subsequence of length 5?
- (c)Bound R(3, 5) using Theorem 11.4.
Show solution
Answers: (a) Call a pair of edges at a common vertex bichromatic if they differ in colour. A vertex with r red and 5 − r blue edges is the apex of r(5 − r) ≤ 6 bichromatic pairs, so there are at most 36 in total. Each non-monochromatic triangle contains exactly two bichromatic pairs and each monochromatic triangle none, so at most 18 of the C(6, 3) = 20 triangles are non-monochromatic, and at least 2 are monochromatic. (Goodman, 1959, determined the minimum for every n.) (b) N = 4·4 + 1 = 17. (c) R(3, 5) ≤ R(2, 5) + R(3, 4) = 5 + 9 = 14, which is the exact value.