Universal and unavoidable graphs

The Tur\'an number $\text{ex}(n,H)$ of a graph $H$ is the maximal number of edges in an $H$-free graph on $n$ vertices. In $1983$ Chung and Erd\H{o}s asked which graphs $H$ with $e$ edges minimize $\text{ex}(n,H)$. They resolved this question asymptotically for most of the range of $e$ and asked to complete the picture. In this paper we answer their question by resolving all remaining cases. Our result translates directly to the setting of universality, a well-studied notion of finding graphs which contain every graph belonging to a certain family. In this setting we extend previous work done by Babai, Chung, Erd\H{o}s, Graham and Spencer, and by Alon and Asodi.


Introduction
The following question of Turán dating back to 1941 [27] is one of the most classical problems of graph theory. Given a fixed graph H, what is the maximal number of edges one can have in an n vertex graph which does not contain a copy of H as a subgraph? The answer to this question, denoted ex(n, H), is called the Turán number of H. Turán numbers have been extensively studied in the last 70 years, see for example the surveys [20,21,23,25,26].
Turan's problem leads to another very natural extremal question -what is the largest size of a graph which we can not avoid as a subgraph in any graph on n vertices and e edges? In other words, what kind of a graph H with a fixed number of edges (possibly depending on n) has minimal Turán number?
This question was first asked by Chung and Erdős [10] in 1983 and many questions of a similar flavour were later considered in [8,11,12,17]. Some of these questions have also featured in an Erdős open problem collection [9].
In this paper we revisit the original question of Chung and Erdős. They say a graph H is (n, e)unavoidable if every graph on n vertices and e edges contains a copy of H as a subgraph. Let f (n, e) be the maximum number of edges in an (n, e)-unavoidable graph. Chung and Erdős obtain the following bounds on f (n, e): (i) f (n, e) = Θ ⌈e/n⌉ 2 if e ≤ n 4/3 (ii) f (n, e) = Θ √ e log n log(( n 2 )/e) if cn 4/3 < e < n 2 − n 1+c for any 0 < c < 1. where m = n 2 − e, and n 2 − cn < e, for some c > 0.
In fact for certain regimes from parts (i) and (ii) they obtain even more precise bounds, some of which appear in a later paper [11]. However, there is a gap between regimes of part (ii) and (iii) for which their methods fail to give an answer. Given this, they naturally ask what is the correct behaviour of f (n, e) towards the end of the range, so when e > n 2 − n 1+o (1) . In this paper we resolve this question and determine f (n, e) for the remaining values of e. It is worth noting that the unavoidable graph we use in order to obtain the lower bound in the second part of the above theorem is the random Erdős-Renyi graph. This is in stark contrast to the very structured graph used by Chung and Erdős in regimes of (ii) 1 and (iii) above. In particular, they use a disjoint union of complete bipartite graphs. Furthermore, for part of the regime both of these very different examples are extremal, up to a constant factor.

