# Forbidden subgraph problem

In extremal graph theory, the forbidden subgraph problem is the following problem: given a graph $G$, find the maximal number of edges $\operatorname {ex} (n,G)$ an $n$-vertex graph can have such that it does not have a subgraph isomorphic to $G$. In this context, $G$ is called a forbidden subgraph.
An equivalent problem is how many edges in an $n$-vertex graph guarantee that it has a subgraph isomorphic to $G$?

## Definitions

The extremal number $\operatorname {ex} (n,G)$ is the maximum number of edges in an $n$-vertex graph containing no subgraph isomorphic to $G$. $K_{r}$ is the complete graph on $r$ vertices. $T(n,r)$ is the Turán graph: a complete $r$-partite graph on $n$ vertices, with vertices distributed between parts as equally as possible. The chromatic number $\chi (G)$ of $G$ is the minimum number of colors needed to color the vertices of $G$ such that no two adjacent vertices have the same color.

## Upper bounds
### Turán's theorem

Turán's theorem states that for positive integers $n,r$ satisfying $n\geq r\geq 3$, ex⁡(n, K$_r$)=(1−1/r−1+o(1)) n$^2$/2.{\textstyle \operatorname {ex} (n, K_{r})=\left(1-{\frac {1}{r-1}}+o(1)\right){\frac {n^{2}}{2}}.}
This solves the forbidden subgraph problem for $G=K_{r}$. Equality cases for Turán's theorem come from the Turán graph $T(n,r-1)$.
This result can be generalized to arbitrary graphs $G$ by considering the chromatic number $\chi (G)$ of $G$. Note that $T(n,r)$ can be colored with $r$ colors and thus has no subgraphs with chromatic number greater than $r$. In particular, $T(n,\chi (G)-1)$ has no subgraphs isomorphic to $G$. This suggests that the general equality cases for the forbidden subgraph problem may be related to the equality cases for $G=K_{r}$. This intuition turns out to be correct, up to $o(n^{2})$ error.

### Erdős–Stone theorem

Erdős–Stone theorem states that for all positive integers $n$ and all graphs $G$, ex⁡(n, G)=(1−1/χ(G)−1+o(1))(n/2).{\textstyle \operatorname {ex} (n, G)=\left(1-{\frac {1}{\chi (G)-1}}+o(1)\right){\binom {n}{2}}.}
When $G$ is not bipartite, this gives us a first-order approximation of $\operatorname {ex} (n,G)$.

### Bipartite graphs

For bipartite graphs $G$, the Erdős–Stone theorem only tells us that $\operatorname {ex} (n,G)=o(n^{2})$. The forbidden subgraph problem for bipartite graphs is known as the Zarankiewicz problem, and it is unsolved in general.
Progress on the Zarankiewicz problem includes following theorem:
    Kővári–Sós–Turán theorem. For every pair of positive integers $s,t$ with $t\geq s\geq 1$, there exists some constant $C$ (independent of $n$) such that ex⁡(n, K$_{s, t}$)≤Cn$^{2−1/s}${\textstyle \operatorname {ex} (n, K_{s, t})\leq Cn^{2-{\frac {1}{s}}}} for every positive integer $n$.
Another result for bipartite graphs is the case of even cycles, $G=C_{2k},k\geq 2$. Even cycles are handled by considering a root vertex and paths branching out from this vertex. If two paths of the same length $k$ have the same endpoint and do not overlap, then they create a cycle of length $2k$. This gives the following theorem.
    Theorem (Bondy and Simonovits, 1974). There exists some constant $C$ such that ex⁡(n, C$_{2k}$)≤Cn$^{1+1/k}${\textstyle \operatorname {ex} (n, C_{2k})\leq Cn^{1+{\frac {1}{k}}}} for every positive integer $n$ and positive integer $k\geq 2$.
A powerful lemma in extremal graph theory is dependent random choice. This lemma allows us to handle bipartite graphs with bounded degree in one part:
    Theorem (Alon, Krivelevich, and Sudakov, 2003). Let $G$ be a bipartite graph with vertex parts $A$ and $B$ such that every vertex in $A$ has degree at most $r$. Then there exists a constant $C$ (dependent only on $G$) such that ex⁡(n, G)≤Cn$^{2−1/r}${\textstyle \operatorname {ex} (n, G)\leq Cn^{2-{\frac {1}{r}}}}for every positive integer $n$.
