On triangle-free graphs maximizing embeddings of bipartite graphs

In 1991 Gy\H ori, Pach, and Simonovits proved that for any bipartite graph $H$ containing a matching avoiding at most 1 vertex, the maximum number of copies of $H$ in any large enough triangle-free graph is achieved in a balanced complete bipartite graph. In this paper we improve their result by showing that if $H$ is a bipartite graph containing a matching of size $x$ and at most $\frac{1}{2}\sqrt{x-1}$ unmatched vertices, then the maximum number of copies of $H$ in any large enough triangle-free graph is achieved in a complete bipartite graph. We also prove that such a statement cannot hold if the number of unmatched vertices is $\Omega(x)$.


Introduction
A classical theorem of Turán [7] states that the unique K r -free graph on n vertices with the maximum number of edges is the balanced complete (r − 1)-partite graph, denoted by T r−1 (n).This result was further generalized by Zykov [8] (and independently by Erdős [2]), who proved that among K r -free n-vertex graphs, also T r−1 (n) maximizes the number of copies of any complete graph K s for s < r.In general, the maximum number of copies of a given graph H among all K r -free n-vertex graphs (for r > χ(H)) is not always achieved in T r−1 (n).For example if H is a star on 4 vertices and r = 3.Nevertheless, recently, Morrison, Nir, Norin, Rz ążewski and Wesolek [6], answering a conjecture of Gerbner and Palmer [3], showed that for any graph H the maximum number of copies of H in a large enough K r -free n-vertex graph is obtained in T r−1 (n) as long as r is large enough.
A natural generalization of the previously mentioned results is to search for sufficient conditions for the maximum number of copies of a given graph H in a K r -free G to be maximized when G is some (not necessarily balanced) complete (r − 1)-partite graph.Note that an easy application of the graph removal lemma implies that if χ(H) < χ(F ) then the maximum number of copies of H in F -free graphs is asymptotically the same as in K χ(F ) -graphs, so solving the problem for forbidden complete graph is essentially solving it in the more general case as well.
One necessary condition to have the maximum number of copies of H achieved in a complete (r−1)-partite graph is χ(H) < r.However, this is not sufficient as shown by the following example.
Example 1 (Győri, Pach, Simonovits [5]).Let H be a bipartite graph on 2k vertices formed by two disjoint stars K 1,k−2 with centers connected by a path of length 3. The number of copies of H in any n-vertex bipartite graph is maximized in T 2 (n), since H has the same number of vertices in both color classes.However, for sufficiently large k and n, the number of copies of H in T 2 (n) is significantly smaller than in a blow-up of a five-cycle with blobs of sizes n 2k , n 2k , n 2k , n 2k , and n − 2n k .
For a similar example for higher values of r, see [4].
In the most interesting case r = 3, asking when the maximum number of copies of a given bipartite graph in triangle-free graphs is achieved in a complete bipartite graph, Győri, Pach, and Simonovits proved the following sufficient condition.
Theorem 2 (Győri, Pach, and Simonovits [5]).Let H be a bipartite graph on m vertices containing a matching of size ⌊ m 2 ⌋.Then, for n > m, T 2 (n) is the unique n-vertex triangle-free graph maximizing the number of copies of H.
Intuitively, if H contains a large matching, then T 2 (n) is the best choice for a trianglefree maximizer, because it contains the biggest number of copies of the matching itself.The condition that H must have a perfect matching (or an almost perfect matching if 2 ∤ m) cannot be relaxed to a matching on m − 2 vertices if we want to have T 2 (n) as the maximizer.For example the maximum number of copies of a star K 1,3 in triangle-free graphs is not achieved in T 2 (n), but in a non-balanced complete bipartite graph.
We show that the maximizer is a complete bipartite graph even using a far weaker condition on the size of a matching in H. Theorem 3. Let H be a bipartite graph containing a matching of size x and at most 1 2

√
x − 1 unmatched vertices.Then, for n sufficiently large, a complete bipartite graph maximizes the number of copies of H among all triangle-free n-vertex graphs.
We do not know whether the bound on the number of unmatched vertices O( √ x) is optimal, but we show that it needs to be sublinear.
Theorem 4. For any constant λ > 0 and integer n 0 > 0, there exist an integer x, • a bipartite graph H containing a matching of size x and at most λx unmatched vertices, and • a triangle-free non-bipartite graph G on more than n 0 vertices, such that the number of copies of H in G is larger than in any bipartite graph on the same number of vertices.

