On this page
Seven students share a hostel corridor. You want as many pairs of friends as possible, but no three students may all be friends with each other. How many friendships can there be? The answer is 12.
What does Turán's theorem say?
A graph is a set of points (vertices) with some pairs joined by lines (edges), and Kₖ means k vertices all joined to each other. Turán's theorem states that every graph with n vertices that does not contain Kᵣ₊₁ has at most as many edges as the Turán graph T(n, r) (Turán's theorem, Wikipedia).
The Turán graph T(n, r) splits n vertices into r groups with sizes as equal as possible and joins two vertices exactly when they sit in different groups (Turán graph, Wikipedia). Its edge count is ⌊(1 − 1/r)n²/2⌋, so for large n a Kᵣ₊₁-free graph can hold only about a fraction 1 − 1/r of all possible edges.
Why can T(n, r) never contain Kᵣ₊₁? Pick any r + 1 of its vertices. There are only r groups, so by the pigeonhole principle two of them share a group, and those two are not joined. The same pigeonhole step drives why six people always contain three friends or three strangers.
Pál Turán (1910–1976) published the result in 1941 in the Hungarian journal Matematikai és Fizikai Lapok; it is one of the central results of extremal graph theory (Turán's theorem, Wikipedia). His MacTutor biography records that he was sent to a labour camp in 1940, and that extremal graph theory, an area he founded, was one of the "best ideas" he had in the camps.
Why can a triangle-free graph have at most n²/4 edges?
The case r = 2 is older. Willem Mantel stated it in 1907: the maximum number of edges in an n-vertex triangle-free graph is ⌊n²/4⌋ (Turán's theorem, Wikipedia). A short proof:
Take a triangle-free graph G with e edges, and let v be a vertex of largest degree, d.
Call v's neighbours A. No two vertices of A are joined, or they would form a triangle with v.
So every edge has at least one end in B, the other n − d vertices.
Each vertex of B has degree at most d, so e ≤ (n − d)·d.
By AM–GM, (n − d)·d ≤ (n/2)² = n²/4. Since e is a whole number, e ≤ ⌊n²/4⌋.
Equality needs two near-equal halves with every cross pair joined, which is exactly T(n, 2).
How does Turán's theorem work for n = 7?
Start with no triangles (r = 2). Split 7 vertices as 4 and 3 and join across: 4 × 3 = 12 edges, and ⌊49/4⌋ = 12, so the hostel corridor can hold 12 friendships. The lopsided splits do worse: 5 and 2 gives 10, and 6 and 1 gives 6.
Now forbid K₄ instead (r = 3). Split 7 as 3, 2, 2 and join every pair from different groups:
3 × 2 = 6 edges between the first and second groups
3 × 2 = 6 edges between the first and third groups
2 × 2 = 4 edges between the second and third groups
That is 16 edges, and the Turán graph formula agrees: (2/3) × 49/2 = 16.33, which rounds down to 16. Compare 3, 3, 1 (15 edges) and 5, 1, 1 (11 edges). K₇ has 21 edges, so destroying every K₄ means deleting at least 5; the 5 edges inside the three groups do it.
Notice that T(7, 3) is full of triangles: take one vertex from each group. Forbidding K₄ allows triangles; forbidding triangles allows only two groups.
How do you use Turán's theorem in olympiad problems?
Most problems hide the graph. Five steps:
Translate: people, cities or points become vertices; a relation becomes an edge.
Name the forbidden clique: "no three mutual friends" is K₃, "no four" is K₄.
Guess the extremal example: r near-equal groups, all cross pairs joined.
Prove the bound with the largest-degree argument, or quote Turán.
Check the equality case with small n.
Edge-counting bounds also settle why the three-utilities lines must cross, and the translate-into-a-graph step drives Hall's marriage theorem.
If terms like clique, degree or bipartite graph still feel shaky, the Fermi Concept Library gives each concept in mathematics its own lesson and its place in the map. For practice, the Fermi Problem Library has worked problems with a step-by-step solver that explains the reasoning rather than printing an answer.
Try n = 8 with no K₄ next: the split is 3, 3, 2, and the answer is 21.