In general, we have the following conjecture.:
    Rational Exponents Conjecture (Erdős and Simonovits). For any finite family ${\mathcal {L}}$ of graphs, if there is a bipartite $L\in {\mathcal {L}}$, then there exists a rational $\alpha \in [0,1)$ such that $\operatorname {ex} (n,{\mathcal {L}})=\Theta (n^{1+\alpha })$.
A survey by Füredi and Simonovits describes progress on the forbidden subgraph problem in more detail.

## Lower bounds

There are various techniques used for obtaining the lower bounds.

### Probabilistic method

While this method mostly gives weak bounds, the theory of random graphs is a rapidly developing subject. It is based on the idea that if we take a graph randomly with a sufficiently small density, the graph would contain only a small number of subgraphs of $G$ inside it. These copies can be removed by removing one edge from every copy of $G$ in the graph, giving us a $G$ free graph.
The probabilistic method can be used to prove $\operatorname {ex} (n,G)\geq cn^{2-{\frac {v(G)-2}{e(G)-1}}}$where $c$ is a constant only depending on the graph $G$. For the construction we can take the Erdős-Rényi random graph $G(n,p)$, that is the graph with $n$ vertices and the edge been any two vertices drawn with probability $p$, independently. After computing the expected number of copies of $G$ in $G(n,p)$ by linearity of expectation, we remove one edge from each such copy of $G$ and we are left with a $G$-free graph in the end. The expected number of edges remaining can be found to be $\operatorname {ex} (n,G)\geq cn^{2-{\frac {v(G)-2}{e(G)-1}}}$ for a constant $c$ depending on $G$. Therefore, at least one $n$-vertex graph exists with at least as many edges as the expected number.
This method can also be used to find the constructions of a graph for bounds on the girth of the graph. The girth, denoted by $g(G)$, is the length of the shortest cycle of the graph. Note that for $g(G)>2k$, the graph must forbid all the cycles with length less than equal to $2k$. By linearity of expectation,the expected number of such forbidden cycles is equal to the sum of the expected number of cycles $C_{i}$ (for $i=3,...,n-1,n$.). We again remove the edges from each copy of a forbidden graph and end up with a graph free of smaller cycles and $g(G)>2k$, giving us $c_{0}n^{1+{\frac {1}{2k-1}}}$ edges in the graph left.

### Algebraic constructions

For specific cases, improvements have been made by finding algebraic constructions. A common feature for such constructions is that it involves the use of geometry to construct a graph, with vertices representing geometric objects and edges according to the algebraic relations between the vertices. We end up with no subgraph of $G$, purely due to purely geometric reasons, while the graph has a large number of edges to be a strong bound due to way the incidences were defined. The following proof by Erdős, Rényi, and Sős establishing the lower bound on $\operatorname {ex} (n,K_{2,2})$ as$\left({\frac {1}{2}}-o(1)\right)n^{3/2}.$, demonstrates the power of this method.
First, suppose that $n=p^{2}-1$ for some prime $p$. Consider the polarity graph $G$ with vertices elements of $\mathbb {F} _{p}^{2}-\{0,0\}$ and edges between vertices $(x,y)$ and $(a,b)$ if and only if $ax+by=1$ in $\mathbb {F} _{p}$. This graph is $K_{2,2}$-free because a system of two linear equations in $\mathbb {F} _{p}$ cannot have more than one solution. A vertex $(a,b)$ (assume $b\neq 0$) is connected to $\left(x,{\frac {1-ax}{b}}\right)$ for any $x\in \mathbb {F} _{p}$, for a total of at least $p-1$ edges (subtracted 1 in case $(a,b)=\left(x,{\frac {1-ax}{b}}\right)$). So there are at least ${\frac {1}{2}}(p^{2}-1)(p-1)=\left({\frac {1}{2}}-o(1)\right)p^{3}=\left({\frac {1}{2}}-o(1)\right)n^{3/2}$ edges, as desired. For general $n$, we can take $p=(1-o(1)){\sqrt {n}}$ with $p\leq {\sqrt {n+1}}$ (which is possible because there exists a prime $p$ in the interval$[k-k^{0.525},k]$ for sufficiently large $k$) and construct a polarity graph using such $p$, then adding $n-p^{2}+1$ isolated vertices, which do not affect the asymptotic value.
The following theorem is a similar result for $K_{3,3}$.
    Theorem (Brown, 1966). $\operatorname {ex} (n,K_{3,3})\geq \left({\frac {1}{2}}-o(1)\right)n^{5/3}.$
    Proof outline. Like in the previous theorem, we can take $n=p^{3}$ for prime $p$ and let the vertices of our graph be elements of $\mathbb {F} _{p}^{3}$. This time, vertices $(a,b,c)$ and $(x,y,z)$ are connected if and only if $(x-a)^{2}+(y-b)^{2}+(z-c)^{2}=u$ in $\mathbb {F} _{p}$, for some specifically chosen $u$. Then this is $K_{3,3}$-free since at most two points lie in the intersection of three spheres. Then since the value of $(x-a)^{2}+(y-b)^{2}+(z-c)^{2}$ is almost uniform across $\mathbb {F} _{p}$, each point should have around $p^{2}$ edges, so the total number of edges is $\left({\frac {1}{2}}-o(1)\right)p^{2}\cdot p^{3}=\left({\frac {1}{2}}-o(1)\right)n^{5/3}$.
