Three Forbidden Graphs, Three Kinds of Bound
An extremal problem asks how many edges a graph can have while avoiding a specified subgraph. A construction with many edges gives a lower bound for this maximum; an argument applying to every admissible graph gives an upper bound. To determine the exact maximum, both bounds must agree. This workshop carries out that plan for the path \(P_3\), the triangle \(K_3\), and the three-leaf star \(K_{1,3}\).
Thus a graph is \(F\)-free if it has no copy of \(F\) as a subgraph. Each graph used below is specified by its vertices and edges, or by a precise rule for its edge set. We will treat \(n\ge 1\). The constructions establish that the bounds are attainable, not merely that they cannot be exceeded.
Forbidding a Three-Vertex Path
The graph \(P_3\) consists of three vertices and two edges joining them in a path. In a simple graph, a vertex of degree at least two has two distinct neighbors; those two incident edges form a \(P_3\), even if the neighbors are also adjacent. Conversely, every copy of \(P_3\) has a vertex of degree at least two in the ambient graph. So being \(P_3\)-free is equivalent to having maximum degree at most one.
Proof. Let \(G\) be any \(P_3\)-free graph on \(n\) vertices. Every vertex has degree at most one. Each edge therefore uses two vertices that are incident with no other edge. The edges have pairwise disjoint endpoints, so \(m=|E(G)|\) edges use \(2m\) distinct vertices. Hence \(2m\le n\), and, since \(m\) is an integer, \(m\le\lfloor n/2\rfloor\).
For the reverse bound, take \(\lfloor n/2\rfloor\) disjoint edges and, when \(n\) is odd, one isolated vertex. This graph has maximum degree at most one, so it is \(P_3\)-free, and it has exactly \(\lfloor n/2\rfloor\) edges. The upper and lower bounds agree. \(\square\)
Worked Example: Avoiding \(P_3\) on Seven Vertices
Consider the graph \(G\) with \(V(G)=\{1,2,3,4,5,6,7\}\) and \(E(G)=\{12,34,56\}\). Each edge has endpoints disjoint from the other two edges, and vertex \(7\) is isolated. Thus every degree is at most one, so \(G\) contains no \(P_3\). Its edge count is \(m=3\).
The bound gives \(\lfloor 7/2\rfloor=3\). The displayed graph has three edges, while every \(P_3\)-free graph on seven vertices has at most three. Therefore \(\operatorname{ex}(7,P_3)=3\), and this graph attains the bound.
Check: the three edges use \(2\cdot3=6\) distinct vertices, leaving exactly \(7-6=1\) isolated vertex, as in the construction.
Forbidding a Triangle
A triangle-free graph contains no three pairwise adjacent vertices. The relevant local observation is that the neighborhoods of the endpoints of any edge cannot overlap: a shared neighbor would complete a triangle. This observation gives an edge bound, and a complete bipartite graph with balanced parts supplies a construction attaining it.
Proof. Let \(G\) be triangle-free, with \(m\) edges and degrees \(d(v)\). For any edge \(uv\), the neighborhoods \(N(u)\) and \(N(v)\) are disjoint: if a vertex \(w\) belonged to both, then \(uw\), \(vw\), and \(uv\) would form a triangle. Therefore \(d(u)+d(v)\le n\). Summing this inequality over all \(m\) edges gives \(\sum_{v\in V(G)}d(v)^2\le mn\), because a vertex \(v\) contributes \(d(v)\) once for each of its \(d(v)\) incident edges.
Counting edge endpoints gives \(\sum_v d(v)=2m\). Also, \(\sum_v(d(v)-2m/n)^2\ge0\); expanding and using \(\sum_vd(v)=2m\) yields \(\sum_vd(v)^2\ge4m^2/n\). Thus \(4m^2/n\le mn\). If \(m=0\), the claimed bound is immediate. If \(m>0\), dividing by \(m\) and multiplying by \(n/4\) gives \(m\le n^2/4\), and integrality gives \(m\le\lfloor n^2/4\rfloor\).
For attainment, partition the \(n\) vertices into sets of sizes \(\lfloor n/2\rfloor\) and \(\lceil n/2\rceil\), and join every pair with one endpoint in each set, with no edges inside either set. This is a complete bipartite graph: it is triangle-free because a triangle cannot alternate between two parts and return to its starting part. Its number of edges is the product of the part sizes. If \(n=2q\), that product is \(q^2=n^2/4\). If \(n=2q+1\), it is \(q(q+1)=(n^2-1)/4=\lfloor n^2/4\rfloor\). The construction attains the upper bound in both cases. \(\square\)
Worked Example: A Triangle-Free Graph on Seven Vertices
Let \(G\) have vertex set \(\{1,2,3,4,5,6,7\}\) and edge set \(\{14,15,16,17,24,25,26,27,34,35,36,37\}\). Equivalently, its parts are \(\{1,2,3\}\) and \(\{4,5,6,7\}\), and every cross-part pair is an edge. No edge lies within a part. A triangle would have to use three vertices with every pair adjacent, but among any three vertices at least two lie in the same part; that pair is not an edge. So \(G\) is triangle-free.
There are \(3\cdot4=12\) cross-part pairs, hence \(m=12\). The upper bound is \(\lfloor 7^2/4\rfloor=\lfloor49/4\rfloor=12\), so \(\operatorname{ex}(7,K_3)=12\).
Check: vertices \(1,2,3\) each have degree \(4\), and vertices \(4,5,6,7\) each have degree \(3\). The degree sum is \(3\cdot4+4\cdot3=12+12=24=2m\), confirming the edge count independently.
Forbidding a Three-Leaf Star
The star \(K_{1,3}\) has one centre joined to three leaves. A graph contains it as a subgraph exactly when some vertex has at least three distinct neighbors: select that vertex and any three of those neighbors, and retain the three incident edges. Edges among the selected leaves do not prevent this copy, since the copy need not be induced. Therefore a \(K_{1,3}\)-free graph has maximum degree at most two.
Proof. Let \(G\) be \(K_{1,3}\)-free on \(n\) vertices. Every degree is at most two. Counting each edge at both endpoints gives \(\sum_v d(v)=2m\), so \(2m\le2n\), and hence \(m\le n\). For \(n=1\), a simple graph has no edges, so the maximum is zero. For \(n=2\), simplicity allows at most one edge; the graph \(K_2\), with its two vertices joined by one edge, is \(K_{1,3}\)-free and attains that bound. For \(n\ge3\), the cycle \(C_n\) is simple, has \(n\) edges, and every vertex has degree two. It is \(K_{1,3}\)-free and attains the upper bound \(m\le n\). \(\square\)
Worked Example: Attaining the Star-Free Bound on Five Vertices
Take \(G\) with \(V(G)=\{1,2,3,4,5\}\) and \(E(G)=\{12,23,34,45,51\}\). This is \(C_5\). Each vertex has degree two: its two neighbors are the preceding and following vertices around the listed cycle. Thus no vertex can be the centre of a \(K_{1,3}\), and \(G\) is \(K_{1,3}\)-free. The edge set has five edges, so \(m=5\).
For every \(K_{1,3}\)-free graph on five vertices, the degree bound gives \(2m=\sum_vd(v)\le2\cdot5=10\), and therefore \(m\le5\). The cycle attains this bound, so \(\operatorname{ex}(5,K_{1,3})=5\).
Check: the five listed edges contribute \(2\cdot5=10\) edge endpoints, and the five degrees, each equal to two, also sum to \(5\cdot2=10\).
For \(n\ge3\), equality in the star-free bound has a useful extra consequence. If \(m=n\), then \(\sum_vd(v)=2n\). Since there are \(n\) vertices and each degree is at most two, every degree must equal two: if even one degree were below two, the sum would be below \(2n\). A finite simple graph in which every vertex has degree two is a disjoint union of cycles. Indeed, following successive edges from any vertex must eventually revisit a vertex because the graph is finite; degree two forces the resulting component to be a cycle. Thus the extremal graphs in this case are precisely the disjoint unions of cycles on at least three vertices.
How to Check an Extremal Answer
These problems illustrate a reliable proof structure. First translate the forbidden subgraph condition into a constraint that can be counted: for \(P_3\), each edge has endpoints not used by another edge; for \(K_3\), neighborhoods across an edge are disjoint; for \(K_{1,3}\), degrees are at most two. Next derive an upper bound valid for every graph satisfying that constraint. Finally, give a graph that satisfies the constraint and has exactly as many edges as the bound allows.
A common mistake is to treat an upper bound as if it already proved the exact extremal number. For example, when \(n=2\), the degree argument for \(K_{1,3}\)-free graphs gives \(m\le n=2\), but that does not imply \(\operatorname{ex}(2,K_{1,3})=2\). A simple graph on two vertices has at most one edge, and \(K_2\), with vertex set \(\{1,2\}\) and edge set \(\{12\}\), is \(K_{1,3}\)-free. Hence the exact value is one. In general, an upper bound needs a matching construction, and a construction alone needs a matching upper bound.
A second pitfall is silently changing “subgraph” to “induced subgraph.” For instance, a triangle contains a \(P_3\) as a subgraph: select two of its edges and omit the third. A triangle is not an induced \(P_3\) on those three vertices, but induced containment is not the condition in \(\operatorname{ex}(n,P_3)\). Reading the forbidden condition precisely is essential before using degrees or counting edges.
Check Your Understanding
For each question, identify both the universal upper bound and a construction that meets it.
- Describe an extremal \(P_3\)-free graph on eight vertices and verify its edge count.
- Explain why two adjacent vertices cannot have a common neighbor in a triangle-free graph.
- For \(n=6\), give the part sizes and edge count of a complete bipartite graph attaining \(\operatorname{ex}(n,K_3)\).
- What maximum-degree condition is equivalent to being \(K_{1,3}\)-free, and why does it imply \(m\le n\)?
- Why does the upper bound \(m\le1\) for a \(K_{1,3}\)-free graph on two vertices need a construction before it establishes the exact extremal number?