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