Mathwords logoMathwords

Ramsey Theory — Definition, Formula & Example

Ramsey theory is the branch of combinatorics that proves complete disorder is impossible: any structure that is large enough must contain an orderly piece, however you color or split it. It asks how large "large enough" has to be.

The Ramsey number R(s,t)R(s,t) is the least positive integer nn such that every coloring of the edges of the complete graph KnK_n in red and blue contains a red KsK_s or a blue KtK_t. Ramsey's theorem (1930) guarantees that R(s,t)R(s,t) is finite for all s,t≥1s,t \ge 1. The field also includes analogous results for the integers, such as Schur's theorem and van der Waerden's theorem on arithmetic progressions, and for hypercubes (the Hales–Jewett theorem).

Key Formula

R(s,t)≤(s+t−2s−1)R(s,t) \le \binom{s+t-2}{s-1}
Where:
  • R(s,t)R(s,t) = Smallest n that forces a red complete subgraph on s vertices or a blue one on t vertices
  • s,ts, t = Sizes of the required one-color complete subgraphs, each at least 1

Worked Example

Problem: Six cities are connected in pairs by direct flights. Each route is run by exactly one of two airlines, Red Air or Blue Air. Show that some three cities are linked to each other entirely by the same airline. Then explain why five cities are not enough.
Step 1: Model the cities as the vertices of K6K_6. Each route is an edge, so there are 15 edges, and each edge gets one of two colors.
(62)=15\binom{6}{2} = 15
Step 2: Pick any city vv. It has 5 routes. With only 2 colors, the pigeonhole principle forces at least 3 of those routes to share a color. Say vv connects to cities AA, BB, CC by Red Air.
⌈52⌉=3\left\lceil \tfrac{5}{2} \right\rceil = 3
Step 3: Look at the 3 routes among AA, BB, CC. If any one is red, it forms a red triangle with vv. If none is red, then AA, BB, CC form a blue triangle. Either way, a one-color triangle exists. For 5 cities, color the outer pentagon red and the inner 5-point star blue. Neither color contains a triangle, so 5 cities do not force one.
red AB, BC, or CA  ⇒  red triangle;otherwise △ABC is blue\text{red } AB,\ BC, \text{ or } CA \;\Rightarrow\; \text{red triangle}; \quad \text{otherwise } \triangle ABC \text{ is blue}
Answer: Six cities always contain a one-airline triangle, and five cities do not. So R(3,3)=6R(3,3) = 6, which matches the formula's upper bound (42)=6\binom{4}{2} = 6 exactly.

Why It Matters

Ramsey theory sits apart from counting questions such as "how many ways?" because it asks which pattern is unavoidable and at what size it appears. Erdős founded the probabilistic method in 1947 to prove the lower bound R(k,k)>2k/2R(k,k) > 2^{k/2}, and that method is now standard in theoretical computer science. Exact values are notoriously hard to find: R(4,4)=18R(4,4) = 18, but R(5,5)R(5,5) is still unknown, though it is known to be at least 43. Graham's number is not the subject of Ramsey theory. It is one famous upper bound that came out of a single Ramsey problem about coloring hypercubes.

Common Mistakes

Mistake: Checking a few colorings of K6K_6, finding a one-color triangle in each, and calling that a proof.
Correction: A Ramsey statement claims that every coloring contains the pattern. K6K_6 has 2152^{15} colorings, so you need an argument that covers all of them, like the pigeonhole step above. To show a smaller nn fails, you need just one coloring that avoids the pattern.

Related Terms

  • Set Theory — Infinite Ramsey theorems are statements about colorings of sets
  • Combinatorics — Parent field; Ramsey theory studies unavoidable patterns, not counts
  • Graham's Number — A huge upper bound from one Ramsey hypercube problem
  • Graph Theory — Supplies the complete graphs and edge colorings Ramsey numbers use
  • Number Theory — Home of Schur's and van der Waerden's Ramsey-type theorems