Universality
An (n, e)-unavoidable graph H on n vertices is contained in every graph G on n vertices and e edges. Another way of saying this is that the complement of H contains the complement of G. Since G was arbitrary this means that H is (n, e)-unavoidable if and only if its complement contains every graph on n vertices and m = n 2 − e edges as a subgraph. This observation, made by Chung and Erdős, links unavoidability to perhaps an even more natural and well studied notion, namely that of universality.
For a given family of graphs H we call a graph H-universal if it contains a copy of each graph in H. Given H one usually wants to find the smallest H-universal graph, with respect to the number of edges or both vertices and edges. Chung and Graham [13] were the first to use this general notion of universality in 1979. In [13] they survey a number of results in this setting. Universality problems have been extensively studied ever since, for some examples see [4,6,14,16,24] and references therein.
Following the above observation by Chung and Erdős the relevant family in our case is that of all graphs on n vertices and m edges, which we denote as H(n, m). We denote by g(n, m) the minimum number of edges in an H(n, m)-universal graph on n vertices. The above observation of Chung and Erdős boils down to the following relation between the functions f and g: where m = n 2 − e. This relation allows us to easily translate results between unavoidability and universality. For example, Theorem 1.1 is equivalent to the following statement. While in the unavoidability case one might arguably think that the very end of the regime is not that interesting since it only involves determining the behaviour of the second order term, we see here that this second order term becomes the main and only term for the case of universality. This regime in particular is related to previous work on universality for the family E(m) of graphs with exactly m edges (and no isolated vertices). This was first considered by Babai, Chung, Erdős, Graham and Spencer [5] in 1982. They show that there exist E(m)-universal graphs with at most O m 2 log log m log m edges. This was later improved upon by Alon and Asodi [1] who show the upper bound of O m 2 log 2 m , which matches the lower bound. Our bound on g(2m, m) recovers the result of Alon and Asodi as any graph on m edges can use at most 2m vertices, so any graph which is H(2m, m)-universal is also E(m)-universal. On the other hand when m > n/2 their results can not be used to obtain a bound on g(n, m) for the following reason. In order to bound g(n, m) one needs to find an H(n, m)-universal graph on n vertices. This can never come from an E(m)-universal graph as any such graph needs to have at least 2m > n vertices, in order to contain a matching of m edges. Furthermore, E(m)-universal construction of Alon and Asodi uses more than 4m vertices. Since any graph in E(m) has at most 2m vertices, this affords them a lot of leeway during the embedding process. In contrast, in our problem we need to find spanning universal graphs, which requires a different embedding technique. Proving such spanning results is often a harder problem. While neither our nor the universal graphs used by Alon and Asodi are explicit, our embedding technique allows us to work with a weaker and simpler property of random graphs, which might be helpful in answering their question about finding explicit universal graphs.
Another related notion of universality deals with the family E(n, d) of graphs on n vertices with degree bounded by d. Alon and Capalbo [3] show that Θ n 2−2/d is the least possible number of edges in an E(n, d)-universal graph. The E(n, d)-universal graph they construct has more than (1 + ε)n vertices and it is a seemingly hard open problem in the area to obtain such a graph on exactly n vertices. The best result in this direction is due to the same authors [2] where they exhibit such a graph with O n 2−2/d log 4/d n edges. As already mentioned we need to overcome a similar difficulty in our setting since we require our universal graphs to be of the same order as the graphs we want to embed.
Notation. We will abbreviate H(n, m)-universal by (n, m)-universal throughout the paper. Let G = (V, E) be a graph and U ⊆ V . We denote with G[U ] the subgraph of G induced by U . We denote with G(n, p) the standard Erdős-Renyi random graph, i.e. the probability distribution on the set of all graphs on n vertices where each graph H has probability measure p e(H) (1 − p) ( n 2 )−e(H) . We say that G(n, p) satisfies a property with high probability (whp) if a sample from G(n, p) satisfies this property with probability tending to 1 as n tends to infinity. Let f, g be functions from N to R + . Then f = O(g) if there exists a constant C such that f (n) ≤ Cg(n) for all n ∈ N. Also, f = Ω(g) if g = O(f ). Furthermore, f = Θ(g) if g = O(f ) and g = Ω(f ). If lim n− →∞ f (n) g(n) = 0 then we write f = o(g) and g = ω(f ). With log n we denote the natural logarithm of n. We omit floors and ceilings whenever they are not essential.

Lower bounds for g(n, m)
We start our proof of Theorem 1.2 with the lower bounds. Proof. The idea behind the proof is quite simple, we will count how many non-isomorphic graphs there are on n vertices and m edges and we will count how many subgraphs with m edges we can find in our a graph with t edges. The existence of an (n, m)-universal graph G on t edges implies that the former count must be smaller than the latter (since all n-vertex m-edge graphs must appear as subgraphs of G); the desired bounds then follow after some simplifications, which will differ depending on the regime. The number of non-isomorphic graphs on n vertices and m edges is at least here the first term counts the number of labelled graphs on n vertices and m edges, and we counted each graph at most n! many times.
Since G contains all these graphs, and there are t m subgraphs of G with m edges, we get Since n −n/m ≥ 1 − n log n m the first claim follows. For the case when m < n log n let k = m/ log m < n. So G is also (k, m)-universal and the bound (2) implies

