Problem. Among how many people must there be three mutual friends or three mutual strangers? Answer: 6 (): 5 people are not enough.
bool monoTriangle(int n, long long colouring) { // bit e = colour of edge e in the order (0,1), (0,2), ..., (n-2, n-1)
vector<vector<int>> col(n, vector<int>(n)); int e = 0;
for (int i = 0; i < n; i++) for (int j = i + 1; j < n; j++) col[i][j] = col[j][i] = colouring >> e++ & 1;
for (int i = 0; i < n; i++) for (int j = i + 1; j < n; j++) for (int k = j + 1; k < n; k++)
if (col[i][j] == col[j][k] && col[j][k] == col[i][k]) return true;
return false;
}| Ramsey number | Value |
|---|---|
| 6 | |
| 9 | |
| 18 | |
| between 43 and 46 (open) | |
| general bound |
Proof: R(3, 3) = 6
Six suffice. Take any person . Of the 5 others, by pigeonhole at least 3 have the same relation to , say friends . If any two of are friends, they form a friendly triangle with ; otherwise are mutual strangers. Five do not. Seat 5 people in a circle; neighbours are friends, others strangers. The friendship graph is a 5-cycle and the stranger graph is the complementary 5-cycle; neither contains a triangle. The general bound follows the same way: . Checked by brute force over all colourings of (some avoid monochromatic triangles) and all colourings of (none do).