Proofs
We start with introducing the needed notation and some preliminary results.By the number of copies of H in G, denoted by H(G), we mean the number of subgraphs of G isomorphic to H.For easier calculations we consider injective embeddings of H in G, i.e., injective functions ϕ : We denote the number of different injective embeddings of H in G by H(G).Observe that H(G) differs from H(G) just by the number of authomorpisms of H, so maximizing H(G) is equivalent to maximizing H(G).
For two graphs H and G we define the H-degree of a vertex v ∈ V (G), denoted h(v), as the number of injective embeddings of H in G whose image contains v. Analogously, for u, v ∈ V (G) we define h(u, v) as the number of injective embeddings whose image contains vertices u and v, and h(u, v) as the number of injective embeddings whose image contains vertex u and does not contain vertex v.
Lemma 5.For an m-vertex graph H let G be a triangle-free n-vertex graph that maximizes the number of injective embeddings of H. Then for any two vertices Proof.Modify the graph G by deleting u and adding instead a copy of v (not adjacent to v).The obtained graph remains triangle-free after such modification.In this process we lose h(u) injective embeddings and gain h(v, ū) new ones.Since Lemma 6.Let G be a triangle-free graph on n vertices with the maximum degree ∆.Then |E(G)| ∆(n − ∆).
Proof.Consider a vertex of degree ∆ and let A be the set of its neighbors.The set V (G) \ A contains n − ∆ vertices of degree at most ∆.Moreover, from triangle-freeness of G there are no edges between vertices in A. Thus, |E(G)| ∆(n − ∆).
Note that the equality holds only for the complete bipartite graph K ∆,n−∆ .
We are ready to prove the main theorem.
Proof of Theorem 3. If H contains an isolated vertex, then the graph H ′ obtained by removing it satisfies the assumptions of Theorem 3 (with a smaller number of unmatched vertices).Moreover, for every n-vertex graph G we have Thus, if the theorem holds for H ′ then it also holds for H. Therefore, we may assume that H does not contain isolated vertices.We may also assume that the matching of size x is a maximal matching in H and x 2.
Let m be the number of vertices in H and c be the number of connected components of H.For a sufficiently large n let G be a triangle-free graph on n vertices that has the largest number of copies of H.By summing up the H-degrees of all vertices in G we count each injective embedding exactly m times, so The last equality holds because we can count the number of injective embeddings of H in T 2 (n) by embedding each vertex connected to already embedded vertices in n/2 ways and a vertex in a new component of H in n ways.The lower order error term comes from the possibility of selecting the same vertex multiple times.
For any vertex u ∈ V (G) by summing up the inequality from Lemma 5 for each vertex v ∈ V (G), and combining it with the above bound, we obtain Therefore, it holds Our plan now is to upper-bound h(u) for a vertex u of the minimum degree δ in G. Consider an arbitrary vertex w ∈ V (H).We estimate the number of injective embeddings that map w to u in the following way.As H does not contain isolated vertices and the matching of size x is maximal, w is adjacent to some matched vertex.It implies that there exists a matching M in H of size x, which contains w.Thus, we have δ ways to embed in G the neighbor of w in the matching M .Then, we have at most |E(G)| ways to embed in G any edge of M from the same component as already embedded vertices, and at most 2|E(G)| ways for each edge in a new component.Finally, we have at most ∆ m−2x ways to embed all vertices of H not belonging to M , where ∆ is the maximum degree of G. Therefore, taking into account that we can choose w in V (H) in m ways and applying Lemma 6 to bound the number of edges of G, we obtain By combining inequalities (1) and ( 2) we conclude the following bound for δ Our goal is to show that under the assumptions of Theorem 3 from inequality (3) we derive that δ > 2 5 n.Then, since Andrásfai-Erdős-Sós [1] theorem gives that every n-vertex trianglefree graph with minimum degree greater than 2  5 n is bipartite, the graph G will be bipartite.For convenience, we replace m − 2x with 2d.It is straightforward to check that the denominator Thus, from (3) we obtain Note that it is enough to show that as then, for large enough n, we have the wanted inequality δ > 2  5 n.Rearranging the terms and using 2d 0, Bernoulli's inequality and d 2 1 16 (x − 1) implied by assumptions of the theorem we obtain as needed.
Proof of Theorem 4. It is enough to consider rational λ.Let d 1 and x 3 be large enough integers such that λ = 2d x .We modify Example 1.Consider a graph H consisting of two stars having d + 1 leaves with centers connected by a path of length 3 and additional x − 3 paths of length 2 starting in a central vertex from the aforementioned path, see Figure 1.Note that H has a matching of size x and 2d = λx unmatched vertices.
Figure 1: Graphs H and G.
We will show that if x is large enough then H(T 2 (n)) < H(G), where G is an unbalanced blow-up of a C 5 with parts of sizes an, bn, cn, cn, cn for large enough n and some values of a, b, c with a + b + 3c = 1 to be established later.Since H is balanced, T 2 (n) maximizes the number of injective embeddings of H among all bipartite graphs, and so the inequality H(T 2 (n)) < H(G) implies that no bipartite graph on n vertices contains more copies of H than G.
Note that for arbitrary λ > 0 it is possible to choose a > 1  2 such that This is due to the fact that the function f (z) = z λ+1 (1 − z) − 1 2 2+λ has a root in 1 2 and its derivative at 1  2 is greater than zero.Now consider the function g(z) = a λ+1 (1 − a − 3z) − 1 2 2+λ .It is continuous at z = 0 and g(0) = f (a) > 0. Thus, we can choose small c > 0 so that g(c) > 0. For such c define p = a λ+1 (1 − a − 3c) This means that for large enough n we have H(G) H(T 2 (n)) as needed.