Upper bounds for g(n, m)
In order to give an upper bound on g(n, m) one needs to exhibit an example of an (n, m)-universal graph. We distinguish two regimes, corresponding to the relations between n and m which give us different behaviours in Theorem 1.2. Namely, in the first regime we will work with n log n < m < n 3/2−ε and in the second with m ≤ n log n. In both regimes we have different examples but they share some common traits. We begin with a few results which will be useful for both regimes.
Let us state an immediate observation which we will use frequently, without further mention.
Observation 3.1. Let G be a graph with m edges. If G ′ is the subgraph of G obtained by deleting k vertices of highest degree, then ∆(G ′ ) ≤ 2m/k. In fact, any vertex of G ′ has degree at most 2m/k in G.
The following lemma will allow us to pass from almost spanning universal graphs to spanning ones.
Here, and in the rest of the paper when we say that we add full degree vertices to a graph we mean that we create a new graph which consists of an induced copy of the original graph and a number of new "full degree" vertices which are adjacent to every other vertex of the new graph.
Lemma 3.2. Let n > k and suppose there is a k-vertex (k − k(n−k) 2m+k , m) universal graph U . By adding n − k new full degree vertices to U we obtain an n-vertex (n, m)-universal graph.
Proof. Let U be the universal graph given by the assumption. We construct G by adding a set F of n − k new vertices to U and joining each vertex of F to all other vertices in U ∪ F . We claim that G ℓ k − ℓ F : full degree vertices U : (k−ℓ, m)-universal graph is (n, m)-universal. To show this we consider an arbitrary n-vertex graph H with m edges. We prove that H can be embedded into G.
Before turning to the details let us explain the idea how we will achieve this. Let ℓ := ⌊k(n − k)/(2m + k)⌋ so that U is (k − ℓ, m)-universal. We will first find an independent set of S of ℓ vertices in H with the property that there are at least k vertices of H having no edges to S (including vertices of S themselves). We embed the remaining n − k vertices into vertices of G of full degree, we then embed the remaining k − ℓ vertices not in S inside U , using the universality of U , finally we may embed the vertices in S as we please to the remainder of U since they send no edges to the part of H embedded in U and will be joined to every other vertex in G.
Let us now fill in the details. We pick a vertex v 1 in H 0 := H of minimum degree and remove v 1 and all its neighbours from H to obtain H 1 . We repeat ℓ times, in step i we pick a vertex v i in H i−1 of minimum degree and create H i by removing v i and all its neighbours in H i−1 . By induction it is easy to see that after each step we are left with at least k vertices in H i . Indeed, if H i−1 has at least k vertices, then for j ≤ i vertex v j has a degree of at most So after deleting all such v j 's and their neighbours, we have in total deleted at most i · (2m/k + 1) ≤ ℓ(2m/k + 1) ≤ n − k vertices, so indeed we do have at least k vertices in H i for each i ∈ [ℓ].
In particular, we obtain a subgraph H ℓ of H of size at least k and an independent set as well as as many vertices of H ℓ as we can. If we are only left with vertices of S we can embed them into U (since they make an independent set). Otherwise we are left with a graph H ′ such that S ⊆ H ′ ⊆ H ℓ ∪ S. Note that H ′ has |G \ F | = k vertices, ℓ of which are independent (depicted by the first and last part of H in fig. 1). Since U was (k − ℓ, m)-universal we can embed H ′ \ S into U and place S into unused vertices. This is permissible since vertices in S were isolated in H ′ . Furthermore, since all other vertices got embedded into F (whose vertices have full degree in G), we have found our embedding of H.
This lemma shows that if we can establish a sufficiently strong version of almost spanning universality it only costs us a very few extra vertices of full-degree in order to obtain spanning universality. On the other hand since we want universality for n-vertex graphs with m edges, we know that provided m ≥ n−1 the host graph must contain some vertices of full degree, as the graphs we want to embed might also have some vertices of full degree. We note that this simple lemma is one of the main ingredients which allow us to find spanning universal graphs, which is usually a very hard problem. In addition it allows us to greatly simplify certain technical parts of our arguments.
We will construct a part of our universal graph G to satisfy a property of the following type which will allow us to embed any graph on n vertices and m edges into G.
Definition. A graph is said to have the (r, s, t)-domination property if for any set R of size r and any t disjoint sets S 1 , . . . , S t of size s which are disjoint from R, there is a vertex v in R and a set S i such that v is a common neighbour of all vertices in S i .
A part of our universal graphs which will satisfy the above property is going to be provided by a random graph. Towards this end the following lemma establishes a condition on the parameters r, s, t which implies that the random graph G(n, p) has the (r, s, t)-domination property. Proof. The probability that a fixed vertex is a common neighbour of every vertex in a fixed set S of size s is p s . By independence, the probability that a fixed set R of size r and t fixed disjoint sets S 1 , . . . , S t of size s are such that no vertex in R is a common neighbour of every vertex in some S i is (1 − p s ) tr . So, by a union bound, the probability that some choice of sets R, S 1 , . . . , S t fails the desired condition is at most n r n s t (1 − p s ) tr ≤ n r+ts e −p s tr = n r+ts−p s tr/ log n ≤ n −r = o(1).

