sciencebriefs
13:00in productionCh. 1 · Too many items, too few boxes/ 13:00 · ceiling 15 min
Mathematics

Ramsey theory

At any party of six people, mathematics guarantees either three mutual acquaintances or three mutual strangers — a provable fact built on an idea so simple it dates to 1622, and one that grows, in Ramsey theory generally, into numbers too large to compute.

The pigeonhole principle, that placing more items into containers than there are containers forces at least one container to hold more than one item, was recorded as early as 1622 and popularised by Peter Gustav Lejeune Dirichlet in 1834. Frank Ramsey's 1930 paper extended this simple counting idea into a proof that sufficiently large structures must contain a specified pattern however they are arranged, illustrated by the fact that any group of six people must contain either three mutual acquaintances or three mutual strangers. Ramsey theory has since guaranteed structure in many other settings, from arithmetic progressions to formal languages, but the numbers it proves must exist often grow so explosively, sometimes as fast as the Ackermann function, that they are known to exist without anyone being able to compute their exact value.

Chapters & takeaways6
  1. 0:08
    Too many items, too few boxes

    The pigeonhole principle, first recorded in 1622, simply says more items than containers forces at least one container to hold more than one.

  2. 2:10
    Six people, a guaranteed pattern

    Frank Ramsey's 1930 work led to the proof that any six people must include three mutual acquaintances or three mutual strangers.

  3. 4:20
    From socks to shared birthdays

    The same basic reasoning guarantees, among 367 people, that two must share a birthday, since only 366 birthdays exist to go around.

  4. 6:30
    Proven to exist, impossible to compute

    Many Ramsey-type results guarantee a pattern exists in a structure so large that its exact size cannot currently be calculated.

  5. 8:40
    A number too big to use

    Graham's number, one of the largest figures ever used in a serious mathematical proof, appears as an upper bound in a Ramsey-related problem.

  6. 10:50
    A two-hundred-terabyte proof

    A related combinatorial problem was resolved in 2016 only by a computer-generated proof so large it occupied 200 terabytes of storage.

Worth your time?

Yes. Study the whole thing.

4/ 5
What works
  • the six-person party example is testable in your head and makes an abstract guarantee feel immediate
  • the progression from a 1622 counting observation to Frank Ramsey's 1930 theorem shows one simple idea deepening over three centuries
  • the 200-terabyte proof of a related problem gives the theory's computational difficulty a concrete, almost absurd, scale to hold onto
What does not
  • these results are non-constructive: they prove a pattern must exist without offering any way to find it beyond exhaustive search
  • exact Ramsey numbers for even modest cases remain unknown, and some proven bounds are far larger than any value likely to matter in practice
Study it if
  • anyone who wants to see a genuinely simple idea, more pigeons than holes, grow into some of the hardest-to-compute numbers in mathematics
  • readers who enjoy a mathematical guarantee they can test on their own group of friends
  • anyone curious how a proof can establish that something exists without anyone being able to say exactly what it is
Skip it if
  • readers wanting the exact values of larger Ramsey numbers, since many remain genuinely unknown and effectively uncomputable with current methods
  • anyone looking for a practical, everyday use of the theory rather than an appreciation of the pattern-guarantee itself
The written brief4 min read

Too many items, too few boxes

The foundational claim is almost embarrassingly simple to state: if more items are placed into containers than there are containers to hold them, at least one container must end up holding more than one item. This idea, now called the pigeonhole principle, appears in print as early as 1622, in a work by Jean Leurechon, and was popularised in a more developed form by Peter Gustav Lejeune Dirichlet in 1834, whose German term for it, translating to drawer principle, gave the idea one of its alternate names. On its own this sounds too obvious to be useful, but it turns out to force conclusions that are far from obvious once applied carefully: among London’s more than nine million residents, for instance, since no human head is thought to carry more than roughly a million hairs, at least ten people in the city must share the exact same number of hairs on their head.

Six people, a guaranteed pattern

