Ramsey Theory - The Party Problem
Intro
How many people must be at a party to guarantee that at least people all know each other or at least 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 . 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 with 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 is defined as a subgraph of 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 (), or in other words a red or a blue triangle.
Red triangle represents all three people know each other
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 which does not contain a red or blue triangle:
counterexample
Now we must show that for any red/blue colouring of there must always be a red triangle or a blue triangle. Consider a node of and the colours of its five edges to the other five nodes in the graph:
A node and its edge colours in
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:
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 there exists a minimum number called a Ramsey number such that for any complete graph with vertices will contain either a red clique of size or a blue clique of size .
By the above, we've shown that .
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 people.