Ramsey Theory - The Party Problem

Cover Image for Ramsey Theory - The Party Problem

Intro

How many people must be at a party to guarantee that at least mm people all know each other or at least nn people all do not know each other? This is the Party Problem and is a fun result from the area of mathematics known as Ramsey Theory.

Triangles with two colours

Consider the case m,n=3m, n = 3. We'll sketch a proof that the minimum required number of people to guarantee at least three people will all know each other or all do not know each other is six.

Transforming this problem to a graph we start with the complete graph KiK_i with ii nodes and all possible edges between them. Each node represents a person at the party and we colour the edges either red or blue with red representing the two people at either end of the edge know each other and blue representing the two people at either end of the edge do not know each other. A clique of a graph GG is defined as a subgraph of GG that is also complete i.e. has all possible edges between its nodes. We are therefore looking for a red or a blue clique of size three (K3K_3), or in other words a red or a blue triangle.

k3-graph-red Red triangle represents all three people know each other

k3-graph-blue Blue triangle represents all three people do not know each other

First, we show a counterexample that the party must have more than five people. Here is a red/blue colouring of K5K_5 which does not contain a red or blue triangle:

k5-counterexample K5K_5 counterexample

Now we must show that for any red/blue colouring of K6K_6 there must always be a red triangle or a blue triangle. Consider a node of K6K_6 and the colours of its five edges to the other five nodes in the graph:

k6-pigeonhole A node and its edge colours in K6K_6

By the pigeonhole principle there must be at least three edges with the same colour. Without loss of generality let us assume we are looking at node 1 and the edges to 2, 3 and 4 are red. If this is not the case we can relabel the nodes and reverse the role of red and blue to make this true. Now, consider the colours of the edges between nodes 2, 3 and 4:

k6-red-or-blue-triangle Edges between 2, 3 and 4

We have two cases:

  • If there is at least one red edge we complete a red triangle
  • If there are no red edges then they must all be blue and we have a blue triangle

Therefore, the minimum number of people at a party to guarantee at least three people will all know each other or all do not know each other is six!

Ramsey's Theorem

More generally, Ramsey's Theorem states that for any positive integers m,nm, n there exists a minimum number R(m,n)R(m, n) called a Ramsey number such that for any complete graph with R(m,n)R(m, n) vertices will contain either a red clique of size mm or a blue clique of size nn.

By the above, we've shown that R(3,3)=6R(3, 3) = 6.

You can find some other Ramsey numbers at Wolfram MathWorld for example for a larger party to guarantee at least four people will all know each other or all do not know each other you would need a minimum of R(4,4)=18R(4, 4) = 18 people.