advanced29 min studyLesson 621 in Mathematics

Turán's theorem and extremal density

Find the sharp edge threshold forcing a clique, including the balanced multipartite equality case and exact finite-size conventions.

On this page

What you’ll understand

  • State Turán's theorem with its forbidden clique and equality hypotheses.
  • Calculate the edge count of a balanced complete multipartite graph.
  • Separate exact extremal counts from their asymptotic density.

How many edges can a graph contain before a particular pattern becomes unavoidable? This question reverses the usual construction problem: instead of searching a given graph, we seek a threshold applying to every graph of the same order. Throughout this lesson graphs are finite, undirected, simple, and loopless. Copies are ordinary subgraphs, not necessarily induced. Those conventions matter: forbidding an induced clique happens to agree with forbidding a clique, but this agreement fails for many other patterns.

The construction comes before the bound

Fix integers n≥r≥2n\ge r\ge2. Divide the vertices into rr independent parts and join every pair in different parts. This complete multipartite graph contains no clique on r+1r+1 vertices, because a clique can use at most one vertex from each independent part. Its edge count is half the difference between the square of the total size and the sum of squared part sizes. The division by two removes the two orientations of each edge.

For a fixed total number of vertices, balancing the parts maximizes the edge count. If one part exceeds another by at least two, moving a vertex from the larger part to the smaller decreases the sum of squared sizes and therefore increases the edges. Repeat until all sizes differ by at most one. The resulting graph is the Turán graph Tr(n)T_r(n); the label r counts parts, while the forbidden clique has r plus one vertices.

e(Kn1,…,nr)=12(n2−∑i=1rni2),∑i=1rni=ne(K_{n_1,\ldots,n_r})=\frac12\left(n^2-\sum_{i=1}^r n_i^2\right),\qquad \sum_{i=1}^r n_i=n
Within-part ordered pairs are removed from all ordered vertex pairs; halving counts each remaining undirected edge once.↔ Scroll wide equations horizontally.

A sharp theorem, not only an asymptotic estimate

Turán's theorem says every graph on n vertices with no Kr+1K_{r+1} has at most as many edges as Tr(n)T_r(n). Equality occurs exactly for a graph isomorphic to that balanced complete r-partite graph. The statement supplies both a universal upper bound and the unique extremal structure, up to vertex relabeling. The theorem's general proof is not supplied here; symmetrization arguments transform an extremal graph into a multipartite one without losing edges or introducing the forbidden clique.

The triangle case has a short direct bound. If vertices u and v are adjacent in a triangle-free graph, their neighborhoods are disjoint, so their degrees sum to at most n. Summing over edges gives a bound on the sum of squared degrees. Cauchy–Schwarz supplies the opposite bound in terms of the total degree, and combining them yields at most n squared divided by four edges. Integer rounding gives Mantel's exact threshold. This proof illustrates how a local prohibition creates a global inequality.

ex⁡(n,Kr+1)=e(Tr(n)),ex⁡(n,K3)=⌊n24⌋\operatorname{ex}(n,K_{r+1})=e(T_r(n)),\qquad \operatorname{ex}(n,K_3)=\left\lfloor\frac{n^2}{4}\right\rfloor
The extremal number is the maximum number of edges in an n-vertex graph containing no ordinary copy of the specified forbidden graph.↔ Scroll wide equations horizontally.

Normalize only after deciding what is counted

We use edge density e(G)/(n2)e(G)/\binom n2 when n is at least two. For fixed r, the Turán density approaches 1−1/r1-1/r as n grows. The exact finite fraction can be larger than this limit because the denominator omits loops while the leading quadratic approximation uses n squared. For example, a balanced complete bipartite graph on four vertices has density four sixths, despite the asymptotic triangle-free threshold being one half. There is no contradiction between these two statements.

A sharp extremal theorem does not automatically classify every graph just below the threshold. Stability is a separate assertion that nearly extremal forbidden-pattern-free graphs are close to the extremal construction in a specified edit distance. Likewise, exceeding the threshold by one forces a clique, but it does not by this theorem alone give a sharp count of all cliques. The next lesson replaces an existence conclusion with a quantitative abundance conclusion and makes the limiting quantifiers explicit.

The exact K₄-free threshold on eleven vertices

Construct the largest K₄-free graph on eleven vertices and calculate its edges.

  1. A forbidden four-clique means r = 3 parts. Balancing eleven vertices gives part sizes 4, 4, and 3.

  2. Count crossing pairs directly: 4×4 + 4×3 + 4×3 = 16 + 12 + 12 = 40 edges. Equivalently, subtract 6 + 6 + 3 within-part pairs from the 55 total pairs.

  3. Turán's theorem proves that no K₄-free graph has more than 40 edges. If equality holds, the graph must be isomorphic to this complete tripartite construction.

The result

The maximum is 40 edges, attained uniquely up to isomorphism by K₄,₄,₃. Every eleven-vertex graph with 41 edges contains a K₄.

Explore the model

Interactive lab

Interactive lab · function

Why balancing two parts adds edges

Pause, reset, then set coefficient a to 1 and position x to 1. Predict y=1. For a fresh comparison, pause and reset, set a=1 and x=2, and predict y=4. Squared imbalance appears in the identity b(N−b)=N²/4−(b−N/2)². The lab plots y=ax², not a graph or a multipartite optimizer; translate its squared penalty into the edge formula yourself.

Why balancing two parts adds edgesThis lab uses only y = ax². Playback traces the curve within the fixed integration interval from 0 to x; it does not estimate numerical error or change the chosen point. Current readings: y at chosen x: 0.608; Tangent slope · 2ax: 1.35; Signed area · ax³/3: 0.182. All parameters are adjustable with the labeled controls below.−2.4−1.201.22.4−9−4.504.59xy(x, ax²)
y = ax²TangentSigned integral
y at chosen x
0.608
Tangent slope · 2ax
1.35
Signed area · ax³/3
0.182
t = 0 s

This lab uses only y = ax². Playback traces the curve within the fixed integration interval from 0 to x; it does not estimate numerical error or change the chosen point. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.

Look forA quadratic imbalance penalty explains the balancing step, while Turán's universal bound requires a graph-theoretic proof.

Check your understanding

Which graph attains the largest number of edges among K₅-free graphs on ten vertices?

Try it yourself

Calculate the K₅-free extremal edge count on ten vertices and determine whether 38 edges force a K₅.

Take a moment to make a prediction or work it out on paper. Open a hint when you need one.

Give me a hint

Use four balanced parts and either count crossing pairs or subtract the within-part pairs.

Compare with the solution

The part sizes are 3, 3, 2, and 2. Their squared sizes sum to 26, so the edge count is (100−26)/2=37. Equivalently, subtract 3+3+1+1=8 from the 45 pairs. Turán's theorem therefore implies that a graph with 38 edges must contain a K₅. The conclusion concerns ordinary subgraphs.

Take it with you

  • For a forbidden Kᵣ₊₁, the unique extremal graph is complete r-partite with balanced part sizes.
  • Exact finite edge counts include rounding that the limiting density suppresses.
  • Existence, abundance, and stability are distinct conclusions requiring distinct statements.

Read further

Original sources and deeper explanations to follow at your own pace.

Optional progress, saved in this browser when available. Revisit any lesson at any time.

Lesson not marked complete.