The first regime
Let us now turn to the first regime, so when n log n < m < n 3/2−ε . As part of our construction of an (n, m)-universal graph with n vertices we first find a smaller almost spanning universal graph, in particular a graph on k < n vertices which is (k − r, m)-universal for appropriately chosen parameters k and r. We then finish the construction by applying Lemma 3.2. Let ε > 0 and k, m be integers such that k log k < m < 3k 3/2−ε and k is sufficiently large depending only on ε. We let G be a k-vertex graph consisting of • a set F of k/2 vertices joined to every vertex and • a set V of k/2 vertices inducing a graph G ′ with the (r, s, t)-domination property missing at least where t = k 3 2 9 m 2 , s = 8m k and r = k 2 4m . In order to ensure we can find such a graph where we used that 1 − x ≥ e −2x , provided 0 ≤ x < 1/2. In addition, since m < 3k 3/2−ε , we also have min r s , t = t = k 3 /(2 9 m 2 ) ≥ k 2ε /(3 2 2 9 ) > 3k ε log k, as k is large enough compared to ε. So, by Lemma 3.3 G(k/2, p) has the (r, s, t)-domination property whp. Notice further that G(k/2, p) is also missing at least . .
. Figure 2: The picture on the left illustrates the embedding process while the one on the right illustrates the final state of the embedding.
particular it provides us with our G ′ . We now show G is universal for almost spanning graphs with m edges.
Proof. Let H be a graph on k − r vertices and m edges. Our goal is to embed H into G. Let us first delete k/4 vertices of largest degrees from H to obtain H ′ ⊆ H with ∆(H ′ ) ≤ 8m/k and |H ′ | = 3k/4−r.
The deleted k/4 vertices we embed into F , leaving us with k/4 remaining vertices in F .
We continue by embedding vertices from H ′ one by one into G ′ , making sure that whenever two embedded vertices make an edge in H ′ , their images also make an edge in G ′ . Let S be the set of already embedded vertices from H ′ , i.e. assume that we have already found a distinct vertex π(v) ∈ V (G ′ ) for every v ∈ S ⊆ V (H ′ ). If |S| ≥ k/2 − r we stop, so let us assume that |S| < k/2 − r, which implies that we have at least k/4 vertices in H ′ \ S. For each v ∈ H ′ \ S, let S v = π(S ∩ N H ′ (v)), so the set of vertices of G ′ which were already assigned to a neighbour of v (see fig. 2). We know that |S v | ≤ 8m/k = s since ∆(H ′ ) ≤ 8m/k. Furthermore, the same max degree condition tells us that each S v can intersect at most (8m/k) 2 other such sets (since S v has size at most 8m/k and every vertex of S v can belong to at most 8m/k other S u 's). This implies the existence of a family of at least |H ′ \S| (8m/k) 2 +1 ≥ k 3 2 9 m 2 = t disjoint sets S v . We can find such a family by greedily choosing the S v 's. On the other hand we have a set R of at least |G ′ | − |S| ≥ r yet unassigned vertices of G ′ . Since G ′ is (r, s, t)-dominating we know that there is a vertex u in R and one of the sets S v such that u is a common neighbour of every vertex in S v . So we may embed π(v) = u and repeat.
When we stop (i.e. when |S| ≥ k/2 − r), we will have embedded at least k/2 − r vertices of H ′ . We now embed the remaining k/4 vertices of H ′ to the remaining k/4 vertices of F to obtain the desired copy of H ′ in G ′ . Theorem 3.4. Let ε > 0 and n log n < m < n 3/2−ε . There is an n-vertex graph missing at least εn 3 log n 2 12 m edges which is (n, m)-universal, provided n is large enough depending only on ε.
Proof. Let k = n/2, so k log k < m < 3k 3/2−ε . By the previous claim G is a (k − r, m)-universal graph which misses at least εk 3 log k 2 8 m ≥ εn 3 log n 2 12 m edges. Since r = k 2 4m ≤ k(n−k) 2m+k Lemma 3.2 implies that adding n − k = n/2 vertices of full degree to G gives us the desired graph.
Note that our final example for above theorem consisted of 3n/4 vertices of full degree and n/4 vertices spanning a graph satisfying certain properties which hold for the random graph G(n/4, p) whp. Upon taking complements, what we have shown is that whp the random graph G(n/4, q), where q = 1 − p, has Turán number on n vertices of at most n 2 − m = n 2 − εn log n 2 32q = (1 − Θ( log n nq )) n 2 , where we may choose an arbitrary q such that 1/2 > q > n −1/2+ε . Since in this regime χ(G(n, q)) = Θ(nq/ log n) this is approximately what we would obtain by applying Erdős-Stone-Simonovits theorem, despite the fact that our graph is of linear order while the usual Erdős-Stone-Simonovits applies only to small forbidden graphs. We postpone further discussion to concluding remarks.

The second regime
In this subsection we deal with the case when n/2 < m < n log n. In this regime our goal is to construct an (n, m)-universal graph on Θ m 2 log 2 m edges to show the desired upper bound. A part of our construction will again use a graph satisfying an appropriate domination property with few edges, similarly as in the first regime. We however require slightly different relation between parameters. The next lemma shows that the random graph still provides us with such a graph. , it is enough to show that 3 log n ≤ p s · min r s , t , which is equivalent to 3 log n ≤ 1 √ n · n 3 4 s and since s ≤ log n, we are done.
To upper bound g(n, m) we will give a recursive construction of an (n, m)-universal graph. It will not be hard to "extract" the constructed graph later, but we use the recursive definition as it provides us with a convenient way of controlling the bounds.
Proof. Note that n ′ is increasing in m for m ≤ n log n 2 10 so n ′ ≤ 32 n log n 2 10 · log(2 10 ) log n ≤ 2 3 n.
Let k = n − n log 3 n . Our initial goal is to find a k-vertex, (k − n 4 5 , m)-universal graph G with at most g(n ′ , m) + 17m 3 n log 3 n edges. After this is done, we will finish the proof by applying Lemma 3.2. We construct G as follows. Let p = m 3 n 3 log 3 n < 1 2 . Let the vertex set V of G be the union of three disjoint sets V = V 1 ∪ V 2 ∪ V 3 , of sizes |V 1 | = n log 3 n + n 4 5 , |V 2 | = n ′ and |V 3 | = k − |V 1 | − |V 2 |. We construct the edge set in three steps as follows: • Make each vertex in V 1 adjacent to all other vertices.
• Finally, add at most g(n ′ , m) edges within V 2 to make G[V 2 ] an (n ′ , m)-universal graph.
The graph from the first step exists due to Lemma 3.5, as G(n, p) has both the (n )domination property and at most n 2 p edges whp, and since both these properties are hereditary we may take any subgraph on k < n vertices for our graph. Observe that G has at most n 2 p + n|V 1 | + g(n ′ , m) ≤ n 2 p + 2n 2 log 3 n + g(n ′ , m) ≤ 17m 3 n log 3 n + g(n ′ , m) edges, as n/2 < m.
We now show that G is indeed (k − n First, embed the n log 3 n vertices of highest degree from H arbitrarily into V 1 , and note that n 4 5 vertices in V 1 remain free. Second, embed the next n ′ vertices of highest degree into V 2 . As the subgraph of H induced by those vertices has less than m edges, it can be embedded into V 2 , as G[V 2 ] is (n ′ , m)-universal.
Let H ′ be the subgraph consisting of the remaining vertices of H. Note that |H ′ | = k − n 4 5 − n log 3 n − n ′ = |V 3 |. We embed vertices of H ′ one by one into V 3 and delete them from H ′ until only n 4 5 are left. For each v ∈ H ′ let S v be the image set of all v's neighbours in H which are already embedded into V 2 ∪ V 3 . At each step we argue that we can find a vertex v ∈ H ′ and a free vertex u ∈ V 3 such that u is a common neighbour of S v and we embed v into u.
Note that the size of each S v at each step is at most ∆ 1 = 2m/n ′ = 2 log n 32 log( n log n m ) because ∆ 1 is an upper bound on the degree of vertices in H ′ . Note also that each vertex in V 2 ∪ V 3 can only be in at most ∆ 2 = 2m/( n log 3 n ) ≤ log 5 n sets S v , as vertices in V 2 ∪ V 3 cannot be images of one of the n log 3 n vertices of highest degree in H, so their degree in H is at most 2m/( n log 3 n ). Now we find a disjoint collection of S v 's, by choosing them one by one and each time deleting all other sets which intersect the chosen one. Thus we get a collection of at least |H ′ | ∆ 1 ∆ 2 +1 ≥ n 3 4 disjoint sets S i , since |H ′ | ≥ n . The set of remaining free vertices of V 3 has size |H ′ | ≥ n 4 5 and is disjoint from these S v 's. Therefore, the domination property of G implies that there is a free vertex in V 3 which is a common neighbour of all vertices in some set S v . We embed v into this vertex. We update each S v after every single embedding. When fewer than n 4 5 vertices are left in H ′ we embed them into the remaining free part of V 1 and are done.
We have shown the existence of a k-vertex graph G which is (k − n 4 5 , m)-universal. By making use of Lemma 3.2 and noting that we conclude that by adding n − k = n log 3 n full degree vertices to G we get an n-vertex, (n, m)-universal graph. The number of edges of this graph is at most g(n ′ , m) + 17m 3 n log 3 n + n 2 log 3 n ≤ g(n ′ , m) + 25m 3 n log 3 n as n/2 ≤ m, which finishes the proof. Proof. If n < 16m log m then the statement holds trivially since a graph on n vertices has at most n 2 edges. For any fixed m we will use the previous lemma and induction on n to show holds for all n such that 16m log m ≤ n ≤ 2m. The lower bound on n implies that n ≥ √ m and therefore log m ≤ 2 log n. For the base of the induction consider all n in our range such that n ≤ 2 11 m log m . In this case the inequality (4) holds, since n ≥ 16m log m implies 2m n log n ≤ 1 2 and n 2 ≤ 2 22 m 2 log 2 m so the RHS is at least n 2 /2 and as before any graph on n vertices has at most n 2 edges. We now proceed to the induction step. Let 2m ≥ n ≥ 2 11 m log m and assume that the statement holds for all smaller n (but still larger than 16m log m ). Since our bounds on n imply n log n 2 10 ≥ m ≥ n/2 we have that: g(n, m) ≤ 32m 3 n log 3 n + g(n ′ , m) where n ′ = 32m log n · log( n log n m ) is given by the previous lemma. By inequality (3) we have n ′ < n and from the definition n ′ ≥ 32m log n ≥ 16m log m so we can apply the induction hypothesis to n ′ to obtain In order to finish the proof it is enough to show that: Recall that log m ≤ 2 log n and log n ′ < log n (since n ′ < n). Thus it is enough to show . . .  which is true by inequality (3), so we are done.
If one looks at what kind of graph this recursive argument builds, in each step it will add a few more vertices of full degree, in total at most O( m 2 n log 2 m ) since otherwise we would have used too many edges. The rest of the graph consists of several blocks which are initially small and have a large number (of randomly chosen) neighbours and progressively the blocks become bigger and bigger but they have less (randomly chosen) neighbours. The number of blocks we see is the number of times we needed to call upon the recursion and from definition of n ′ we roughly have n ′ log n ′ m ≈ log n log n m where we used that log n ′ ≈ log n as throughout the argument we stay in the same range depending on m. What this means is that in each step we take a logarithm of the current value of n log n m up until it reaches a constant. I.e.
we need O log * n log n m 2 many steps. See Figure 4 for an illustration of the constructed graph.

Completing the picture
We are now ready to combine our results to show our main theorem.
Proof of Theorem 1.2. The lower bounds follow directly from Lemma 2.1. In Corollary 3.7 we have proven the desired upper bound for g(n, m) when n/2 ≤ m ≤ n log n. Theorem 3.4 gives us the bound when n log n < m < n 3/2−ε .
The remaining case is when m < n/2. Notice that in this case g(n, m) ≤ g(2m, m) = Θ m 2 log 2 m since any graph with e edges has at most 2m non-isolated vertices.
Remark. We have shown that the function g(n, m) exhibits different behaviour in the two regimes. Namely, when m = o(n log n) then g(n, m) = Θ m 2 log 2 m = o(n 2 ) while if m = ω(n log n) we have that g(n, m) = n 2 − Θ n 3 log n m = (1 − o(1)) n 2 . From our arguments one can see that as we transition from one regime to another both bounds become quadratic in n. The following corollary shows that m = Θ(n log n) is precisely the transitioning point between the two behaviours. 2 log * x is the function defined as the number of times we need to apply the logarithm function to x in order to get to 1, applied to the number of atoms in the universe it evaluates to about 5. Proof. The lower bound follows from Lemma 2.1. For the upper bound we have the following cases: • When m > n log n the claim follows from Theorem 3.4.
• When m < n log n 2 12 the claim follows from (4). • If n log n 2 12 ≤ e ≤ n log n then we use the inequality g(n, x) ≤ 2g(n/2, x) + (n/2) 2 iterating it a constant number of times until we are able to use Theorem 3.4. This inequality holds as one can construct an (n, x)-universal graph by taking two disjoint copies of a (n/2, x)-universal graph and making every two vertices from different copies adjacent.

Concluding Remarks
In this paper we complete the study of the behaviour of f (n, e) defined as the maximum size of an (n, e)-unavoidable graph. As already mentioned in the introduction, in order to get a lower bound on f (n, e) we want to find a graph H with f (n, e) edges and Turán number ex(n, H) ≤ e. Inverting this statement we want to find graphs with fixed number of edges which minimise the Turán number. The universal graph we used in the proof of Theorem 3.4 consisted of a collection of vertices joined to every other vertex and a random graph on the remainder. By transferring this result into unavoidability language, as discussed at the end of Section 3.1, we obtain that whp the appropriate random graph G(n/4, q) is the desired minimiser of the Turán number, provided 1/2 > q > n −1/2+ε . Being a bit more careful with our estimates one can even obtain an almost spanning version of this result. Namely we can get: Theorem 4.1. Let ε > 0. There is a δ > 0 such that for G ∼ G (1 − ε)n, q we have whp that ex(n, G) = 1 − Θ log n nq n 2 , provided n −1/2+ε < q < δ.
Note that for this range of q the chromatic number of the above random graph G whp satisfies χ(G) = Θ nq log n . Interestingly, this shows that ex(n, G) behaves essentially the same as we would expect from the Erdős-Stone-Simonovits theorem [18,19], i.e. ex(n, G) = 1 − Θ(1) χ(G) n 2 , despite the fact that G is almost spanning! In contrast, in order for the Erdős-Stone-Simonovits theorem to apply, the size of the host graph is required to be significantly larger than the graph being embedded. The question of the exact requirement on the parameters was considered by Bollobás [7] and Chvátal and Szemerédi [15] who showed that the best one can hope for in general is that the Erdős-Stone-Simonovits theorem holds for graphs of order O(log n), even in our approximate sense.
It could be interesting to determine whether the above theorem extends for values of q smaller than n −1/2 . The main obstacle for our argument is that our current embedding strategy requires too strong a domination property, which in particular is no longer satisfied by G(n, q). In light of this it might be interesting to try to find a weaker version of our property which would suffice for our embedding argument but is still satisfied by the sparser random graphs. Another possible benefit of such a weaker property is that it could possibly allow one to construct explicit universal graphs which one could use for our argument and answer a question of Alon and Asodi [1] and later Hetterich, Parczyk and Person [22].
Several bounded degree analogues of our universality problem arise quite naturally. Alon and Capalbo [3] show that the minimal number of edges in a graph which is universal for the family E(n, d) of n-vertex graphs of maximum degree at most a constant d is Θ n 2−2/d . This is asymptotically very different from g(n, dn) = Θ n 2 log 2 n which we get from Theorem 1.2. We determine g(n, dn) up to a constant factor for any values of n and d, even if we allow d to depend on n. However, very little seems to be known about the above bounded degree problem if one allows d to grow with n. In particular, what is the minimal number of edges in an E(n, d)-universal graph when d is allowed to depend on n. Another, possibly an even closer analogue, is what happens if we consider the spanning variant of this problem. So, what is the smallest number of edges in a graph on exactly n vertices which is E(n, d)-universal, where d is allowed to depend on n?