Tutorials › Graph Theory (Undergraduate) › Clique-Free Extremal Numbers from Turán’s Theorem

Turan's Theorem and Extremal Problems · Tutorial 552 of 799

Clique-Free Extremal Numbers from Turán's Theorem

Learn to translate a forbidden clique into the number of Turán parts, calculate the exact extremal edge count, and check the result using independent edge counts.

Advanced 9 min read

What You'll Learn

  • Translate forbidding K_{r+1} into the balanced complete r-partite graph T_r(n).
  • Use quotient and remainder to determine the part sizes.
  • Derive a formula for the number of edges in a complete multipartite graph.
  • Compute extremal numbers for forbidding triangles, K4, and K5.
  • Check edge counts by counting cross-part pairs and by subtracting within-part pairs.
  • Avoid confusing the forbidden clique size with the number of parts.

From a Forbidden Clique to an Edge Count

Extremal graph questions ask how many edges a graph can have while avoiding a specified subgraph. For a forbidden clique, Turán’s theorem gives an exact answer: the extremal graph is complete multipartite, with its parts as equal in size as possible. The calculation has two decisions. First, translate the forbidden clique into the correct number of parts; then distribute the vertices among those parts and count the edges between them.

All graphs in this tutorial are finite, simple, and undirected. A subgraph is not required to be induced. Thus a graph is \(K_{r+1}\)-free if it has no set of \(r+1\) vertices that are pairwise adjacent. For a fixed forbidden graph \(F\), \(\operatorname{ex}(n,F)\) denotes the largest number of edges in an \(n\)-vertex graph containing no subgraph isomorphic to \(F\).

Definition: The Turán graph \(T_r(n)\) is the complete \(r\)-partite graph on \(n\) vertices whose part sizes differ by at most one. It has no edges within a part and has every possible edge between distinct parts. Empty parts are allowed when \(r>n\).

The number of parts is determined by the forbidden clique: to avoid \(K_{r+1}\), use \(r\) parts, not \(r+1\). A clique in a complete \(r\)-partite graph can have at most one vertex from each part, so it has at most \(r\) vertices. Turán’s theorem says that among all \(K_{r+1}\)-free graphs on \(n\) vertices, \(T_r(n)\) has the maximum number of edges. The theorem and its proof by symmetrization were established in the earlier material on Turán’s theorem; here we use it to obtain explicit extremal numbers.

Counting Edges from the Part Sizes

Let a complete \(r\)-partite graph have parts of sizes \(a_1,\ldots,a_r\), where each \(a_i\) is a nonnegative integer and \(\sum_{i=1}^{r}a_i=n\). Each edge joins vertices in two different parts. This gives a direct count, and a second count follows by starting with all vertex pairs and removing the pairs that lie within a part.

Lemma: A complete multipartite graph with part sizes \(a_1,\ldots,a_r\) has \[ |E|=\sum_{1\le i<j\le r}a_i a_j =\frac{1}{2}\left(n^2-\sum_{i=1}^{r}a_i^2\right). \]

Proof. For each pair of distinct parts \(i,j\), there are \(a_i a_j\) vertex pairs with one endpoint in each part, and all of them are edges. Summing over the pairs of parts gives \(|E|=\sum_{i<j}a_i a_j\). Also, \[ \left(\sum_{i=1}^{r}a_i\right)^2 =\sum_{i=1}^{r}a_i^2+2\sum_{i<j}a_i a_j. \] Since \(\sum_i a_i=n\), rearranging gives the stated formula. The argument also covers empty parts, whose contributions are zero. \(\square\)

To calculate the sizes in \(T_r(n)\), divide \(n\) by \(r\). Write \[ n=qr+s,\qquad q=\left\lfloor\frac nr\right\rfloor,\qquad 0\le s<r. \] The balanced parts consist of \(s\) parts of size \(q+1\) and \(r-s\) parts of size \(q\). Indeed, their total size is \(s(q+1)+(r-s)q=qr+s=n\), and their sizes differ by at most one.

Theorem (Turán number for a clique): For integers \(n\ge1\) and \(r\ge1\), if \(n=qr+s\) with \(0\le s<r\), then \[ \operatorname{ex}(n,K_{r+1})=|E(T_r(n))| =\frac{1}{2}\left(n^2-s(q+1)^2-(r-s)q^2\right). \]

Proof. By Turán’s theorem, the maximum number of edges in an \(n\)-vertex \(K_{r+1}\)-free graph is the number of edges in \(T_r(n)\). The part sizes of \(T_r(n)\) are \(s\) copies of \(q+1\) and \(r-s\) copies of \(q\), so the sum of their squares is \(s(q+1)^2+(r-s)q^2\). Substituting these sizes into the lemma gives the displayed edge count, and therefore the stated value of \(\operatorname{ex}(n,K_{r+1})\). If \(r>n\), then \(q=0\) and \(s=n\); the formula gives \(\binom n2\), as \(T_r(n)\) is the complete graph on \(n\) vertices. If \(r=1\), it gives zero, as a \(K_2\)-free graph has no edges. \(\square\)

Worked Applications

Worked Example: Forbidding Triangles on 11 Vertices

Find \(\operatorname{ex}(11,K_3)\). A triangle is \(K_3=K_{2+1}\), so use \(r=2\) parts. Divide \(11\) by \(2\): \(11=5\cdot2+1\), so \(q=5\) and \(s=1\). The part sizes of \(T_2(11)\) are \(6\) and \(5\).

