Triangle-free graphs have at most n²/4 edges (Mantel)
Statement
A graph on vertices has no triangle. Prove that it has at most edges. When is equality possible?
Hint
If and are adjacent, can they have a common neighbour? Deduce a bound on , then sum over all edges.
Show solutionHide solution
Solution
Idea. Count the pairs (vertex, edge containing it) in two ways.
Local bound. Let be an edge. If a vertex were adjacent to both and , then would be a triangle. So the neighbourhoods of and are disjoint, and
Summation. Let be the number of edges. Summing over all edges ,
On the left, each vertex appears times, each with the term . So the left side equals :
Cauchy–Schwarz. Since ,
Conclusion. , so .
Equality. For even, the complete bipartite graph is triangle-free with edges. For odd, the bound is and is attained by .
Lesson. Double counting: when a sum over edges involves degrees, rewrite it as a sum over vertices; combine with Cauchy–Schwarz.