Frank Ramsey’s 1930 paper, On a Problem of Formal Logic, extended this style of reasoning considerably further, establishing that sufficiently large structures must contain a specified pattern no matter how they are arranged, not just that some container must be overfull. The clearest illustration is the party problem: colour every connection between six people as either acquaintance or stranger, and the theorem guarantees that at least three of them must be mutual acquaintances or at least three must be mutual strangers, a result written as R(3,3) equals 6. This generalises to a whole family of Ramsey numbers, each specifying how large a structure must be to force a particular guaranteed pattern, and the same underlying logic, guaranteed structure emerging from sufficient scale, has since produced related results such as van der Waerden’s theorem, guaranteeing evenly spaced numerical patterns in any large enough coloured sequence of integers.

From socks to shared birthdays

What has held up completely is the logical certainty of these guarantees: a Ramsey-type theorem, once proved, is not a strong likelihood but a mathematical certainty, and the same is true of the underlying pigeonhole reasoning, which extends cleanly to much larger settings than a handful of socks in a drawer. Among 367 randomly chosen people, for example, two are certain to share a birthday, since there are only 366 possible birthdays to distribute across a larger number of people, an application with total, rather than merely probable, certainty behind it. This same style of guaranteed-pattern reasoning underlies proofs in areas as different as formal language theory, where it forms the basis of the pumping lemma used to show certain languages cannot be recognised by simple automata, and information theory, where it proves that no lossless compression method can shrink every possible input, since there are simply not enough shorter outputs to represent every longer input uniquely.

Proven to exist, impossible to compute

What Ramsey theory does not deliver, even when it proves a pattern must exist, is any practical way to find that pattern short of exhaustive search, and the numbers involved often grow far beyond anything that can actually be computed. Some proven bounds in the field grow as fast as the Ackermann function, an extraordinarily fast-growing mathematical function, and Graham’s number, one of the largest figures ever to appear in a serious mathematical proof, arises as an upper bound in a problem closely related to Ramsey theory. Even determining the exact Ramsey number for relatively modest cases remains, in practice, algorithmically intractable, and a related combinatorial problem, the Boolean Pythagorean triples problem, was only resolved in 2016 by a computer-generated proof so large it occupied roughly 200 terabytes of storage, illustrating that even a fully proven guarantee can be almost unusably expensive to pin down exactly.

A number too big to use

The practical stakes of this reasoning extend well past party games and hair-counting. The pigeonhole argument that no lossless compression scheme can shrink every input file underlies a basic, load-bearing limit that every data compression algorithm must respect, since it proves mathematically that some inputs must come out the same size or larger no matter how cleverly the algorithm is designed. The pumping lemma built on the same style of reasoning gives computer scientists a standard tool for proving that certain formal languages are fundamentally too complex for the simplest class of recognising machines to handle. Even outside these applied settings, the theory sets a genuine limit on human intuition about randomness and scale: results like the guaranteed shared birthday among a few hundred people, or the guaranteed acquaintance pattern among six party guests, show how quickly apparent randomness gives way to forced structure once a group crosses a specific, calculable size.

A two-hundred-terabyte proof

Yes, and it is a satisfying subject precisely because of the contrast at its centre: an idea simple enough to explain to a child, that you cannot fit more pigeons into holes than the holes can accommodate without doubling up, turns out to generate some of the largest and least tractable numbers in all of mathematics once pushed far enough. The six-person party example is worth trying to work out for yourself before reading the answer, since doing so gives a genuine feel for why the guarantee has to hold rather than merely being told that it does. It is a good demonstration of how a field of mathematics can be simultaneously completely rigorous in what it proves and completely impractical in what it lets you actually calculate.

Same field · Mathematics4 of 15
Up next in Science

2019 revision of the SI

2018 · 13:00

On 20 May 2019 the kilogram stopped being a chunk of metal in France and became a consequence of the Planck constant. The vote took eleven years to arrive and left a few loose mathematical ends behind.

13:00