However, it remains an open question to tighten the lower bound for $\operatorname {ex} (n,K_{t,t})$ for $t\geq 4$.
    Theorem (Alon et al., 1999) For $t\geq (s-1)!+1$, $\operatorname {ex} (n,K_{s,t})=\Theta (n^{2-{\frac {1}{s}}}).$

### Randomized Algebraic constructions

This technique combines the above two ideas. It uses random polynomial type relations when defining the incidences between vertices, which are in some algebraic set. Using this technique to prove the following theorem.
Theorem: For every $s\geq 2$, there exists some $t$ such that $\operatorname {ex} (n,K_{s,t})\geq \left({\frac {1}{2}}-o(1)\right)n^{2-{\frac {1}{s}}}$.
Proof outline: We take the largest prime power $q$ with $q^{s}\leq n$. Due to the prime gaps, we have $q=(1-o(1))n^{\frac {1}{s}}$. Let $f\in \mathbb {F} _{q}[x_{1},x_{2},\cdots ,x_{s},y_{1},y_{2},\cdots ,y_{s}]_{\leq d}$ be a random polynomial in $\mathbb {F} _{q}$ with degree at most $d=s^{2}$ in $X=(X_{1},X_{2},...,X_{s})$ and $Y=(Y_{1},Y_{2},...,Y_{s})$ and satisfying $f(X,Y)=f(Y,X)$. Let the graph $G$ have the vertex set $\mathbb {F} _{q}^{s}$ such that two vertices $x,y$ are adjacent if $f(x,y)=0$.
We fix a set $U\subset \mathbb {F} _{q}^{s}$, and defining a set $Z_{U}$ as the elements of $\mathbb {F} _{q}^{s}$ not in $U$ satisfying $f(x,u)=0$ for all elements $u\in U$. By the Lang–Weil bound, we obtain that for $q$ sufficiently large enough, we have $|Z_{U}|\leq C$ or $|Z_{U}|>{\frac {q}{2}}$ for some constant $C$.Now, we compute the expected number of $U$ such that $Z_{U}$ has size greater than $C$, and remove a vertex from each such $U$. The resulting graph turns out to be $K_{s,C+1}$ free, and at least one graph exists with the expectation of the number of edges of this resulting graph.

## Supersaturation

Supersaturation refers to a variant of the forbidden subgraph problem, where we consider when some $h$-uniform graph $G$ contains many copies of some forbidden subgraph $H$. Intuitively, one would expect this to once $G$ contains significantly more than $\operatorname {ex} (n,H)$ edges. We introduce Turán density to formalize this notion.

### Turán density

The Turán density of a $h$-uniform graph $G$ is defined to be
    $\pi (G)=\lim _{n\to \infty }{\frac {\operatorname {ex} (n,G)}{\binom {n}{h}}}.$
It is true that ${\frac {\operatorname {ex} (n,G)}{\binom {n}{h}}}$ is in fact positive and monotone decreasing, so the limit must therefore exist.
As an example, Turán's Theorem gives that $\pi (K_{r+1})=1-{\frac {1}{r}}$, and the Erdős–Stone theorem gives that $\pi (G)=1-{\frac {1}{\chi (H)-1}}$. In particular, for bipartite $G$, $\pi (G)=0$. Determining the Turán density $\pi (H)$ is equivalent to determining $\operatorname {ex} (n,G)$ up to an $o(n^{2})$ error.

