The typical structure of maximal triangle-free graphs ˇ Jo´zsef Balogh Hong Liu Sa´rka Petˇr´ıˇckova´ Maryam Sharifzadeh ∗ † ‡ § August 25, 2016 5 1 0 2 Abstract n a J Recently, settling a question of Erd˝os, Balogh and Petˇr´ıˇckov´a showed that there 2 are at most 2n2/8+o(n2) n-vertex maximal triangle-free graphs, matching the previously 1 known lower bound. Here we characterize the typical structure of maximal triangle- free graphs. We show that almost every maximal triangle-free graph G admits a vertex ] O partition X Y such that G[X] is a perfect matching and Y is an independent set. ∪ C OurproofusestheRuzsa-Szemer´ediremovallemma, theErd˝os-Simonovitsstability . theorem, and recent results of Balogh-Morris-Samotij and Saxton-Thomason on char- h t acterization of the structure of independent sets in hypergraphs. The proof also relies a m on a new bound on the number of maximal independent sets in triangle-free graphs [ with many vertex-disjoint P3’s, which is of independent interest. 1 v 1 Introduction 9 4 8 Given a family of combinatorial objects with certain properties, a fundamental problem 2 0 in extremal combinatorics is to describe the typical structure of these objects. This was . 1 initiated in a seminal work of Erd˝os, Kleitman, and Rothschild [13] in 1976. They proved 0 that almost all triangle-free graphs on n vertices are bipartite, that is, the proportion of n- 5 1 vertex triangle-free graphs that are not bipartite goes to zero as n . Since then, various v: extensions of this theorem have been established. The typical st→ruc∞ture of H-free graphs i has been studied when H is a large clique [3, 19], H is a fixed color-critical subgraph [23], X H is a finite family of subgraphs [2], and H is an induced subgraph [4]. For sparse H-free r a Department of Mathematical Sciences, University of Illinois at Urbana-Champaign, Urbana, Illinois ∗ 61801, USA [email protected]. Research is partially supported by Simons Fellowship, NSF CAREER GrantDMS-0745185,MarieCurieFP7-PEOPLE-2012-IIF327763andArnoldO.BeckmannResearchAward RB15006. Department of Mathematical Sciences, University of Illinois at Urbana-Champaign, Urbana, Illinois † 61801, USA [email protected]. Department of Mathematical Sciences, University of Illinois at Urbana-Champaign, Urbana, Illinois ‡ 61801, USA [email protected]. Department of Mathematical Sciences, University of Illinois at Urbana-Champaign, Urbana, Illinois § 61801, USA [email protected]. 1 x y 1 X 1 Y x 2 Add 1 edge Add 1 edge for Add 3 edges every pair (x x ,y) 1 2 X Y X2 (a) r = 2 (b) r = 3 Figure 1: Lower bound contruction for maximal K -free graphs. r+1 graphs, analogous problems were examined in [9, 21]. In the context of other combinatorial objects, the typical structure of hypergraphs with a fixed forbidden subgraph is investigated for example in [10, 22]; the typical structure of intersecting families of discrete structures is studied in [6]; see also [1] for a description of the typical sum-free set in finite abelian groups. In contrast to the family of all n-vertex triangle-free graphs, which has been well-studied, very little was known about the subfamily consisting of all those that are maximal (under graph inclusion) triangle-free. Note that the size of the family of triangle-free graphs on [n] is at least 2n2/4 (all subgraphs of a complete balanced bipartite graph), and at most 2n2/4+o(n2) by the result of Erd˝os, Kleitman, and Rothschild from 1976. Until recently, it was not even known if the subfamily of maximal triangle-free graphs is significantly smaller. As a first step, Erdo˝s suggested the following problem (as stated in [26]): determine or estimate the number of maximal triangle-free graphs on n vertices. The following folklore construction shows that there are at least 2n2/8 maximal triangle-free graphs on the vertex set [n] := 1,...,n . { } Lower bound construction. Assume that n is a multiple of 4. Start with a graph on a vertex set X Y with X = Y = n/2 such that X induces a perfect matching and Y is an ∪ | | | | independent set (see Figure 1a). For each pair of a matching edge x x in X and a vertex 1 2 y Y, add exactly one of the edges x y or x y. Since there are n/4 matching edges in X and 1 2 ∈ n/2 vertices in Y, we obtain 2n2/8 triangle-free graphs. These graphs may not be maximal triangle-free, but since no further edges can be added between X and Y, all of these 2n2/8 graphs extend to distinct maximal ones. Balogh and Petˇr´ıˇckov´a [11] recently proved a matching upper bound, that the number of maximal triangle-free graphs on vertex set [n] is at most 2n2/8+o(n2). Now that the counting problemisresolved, onewouldnaturallyaskhowdomostofthemaximaltriangle-freegraphs look, i.e. whatistheirtypicalstructure. Ourmainresultprovidesananswertothisquestion. Theorem 1.1. For almost every maximal triangle-free graph G on [n], there is a vertex partition X Y such that G[X] is a perfect matching and Y is an independent set. ∪ It is worth mentioning that once a maximal triangle-free graph has the above partition 2 X Y, then there has to be exactly one edge between every matching edge of X and every ∪ vertex of Y. Thus Theorem 1.1 implies that almost all maximal triangle-free graphs have the same structure as the graphs in the lower bound construction above. Furthermore, our proof yields that the number of maximal triangle-free graphs without the desired structure is exponentially smaller than the number of maximal triangle-free graphs: Let (n) denote 3 M the set of all maximal triangle-free graphs on [n], and (n) denote the family of graphs from G (n) that admit a vertex partition such that one part induces a perfect matching and the 3 M other is an independent set. Then there exists an absolute constant c > 0 such that for n sufficiently large, (n) (n) 2−cn (n) . 3 3 |M −G | ≤ |M | It would be interesting to have similar results for (n), the number of maximal K -free r r M graphs on [n]. Alon pointed out that if the number of maximal K -free graphs is 2crn2+o(n2), r then c is monotone increasing in r, though not necessarily strictly monotone. For the r lower bound, a discussion with Alon and L(cid:32) uczak led to the following construction that gives 2(1−1/r+o(1))n2/4 maximal K -free graphs: Assume that n is a multiple of 2r. Partition r+1 the vertex set [n] into r equal classes X ,...,X ,Y, and place a perfect matching into 1 r−1 each of X ,...,X (see Figure 1b). Between the classes we have the following connection 1 r−1 rule: between the vertices of two matching edges from different classes X and X place i j exactly three edges, and between a vertex in Y and a matching edge in X put exactly one i edge. For the upper bound, by Erd˝os, Frankl and Ro¨dl [12], (n) 2(1−1/r+o(1))n2/2. A r+1 M ≤ slightly improved bound is given in [11]: For every r there is ε(r) > 0 such that (n) r+1 |M | ≤ 2(1−1/r−ε(r))n2/2 for n sufficiently large. We suspect that the lower bound is the “correct value”, i.e. that (n) = 2(1−1/r+o(1))n2/4. r+1 |M | Related problem. Thereisasurprisingconnectionbetweenthefamilyofmaximaltriangle- free graphs and the family of maximal sum-free sets in [n]. More recently, Balogh, Liu, Sharifzadeh and Treglown [7] proved that the number of maximal sum-free sets in [n] is 2(1+o(1))n/4, settling a conjecture of Cameron and Erdo˝s. Although neither of the results imply one another, the methods in both of the papers fall in the same general framework, in which a rough structure of the family is obtained first using appropriate container lemma and removal lemma. These are Theorems 2.1 and 2.2 in this paper, and a group removal lemma of Green [16] and a granular theorem of Green and Ruzsa [17] in the sum-free case. Both problems can then be translated into bounding the number of maximal independent sets in some auxiliary link graphs. In particular, one of the tools here (Lemma 2.4) is also utilized in [8] to give an asymptotic of the number of maximal sum-free sets in [n]. Organization. We first introduce all the tools in Section 2, then we prove Lemma 3.1, the asymptotic version of Theorem 1.1, in Section 3. Using this asymptotic result we prove Theorem 1.1 in Section 4. Notation. For a graph G, denote by G the number of vertices in G. An n-vertex graph G | | is t-close to bipartite if G can be made bipartite by removing at most t edges. Denote by P k the path on k vertices. Write MIS(G) for the number of maximal independent sets in G. The Cartesian product G H of graphs G and H is a graph with vertex set V(G) V(H) such (cid:3) × that two vertices (u,u(cid:48)) and (v,v(cid:48)) are adjacent if and only if either u = v and u(cid:48)v(cid:48) E(H), ∈ 3 or u(cid:48) = v(cid:48) and uv E(G). For a fixed graph G, let N(v) be the set of neighbors of a vertex ∈ v in G, and let d(v) := N (v) and Γ(v) := N(v) v . For v V(G) and X V(G), G | | ∪ { } ∈ ⊆ denote by N (v) the set of all neighbors of v in X (i.e. N (v) = N(v) X), and let X X ∩ d (v) := N (v) . Denote by ∆(X) the maximum degree of the induced subgraph G[X]. X X | | Given a vertex partition V = X X , edges with one endpoint in X and the other endpoint 1 2 1 ∪ in X are [X ,X ]-edges. A vertex cut V = X Y is a max-cut if the number of [X,Y]-edges 2 1 2 ∪ is not smaller than the size of any other cut. The inner neighbors of a vertex v are its neighbors in the same partite set as v (i.e. N (v) if v X ). The inner degree of a vertex is Xi ∈ i the number of its inner neighbors. We say that a family of maximal triangle-free graphs F is negligible if there exists an absolute constant C > 0 such that < 2−Cn (n) . 3 |F| |M | 2 Tools OurfirsttoolisacorollaryofrecentpowerfulcountingtheoremsofBalogh-Morris-Samotij[5, Theorem 2.2.], and Saxton-Thomason [25]. Theorem 2.1. For all δ > 0 there is c = c(δ) > 0 such that there is a family of at F most 2c·logn·n3/2 graphs on [n], each containing at most δn3 triangles, such that for every triangle-free graph G on [n] there is an F such that G F, where n is sufficiently large. ∈ F ⊆ The graphs in in the above theorem will be referred to as containers. A weaker version of F Theorem 2.1, which can be concluded from the Szemer´edi Regularity Lemma, could be used instead of Theorem 2.1 here. The only difference is that the upper bound on the size of F is 2o(n2). We need two well-known results. The first is the Ruzsa-Szemer´edi triangle-removal lemma [24] and the second is the Erd˝os-Simonovits stability theorem [14]: Theorem 2.2. For every ε > 0 there exists δ = δ(ε) > 0 and n (ε) > 0 such that any graph 0 G on n > n (ε) vertices with at most δn3 triangles can be made triangle-free by removing at 0 most εn2 edges. Theorem 2.3. For every ε > 0 there exists δ = δ(ε) > 0 and n (ε) > 0 such that every 0 triangle-free graph G on n > n (ε) vertices with at least n2 δn2 edges can be made bipartite 0 4 − by removing at most εn2 edges. We also need the following lemma, which is an extension of results of Moon-Moser [20] and Hujter-Tuza [18]. Lemma 2.4. Let G be an n-vertex triangle-free graph. If G contains at least k vertex-disjoint P ’s, then 3 MIS(G) 2n−k . (1) 2 25 ≤ 4 Proof. The proof is by induction on n. The base case of the induction is n = 1 with k = 0, for which MIS(G) = 1 21− 0 . 2 25 ≤ For the inductive step, let G be a triangle-free graph on n 2 vertices with k vertex- ≥ disjoint P ’s, and let v be any vertex in G. Observe that MIS(G Γ(v)) is the number 3 − of maximal independent sets containing v, and that MIS(G v ) bounds from above the −{ } number of maximal independent sets not containing v. Therefore, MIS(G) MIS(G v )+MIS(G Γ(v)). ≤ −{ } − If G has k vertex-disjoint P ’s, then G Γ(v) has at least k d(v) vertex-disjoint P ’s, and 3 3 − − so, by the induction hypothesis, (cid:16) (cid:17) MIS(G) 2n−1−k−1 +2n−(d(v)+1)−k−d(v) 2n−k 2−1+ 1 +2−d(v)+1+d(v) . 2 25 2 25 2 25 2 25 2 25 ≤ ≤ The function f(x) = 2−1+ 1 +2−x+1+x is a decreasing function with f(3) 0.9987 < 1. So, 2 25 2 25 ≈ if there exists a vertex of degree at least 3 in G, then we have MIS(G) 2n−k as desired. 2 25 ≤ It remains to verify (1) for graphs with ∆(G) 2. Observe that we can assume that ≤ G is connected. Indeed, if G ,...,G are maximal components of G, and each of G has n 1 l i i vertices and k vertex-disjoint P ’s, then i 3 MIS(G) = (cid:89)MIS(Gi) (cid:89)2n2i−2k5i = 2(cid:80)i n2i−(cid:80)i 2k5i = 2n2−2k5. ≤ i i Every connected graph with ∆(G) 2 and n 2 vertices is either a path or a cycle. ≤ ≥ Suppose first that G is a path P . We have MIS(P ) = 2 22− 0 , MIS(P ) = 2 23− 1 . n 2 2 25 3 2 25 ≤ ≤ By Fu¨redi [15, Example 1.1], MIS(P ) = MIS(P ) + MIS(P ) for all n 4. By the n n−2 n−3 ≥ induction hypothesis thus (cid:16) (cid:17) MIS(P ) 2n−2−k−1 +2n−3−k−1 2n−k 2−1+ 1 +2−3+ 1 2n−k . n 2 25 2 25 2 25 25 2 25 2 25 ≤ ≤ ≤ Let now G be a cycle C . We have MIS(C ) = 2 24/2−1/25 and MIS(C ) = 5 25/2−1/25. n 4 5 ≤ ≤ By Fu¨redi [15, Example 1.2], MIS(C ) = MIS(C )+MIS(C ) for all n 6. Therefore, n n−2 n−3 ≥ by the induction hypothesis, MIS(C ) 2n−2−k−1 +2n−3−k−1 2n−k . n 2 25 2 25 2 25 ≤ ≤ Remark 2.5. A disjoint union of C ’s and a matching shows that the constant c for which 5 MIS(G) 2n−k in Lemma 2.4 cannot be smaller than 5.6. 2 c ≤ 3 Asymptotic result In this section we prove an asymptotic version of Theorem 1.1: 5 Lemma 3.1. Fix any γ > 0. Almost every maximal triangle-free graph G on the vertex set [n] satisfies the following: for any max-cut V(G) = X Y, there exist X(cid:48) X and Y(cid:48) Y ∪ ⊆ ⊆ such that (i) X(cid:48) γn and G[X X(cid:48)] is an induced perfect matching, and | | ≤ − (ii) Y(cid:48) γn and Y Y(cid:48) is an independent set. | | ≤ − The outline of the proof is as follows. We observe that every maximal triangle-free graph G on [n] can be built in the following three steps. (S1) Choose a max-cut X Y for G. ∪ (S2) Choose triangle-free graphs S and T on the vertex sets X and Y, respectively. (S3) Extend S T to a maximal triangle-free graph by adding edges between X and Y. ∪ We give an upper bound on the number of choices for each step. First, there are at most 2n ways to fix a max-cut X Y in (S1). For (S2), we show (Lemma 3.5) that almost ∪ all maximal triangle-free graphs on [n] are o(n2)-close to bipartite, which implies that the number of choices for most of these graphs in (S2) is at most 2o(n2). For fixed X,Y,S,T, we bound, usingClaim3.4, thenumberofchoicesin(S3)bythenumberofmaximalindependent sets in some auxiliary link graph L. This enables us to use Lemma 2.4 to force the desired structure on S and T. Definition 3.2 (Link graph). Given edge-disjoint graphs A and S on [n], define the link graph L := L [A] of S on A as follows: S V(L) := E(A) and E(L) := a a : s E(S) such that a ,a ,s forms a triangle . 1 2 1 2 { ∃ ∈ { } } Claim 3.3. If A and S are triangle-free, then L [A] is triangle-free. S Proof. Indeed, otherwise there exist a ,a ,a E(A) and s ,s ,s E(S) such that the 3- 1 2 3 1 2 3 ∈ ∈ sets a ,a ,s , a ,a ,s , and a ,a ,s spantriangles. SinceAistriangle-free, theedges 1 2 1 2 3 2 1 3 3 { } { } { } a ,a ,a share a common endpoint, and s ,s ,s spans a triangle. This is a contradiction 1 2 3 1 2 3 { } since S is triangle-free. Claim 3.4. Let S and A be two edge-disjoint triangle-free graphs on [n] such that there is no triangle a,s ,s in S A with a E(A) and s ,s E(S). Then the number of maximal 1 2 1 2 { } ∪ ∈ ∈ triangle-free subgraphs of S A containing S is at most MIS(L [A]). S ∪ Proof. Let G be a maximal triangle-free subgraph of S A that contains S. We show that ∪ E(G) E(A) spans a maximal independent set in L := L [A]. Clearly, E(G) E(A) spans S ∩ ∩ an independent set in L because otherwise there would be a triangle in G. Suppose that E(G) E(A) is not a maximal independent set in L. Then there is a E(A) E(G) 1 ∩ ∈ − such that, for any two edges a E(A) E(G) and s E(S), a ,a ,s does not form 2 1 2 ∈ ∩ ∈ { } a triangle. By our assumption, there is no triangle a ,a ,a with a ,a E(A) and no 1 2 3 2 3 { } ∈ triangle a ,s ,s with s ,s E(S). Therefore, G a is triangle-free, contradicting 1 1 2 1 2 1 { } ∈ ∪ { } the maximality of G. 6 We fix the following parameters that will be used throughout the rest of the paper. Let γ,β,ε,ε(cid:48) > 0 be sufficiently small constants satisfying the following hierachy: ε(cid:48) δ (ε) ε β δ (γ3) γ 1, (2) 2.3 2.3 (cid:28) (cid:28) (cid:28) (cid:28) (cid:28) (cid:28) where δ (x) > 0 is the constant returned from Theorem 2.3 with input x. The notation 2.3 x y above means that x is a sufficiently small function of y to satisfy some inequalities (cid:28) in the proof. In the following proof, δ (x) is the constant returned from Theorem 2.2 with 2.2 input x, and in the rest of the paper, we shall always assume that n is sufficiently large, even when this is not explicitly stated. Lemma 3.5. Almost all maximal triangle-free graphs on [n] are 2εn2-close to bipartite. Proof. Let be the family of graphs obtained from Theorem 2.1 using δ (ε(cid:48)). Then every 2.2 F triangle-free graph on [n] is a subgraph of some container F . ∈ F We first show that the family of maximal triangle-free graphs in small containers is negligible. Consider a container F with e(F) n2/4 6ε(cid:48)n2. Since F contains at ∈ F ≤ − most δ (ε(cid:48))n3 triangles, by Theorem 2.2, we can find A and B, subgraphs of F, such that 2.2 F = A B, where A is triangle-free, and e(B) ε(cid:48)n2. For each F , fix such a pair ∪ ≤ ∈ F (A,B). Then every maximal triangle-free graph in F can be built in two steps: (i) Choose a triangle-free S B; ⊆ (ii) Extend S in A to a maximal triangle-free graph. The number of choices in (i) is at most 2e(B) 2ε(cid:48)n2. Let L := L [A] be the link graph of S ≤ S on A. By Claim 3.3, L is triangle-free. Claim 3.4 implies that the number of maximal triangle-free graphs in S A containing S (i.e. the number of extensions in (ii)) is at most ∪ MIS(L). Thus, by Lemma 2.4, MIS(L) 2|A|/2 2n2/8−3ε(cid:48)n2. ≤ ≤ Therefore, the number of maximal triangle-free graphs in small containers is at most 2ε(cid:48)n2 2n2/8−3ε(cid:48)n2 2n2/8−ε(cid:48)n2. |F|· · ≤ From now on, we may consider only maximal triangle-free graphs contained in containers of size at least n2/4 6ε(cid:48)n2. Let F be any large container. Recall that by Theorem 2.2, − F = A B, where A is triangle-free with e(A) n2/4 7ε(cid:48)n2 and e(B) ε(cid:48)n2. Since ∪ ≥ − ≤ ε(cid:48) δ (ε), by Theorem 2.3, A can be made bipartite by removing at most εn2 edges. Since 2.3 (cid:28) ε(cid:48) ε, F can be made bipartite by removing at most (ε(cid:48) +ε)n2 2εn2 edges. Therefore, (cid:28) ≤ every maximal triangle-free graphs contained in F is 2εn2-close to bipartite. Fix X,Y,S,T as in steps (S1) and (S2). Let A be the complete bipartite graph with parts X and Y. By Claim 3.4, the number of ways to extend S T in (S3) is at most ∪ MIS(L [A]). The number of ways to fix X and Y is at most 2n, and by Lemma 3.5, the S∪T number of ways to fix S and T is at most (cid:0) n2 (cid:1). It follows that if MIS(L [A]) is smaller 2εn2 S∪T than 2n2/8−cn2 for some c ε, then the family of maximal triangle-free graphs with such (cid:29) (X,Y,S,T) is negligible. 7 Claim 3.6. L [A] = S T. S∪T (cid:3) Proof. Note that V(L [A]) = E(A) = (x,y) : x X,y Y = V(S T). Using the S∪T (cid:3) { ∈ ∈ } definition of the Cartesian product, (x,y) and (x(cid:48),y(cid:48)) are adjacent in S T if and only if (cid:3) x = x(cid:48) and y,y(cid:48) E(T), or y = y(cid:48) and x,x(cid:48) E(S), i.e. if and only if x = x(cid:48),y,y(cid:48) { } ∈ { } ∈ { } or x,x(cid:48),y = y(cid:48) form a triangle in S A. But by the definition of L [A], this is exactly S∪T { } ∪ when (x,y) and (x(cid:48),y(cid:48)) are adjacent in L [A]. S∪T Claim 3.6 allows us to rule out certain structures of S and T since, by Lemma 2.4, if S T has many vertex disjoint P ’s then the number of maximal-triangle free graphs with (cid:3) 3 S = G[X] and T = G[Y] is much smaller than 2n2/8. Claim 3.7. For almost all maximal triangle-free n-vertex graphs G with a max-cut X Y, ∪ (i) X , Y n/2 βn, and | | | | ≥ − (ii) ∆(X),∆(Y) βn. ≤ Proof. Let G be a maximal triangle-free graph with a max-cut X Y. By Lemma 3.5, almost ∪ all maximal triangle-free graphs are 2εn2-close to bipartite, which implies that the number of choices for G[X] and G[Y] is at most (cid:0) n2 (cid:1). Denote by A the complete bipartite graph 2εn2 with partite sets X and Y. For (i), suppose that X n/2 βn. Then X Y n2/4 β2n2, and for any fixed S | | ≤ − | || | ≤ − on X and T on Y, Lemma 2.4 implies MIS(L [A]) 2n2/8−β2n2/2. Since β ε, it follows S∪T ≤ (cid:29) from the discussion before Claim 3.6 that the family of maximal triangle-free graphs with such max-cut X Y is negligible. ∪ For (ii), suppose that G has a vertex x X of inner degree at least βn. Since X Y is ∈ ∪ a max-cut, N (x) N (x) βn. Since G is triangle-free, there is no edge in between Y X | | ≥ | | ≥ N (x) and N (x). Let A(cid:48) A be a graph formed by deleting all edges between N (x) X Y X ⊆ and N (y) from A. Define a link graph L(cid:48) := L [A(cid:48)] of S T on A(cid:48). In this case, the Y S∪T ∪ number of choices for (S3) is at most MIS(L(cid:48)). Since L(cid:48) is triangle-free (Claim 3.3) and L(cid:48) = e(A(cid:48)) X Y N (x) N (x) n2 β2n2, it follows from Lemma 2.4 that | | ≤ | || |−| X || Y | ≤ 4 − MIS(L(cid:48)) 2|L(cid:48)|/2 2n2/8−β2n2/2. ≤ ≤ Proof of Lemma 3.1. First, we show that for almost every maximal triangle-free graph G on [n] with max-cut X Y and with G[X] = S and G[Y] = T, there are very few vertex-disjoint ∪ P ’s in S T. Suppose that there exist βn vertex-disjoint P ’s in S or in T, say in S. Since 3 3 ∪ L [A] = S T by Claim 3.6, and for each of the βn vertex-disjoint P ’s in S we obtain S∪T (cid:3) 3 T vertex-disjoint P ’s in S T, the number of vertex-disjoint P ’s in L [A] is at least 3 (cid:3) 3 S∪T | | βn T = βn Y . By Claim 3.7(i), βn Y βn(n/2 βn) βn2/3. Then by Lemma 2.4, | | | | | | ≥ − ≥ MIS(L [A]) 2|S(cid:3)T|/2−βn2/75 2n2/8−βn2/75. S∪T ≤ ≤ Since β ε, the family of maximal triangle-free graphs with such (X,Y,S,T) is negligible. (cid:29) Hence, for almost every maximal triangle-free graph G with some (X,Y,S,T), we can find 8 S S S 00 β2n2 P ’s 3 S0 S0 J =(S(cid:3)T0) (S0(cid:3)T) ∪ T T 0 0 T T (a) (b) Figure 2: Forbidden structures in S and T. some induced subgraphs S(cid:48) S and T(cid:48) T with S(cid:48) 3βn and T(cid:48) 3βn such that both ⊆ ⊆ | | ≤ | | ≤ S S(cid:48) and T T(cid:48) are P -free. This implies that each of S S(cid:48) and T T(cid:48) is a union of a 3 − − − − matching and an independent set. Next, we show that at most one of the graphs S and T can have a large matching. Suppose both S and T have a matching of size at least βn, then there are at least β2n2 vertex-disjoint C ’s in S T, each of which contains a copy of P (see Figure 2a). It follows 4 (cid:3) 3 that the family of such graphs is negligible since MIS(L [A]) 2n2/8−β2n2/25 and β ε. S∪T ≤ (cid:29) Hence, we can assume that all but 2βn vertices in T form an independent set. Redefine T(cid:48) so that T(cid:48) 2βn and V(T T(cid:48)) is an independent set. | | ≤ − Lastly, we show that there are very few isolated vertices in the graph S S(cid:48). Suppose − that there are γn/2 isolated vertices in S S(cid:48), spanning a subgraph S(cid:48)(cid:48) of S. We count − MIS(S T) as follows. Let J := (S T(cid:48)) (S(cid:48) T) and L(cid:48) := S T J. Every maximal (cid:3) (cid:3) (cid:3) (cid:3) ∪ − independent set in S T can be built by (cid:3) (i) choosing an independent set in J, and (ii) extending it to a maximal independent set in L(cid:48). Since J S(cid:48) T + T(cid:48) S 3βn n+2βn n = 5βn2, there are at most 2|J| = 25βn2 choices | | ≤ | || | | || | ≤ · · for (i). Note that L(cid:48) consists of isolated vertices from S(cid:48)(cid:48) (T T(cid:48)) and an induced matching (cid:3) − from (S S(cid:48) S(cid:48)(cid:48)) (T T(cid:48)) (see Figure 2b). Thus the number of extensions in (ii) is at (cid:3) − − − most MIS((S S(cid:48) S(cid:48)(cid:48)) (T T(cid:48))). The graph (S S(cid:48) S(cid:48)(cid:48)) (T T(cid:48)) is a perfect matching (cid:3) (cid:3) − − − − − − with 1 1 1 (cid:16) γn(cid:17) 1 (cid:16)n γn(cid:17)2 n2 γn2 S S(cid:48) S(cid:48)(cid:48) T T(cid:48) S S(cid:48)(cid:48) T S (n S ) 2| − − || − | ≤ 2| − || | ≤ 2 | |− 2 −| | ≤ 2 2 − 4 ≤ 8 − 16 edges, and so choosing one vertex for each matching edge gives at most 2n2/8−γn2/16 maximal independentsets. Sinceβ γ,itfollowsthatMIS(S T) 25βn2 2n2/8−γn2/16 2n2/8−γn2/17. (cid:3) (cid:28) ≤ · ≤ Thus, such family of maximal triangle-free graphs is negligible, and we may assume that S(cid:48)(cid:48) γn/2. | | ≤ 9 The statement of Lemma 3.1 follows by setting X(cid:48) := V(S(cid:48) S(cid:48)(cid:48)) and Y(cid:48) := V(T(cid:48)). ∪ Indeed, X(cid:48) 3βn+γn/2 γn, Y(cid:48) 2βn γn, G[X X(cid:48)] = S S(cid:48) S(cid:48)(cid:48) is a perfect | | ≤ ≤ | | ≤ ≤ − − − matching, and Y Y(cid:48) = V(T) V(T(cid:48)) is an independent set. − − 4 Proof of Theorem 1.1 For the proof of Theorem 1.1, we need to introduce several classes of graphs on the vertex set V = [n]. Recall the hierarchy of parameters fixed in Section 3: ε(cid:48) δ (ε) ε β δ (γ3) γ 1, (3) 2.3 2.3 (cid:28) (cid:28) (cid:28) (cid:28) (cid:28) (cid:28) Definition 4.1. Fix a vertex partition V = X Y, a perfect matching M on the vertex set ∪ X (in case X is odd, M is an almost perfect matching covering all but one vertex of X), | | and non-negative integers r, s and t. 1. Denoteby (X,Y,M,s,t)the classof maximaltriangle-free graphs Gwithmax-cutX Y B ∪ satisfying the following three conditions: (i) The subgraph G[X] has a maximum matching M(cid:48) M covering all but at most γn ⊆ vertices in X; (ii) The size of a largest family of vertex-disjoint P ’s in S := G[X] is s; 3 (iii) The size of a maximum matching in T := G[Y] is t. 2. Denote by (X,Y,M,r) (X,Y,M,0,0) the subclass consisting of all graphs in B ⊆ B (X,Y,M,0,0) with exactly r isolated vertices in G[X]. B 3. When X is even, denote by (X,Y,M) the class of all maximal triangle-free graphs G | | G with max-cut X Y, G[X] = M, and Y an independent set. ∪ 4. When X is even, denote by (X,Y,M) the class of maximal triangle-free graphs G that | | H are constructed as follows: (P1) Add M to X; (P2) For every edge x x M and every vertex y Y, add either the edge x y or x y; 1 2 1 2 ∈ ∈ (P3) Extend each of the 2|X||Y|/2 resulting graphs to a maximal triangle-free graph by adding edges in X and/or Y. ByLemmas3.1,3.5andClaim3.7, throughouttherestoftheproof, wemayonlyconsider maximal triangle-free graphs in (cid:83) (X,Y,M,s,t) that are βn2-close to bipartite, X,Y,M,s,tB X , Y n/2 βn and ∆(X),∆(Y) βn. We may further assume from the proof of | | | | ≥ − ≤ Lemma 3.1 that s,t βn. ≤ Notice that graphs from (X,Y,M) = (X,Y,M,0) are precisely those with the de- G B sired structure. We will show that the number of graphs without the desired structure is exponentially smaller. The set of “bad” graphs consists of the following two types: (cid:83) (i) when X is even, (X,Y,M,s,t) (X,Y,M,0); | | (cid:83)s,tB −B (ii) when X is odd, (X,Y,M,s,t). | | s,tB 10