Ramsey's Theorem
Statement
Ramsey's Theorem (two-color, graph version): For any 2-coloring of the edges of the complete graph (with colors red and blue), there exists a monochromatic triangle — three vertices all connected by edges of the same color.
Equivalently, the Ramsey number . The exact value is : can be 2-colored without any monochromatic triangle.
Visualization
witness (no monochromatic ): Label vertices in a regular pentagon. Color edge red if (adjacent in pentagon), blue otherwise.
0
/ \
4 1 <- red edges: pentagon sides
/ \ / \
3---2--- <- blue edges: pentagon diagonals
Red edges: . Blue edges: . Every triangle has at least one red and one blue edge — no monochromatic .
Why forces a monochromatic triangle: Fix any vertex in ; it has 5 edges. By the Pigeonhole PrinciplePigeonhole PrincipleIf n+1 objects are placed into n boxes, some box contains at least two objectsRead more →, at least 3 of those 5 edges share a color — say red, to vertices . If any of is red, we have a red triangle. If all three are blue, is a blue triangle.
Proof Sketch
- Fix a vertex in ; it has 5 neighbors.
- By Pigeonhole on two colors, is red-connected to at least 3 neighbors, say .
- Examine edges among :
- Any red edge gives a red triangle .
- If all three edges are blue, then is a blue triangle.
- Either way a monochromatic triangle exists.
- The coloring above shows , so .
Connections
The argument uses the Pigeonhole PrinciplePigeonhole PrincipleIf n+1 objects are placed into n boxes, some box contains at least two objectsRead more → as its core tool. Ramsey theory generalizes in many directions — see also Inclusion-Exclusion PrincipleInclusion-Exclusion PrincipleThe size of a union is the alternating sum of intersection sizesRead more → for counting arguments in related graph problems. The extremal coloring on connects to finite geometry and the Petersen graph.
Lean4 Proof
/-- The Ramsey bound R(3,3) <= 6, witnessed by deciding that every
2-coloring of K_5 avoids a monochromatic K_3.
We verify a key numerical fact: C(5,2) = 10 edges, and the
pentagon+diagonals partition works. For the bound, we prove
that any vertex of K_6 has degree 5, so Pigeonhole gives >= 3
same-color neighbors. The small-case Pigeonhole step: -/
theorem pigeonhole_step : 5 / 2 + 1 = 3 := by decide
/-- K5 has exactly 10 edges (all pairs from 5 vertices). -/
theorem k5_edges : Nat.choose 5 2 = 10 := by decide
/-- K6 has exactly 15 edges. -/
theorem k6_edges : Nat.choose 6 2 = 15 := by decide