For specificity, take \(V=\{1,2,\ldots,11\}\), with parts \(A=\{1,2,3,4,5,6\}\) and \(B=\{7,8,9,10,11\}\). Define \(E=\{uv:u\in A,\ v\in B\}\). This is a complete bipartite graph, so it contains no triangle: among any three vertices, at least two lie in the same part, and those two are not adjacent.

Count the edges between the parts: there are \(6\cdot5=30\). The formula gives \[ \frac12\left(11^2-\left(6^2+5^2\right)\right) =\frac12(121-61)=30. \] Thus Turán’s theorem gives \(\operatorname{ex}(11,K_3)=30\).

Check: There are \(\binom{11}{2}=55\) vertex pairs in total. The pairs within the parts number \(\binom62+\binom52=15+10=25\), so the number across the parts is \(55-25=30\), agreeing with the direct count.

Worked Example: Forbidding K4 on 10 Vertices

Find \(\operatorname{ex}(10,K_4)\). Since \(K_4=K_{3+1}\), use \(r=3\). The division is \(10=3\cdot3+1\), so \(q=3\) and \(s=1\). The balanced parts have sizes \(4,3,3\).

Let \(V=\{1,2,\ldots,10\}\), and take parts \(A=\{1,2,3,4\}\), \(B=\{5,6,7\}\), and \(C=\{8,9,10\}\). Define \(E\) to consist of all pairs of vertices from different parts. No four vertices can be pairwise adjacent, because among four vertices distributed among three parts, two must belong to the same part and are nonadjacent. Hence this graph is \(K_4\)-free.

Count edges by part pairs: between \(A\) and \(B\) there are \(4\cdot3=12\); between \(A\) and \(C\) there are \(4\cdot3=12\); and between \(B\) and \(C\) there are \(3\cdot3=9\). The total is \(12+12+9=33\). The formula independently gives \[ \frac12\left(10^2-(4^2+3^2+3^2)\right) =\frac12(100-34)=33. \] Therefore \(\operatorname{ex}(10,K_4)=33\).

Check: There are \(\binom{10}{2}=45\) vertex pairs. The within-part pairs number \(\binom42+\binom32+\binom32=6+3+3=12\). Thus \(45-12=33\) pairs cross between parts, as required.

Worked Example: Forbidding K5 on 13 Vertices

Find \(\operatorname{ex}(13,K_5)\). Here \(K_5=K_{4+1}\), so use \(r=4\). Since \(13=3\cdot4+1\), we have \(q=3\) and \(s=1\). The part sizes are \(4,3,3,3\).

Take \(V=\{1,2,\ldots,13\}\) and parts \(A=\{1,2,3,4\}\), \(B=\{5,6,7\}\), \(C=\{8,9,10\}\), and \(D=\{11,12,13\}\). Let \(E\) consist of all pairs whose endpoints lie in distinct parts. Any five vertices place at least two vertices in the same one of the four parts; that pair is not an edge. Thus the graph is \(K_5\)-free.

There are three pairs involving \(A\) and one of \(B,C,D\), each contributing \(4\cdot3=12\) edges, for \(3\cdot12=36\). Between \(B,C,D\) there are \(\binom32=3\) pairs of parts, each contributing \(3\cdot3=9\), for \(3\cdot9=27\). The total is \(36+27=63\). The formula confirms this: \[ \frac12\left(13^2-(4^2+3^2+3^2+3^2)\right) =\frac12(169-43)=63. \] Hence \(\operatorname{ex}(13,K_5)=63\).

Check: Of the \(\binom{13}{2}=78\) vertex pairs, \(\binom42+3\binom32=6+9=15\) lie within parts. The remaining \(78-15=63\) pairs are edges.

Reading the Formula and Avoiding a Common Error

The formula is a practical calculation rule: identify \(r\) as one less than the forbidden clique size, divide \(n\) by \(r\), and use the quotient and remainder to form the balanced part sizes. The direct sum \(\sum_{i<j}a_i a_j\) is often the quickest way to count edges when there are only a few distinct part sizes. The square-sum expression is convenient for checking the count or applying the result to larger values.

Common mistake: using the forbidden clique size as the number of parts. Forbidding \(K_4\) means \(K_{3+1}\)-free, so the Turán graph has three parts. For example, on 12 vertices the relevant graph is \(T_3(12)\), with three parts of size \(4\), not four parts. Its edge count is \(\binom32(4\cdot4)=3\cdot16=48\). Equivalently, the square-sum calculation is \[ \frac12\left(12^2-3\cdot4^2\right) =\frac12(144-48)=48. \] Using four parts would instead construct a graph associated with forbidding \(K_5\), which answers a different extremal question.

A second useful check is to remember what is being counted: \(T_r(n)\) has edges only between different parts. Summing the sizes of the parts does not count edges, and counting within-part pairs gives nonedges, not edges. To check any calculation, either add all cross-part products or subtract all within-part pairs from \(\binom n2\).

Check Your Understanding

For each calculation, identify the number of parts before finding their sizes.

  1. Compute \(\operatorname{ex}(9,K_3)\) and verify it by counting pairs across the balanced parts.
  2. For \(n=14\) and forbidden clique \(K_5\), find \(q,s\), list the part sizes of \(T_r(n)\), and calculate the edge count in two ways.
  3. Explain why a complete \(r\)-partite graph contains no \(K_{r+1}\), even when some parts are empty.
  4. A student uses four parts to calculate \(\operatorname{ex}(10,K_4)\). Identify the mistake and state the correct number of parts.
  5. Use the formula to show that \(\operatorname{ex}(n,K_2)=0\) for every \(n\ge1\).