### Supersaturation Theorem

Consider an $h$-uniform hypergraph $H$ with $v(H)$ vertices. The supersaturation theorem states that for every $\epsilon >0$, there exists a $\delta >0$ such that if $G$ is an $h$-uniform hypergraph on $n$ vertices and at least $(\pi (H)+\epsilon ){\binom {n}{h}}$ edges for $n$ sufficiently large, then there are at least $\delta n^{v(H)}$ copies of $H$.
Equivalently, we can restate this theorem as the following: If a graph $G$ with $n$ vertices has $o(n^{v(H)})$ copies of $H$, then there are at most $\pi (H){\binom {n}{2}}+o(n^{2})$ edges in $G$.

### Applications

We may solve various forbidden subgraph problems by considering supersaturation-type problems. We restate and give a proof sketch of the Kővári–Sós–Turán theorem below:
    Kővári–Sós–Turán theorem. For every pair of positive integers $s,t$ with $t\geq s\geq 1$, there exists some constant $C$ (independent of $n$) such that ex⁡(n, K$_{s, t}$)≤Cn$^{2−1/s}${\textstyle \operatorname {ex} (n, K_{s, t})\leq Cn^{2-{\frac {1}{s}}}} for every positive integer $n$.
    Proof. Let $G$ be a $2$-graph on $n$ vertices, and consider the number of copies of $K_{1,s}$ in $G$. Given a vertex of degree $d$, we get exactly ${\binom {d}{s}}$ copies of $K_{1,s}$ rooted at this vertex, for a total of $\sum _{v\in V(G)}{\binom {\operatorname {deg} (v)}{s}}$ copies. Here, ${\binom {k}{s}}=0$ when $0\leq k<s$. By convexity, there are at total of at least $n{\binom {2e(G)/n}{s}}$ copies of $K_{1,s}$. Moreover, there are clearly ${\binom {n}{s}}$ subsets of $s$ vertices, so if there are more than $(t-1){\binom {n}{s}}$ copies of $K_{1,s}$, then by the Pigeonhole Principle there must exist a subset of $s$ vertices which form the set of leaves of at least $t$ of these copies, forming a $K_{s,t}$. Therefore, there exists an occurrence of $K_{s,t}$ as long as we have $n{\binom {2e(G)/n}{s}}>(t-1){\binom {n}{s}}$. In other words, we have an occurrence if ${\frac {e(G)^{s}}{n^{s-1}}}\geq O(n^{s})$, which simplifies to $e(G)\geq O(n^{2-{\frac {1}{s}}})$, which is the statement of the theorem.
In this proof, we are using the supersaturation method by considering the number of occurrences of a smaller subgraph. Typically, applications of the supersaturation method do not use the supersaturation theorem. Instead, the structure often involves finding a subgraph $H'$ of some forbidden subgraph $H$ and showing that if it appears too many times in $G$, then $H$ must appear in $G$ as well. Other theorems regarding the forbidden subgraph problem which can be solved with supersaturation include:
* $\operatorname {ex} (n,C_{2t})\leq O(n^{1+1/t})$.
* For any $t$ and $k\geq 2$, $\operatorname {ex} (n,C_{2k},C_{2k-1})\leq O\left(\left({\frac {n}{2}}\right)^{1+1/t}\right)$.
* If $Q$ denotes the graph determined by the vertices and edges of a cube, and $Q^{*}$ denotes the graph obtained by joining two opposite vertices of the cube, then $\operatorname {ex} (n,Q)\leq \operatorname {ex} (n,Q^{*})=O(n^{8/5})$.

## Generalizations

The problem may be generalized for a set of forbidden subgraphs $S$: find the maximal number of edges in an $n$-vertex graph which does not have a subgraph isomorphic to any graph from $S$.
There are also hypergraph versions of forbidden subgraph problems that are much more difficult. For instance, Turán's problem may be generalized to asking for the largest number of edges in an $n$-vertex 3-uniform hypergraph that contains no tetrahedra. The analog of the Turán construction would be to partition the vertices into almost equal subsets $V_{1},V_{2},V_{3}$, and connect vertices $x,y,z$ by a 3-edge if they are all in different $V_{i}$s, or if two of them are in $V_{i}$ and the third is in $V_{i+1}$ (where $V_{4}=V_{1}$). This is tetrahedron-free, and the edge density is $5/9$. However, the best known upper bound is 0.562, using the technique of flag algebras.