Extremal results for graphs avoiding a rainbow subgraph

We say that $k$ graphs $G_1,G_2,\dots,G_k$ on a common vertex set of size $n$ contain a rainbow copy of a graph $H$ if their union contains a copy of $H$ with each edge belonging to a distinct $G_i$. We provide a counterexample to a conjecture of Frankl on the maximum product of the sizes of the edge sets of three graphs avoiding a rainbow triangle. We propose an alternative conjecture, which we prove under the additional assumption that the union of the three graphs is complete. Furthermore, we determine the maximum product of the sizes of the edge sets of three graphs or four graphs avoiding a rainbow path of length three.

The classical theorem of Mantel [8] asserts that the maximum number of edges in an n-vertex graph containing no triangle is n 2 /4 .This result was generalized by Turán [9], who showed that the maximum number of edges in an n-vertex graph with no complete graph K r as a subgraph is obtained by taking a complete (r − 1)-partite graph with parts of size ⌊n/(r − 1)⌋ or ⌈n/(r − 1)⌉.
Many natural generalizations of these theorems have been considered.For a graph G, let E(G) denote the edge set of G and let e(G) = |E(G)|.Of particular importance to the present work is an extremal problem due to Keevash, Saks, Sudakov and Verstraëte [7].They considered (among other problems) the maximum of e(G 1 ) + e(G 2 ) + • • • + e(G k ) across k graphs on a common vertex set of size n with the property that there is no K r with each of its edges coming from a distinct E(G i ).Such a K r is referred to as a rainbow K r .For this problem, there are two natural constructions.On the one hand, if k ≥ r 2 −1 2 , then we take k identical copies of the Turán graph.On the other hand, when r 2 ≤ k < r 2 −1 2 , it is better to take r 2 − 1 copies of the complete graph and let the remaining graphs have empty edge sets (of course for k < r 2 , it is optimal to take all k graphs to be complete).Keevash, Saks, Sudakov and Verstraëte [7] also proved that for 3-chromatic color-critical graphs and sufficiently large n, an analogous result holds in which either a construction consisting of k copies of a Turán graph, or a construction consisting of complete graphs and graphs with no edges is optimal.Recently Chakraborti, Kim, Lee, Liu and Seo [3] showed that the same holds for 4-chromatic color-critical graphs and almost all colorcritical graphs of chromatic number at least 5, partially verifying a conjecture from [7].In the context of extremal set theory, rainbow extremal problems have also been considered earlier, for example by Hilton [6].
After one has bounds on e(G 1 )+ e(G 2 )+ • • • + e(G k ), it is natural to consider maximizing other objective functions over e(G 1 ), e(G 2 ),. . ., e(G k ).The problem of maximizing min e(G 1 ), e(G 2 ), e(G 3 ) while avoiding a rainbow triangle was considered by Aharoni, DeVos, de la Maza, Montejano and Šámalin [1], answering a question of Diwan and Mubayi [4].Let P r denote the path with r vertices.The problem of maximizing min e(G 1 ), e(G 2 ), . . .e(G k ) while avoiding a rainbow P 4 was considered by Babiński and Grzesik [2].For the problem of maximizing the product e(G 1 )e(G 2 )e(G 3 ) while avoiding a rainbow triangle, Frankl [5] gave the following conjecture.
Conjecture 1 (Frankl).Let G 1 , G 2 , G 3 be graphs on a common vertex set of size n with no rainbow triangle.Then e(G 1 )e(G 2 )e(G 3 ) ≤ n 2 4
Taking G 1 , G 2 , G 3 to be 3 copies of the complete bipartite graph with almost equal parts attains this bound.Frankl proved that under the additional assumption E(G 1 ) ⊆ E(G 2 ) and E(G 1 ) ⊆ E(G 3 ), Conjecture 1 holds.We show that Frankl's conjecture does not hold in the general case.
Let γ be the maximum of on [0, 1], and assume γ is attained at x = x 0 .Note that 1 52 < γ < 1 51 (and x 0 ≈ .729).We have the following.Proof.Let [n] = X ∪ Y be a partition of [n] with X having size approximately x 0 n and Y having size approximately (1 − x 0 )n.Let G 1 consist of a complete graph on X, and G 2 consist of the union of a complete graph on X and a complete graph on Y and let G 3 consist of a complete graph on Y as well as all edges between X and Y .Observe that the product e(G 1 )e(G 2 )e(G 3 ) is asymptotically γn 6 .Moreover, we believe that the expression in Theorem 1 is asymptotically best possible.Conjecture 2 is proved under the additional assumption that every pair of vertices forms an edge in at least one of the E(G i ).For convenience, we say that a pair of vertices (or an edge) in the n-vertex ground set is colored if it belongs to at least one of the sets E(G 1 ), E(G 2 ), E(G 3 ).An edge is t-colored if it belongs to exactly t of the sets E(G 1 ), E(G 2 ), E(G 3 ).
Theorem 2. Let G 1 , G 2 , G 3 be graphs on a common vertex set of size n with no rainbow triangle.If n is sufficiently large and every pair of vertices on the ground set is colored, then the construction described in Theorem 1 maximizes e(G 1 )e(G 2 )e(G 3 ).
Proof.Let n be sufficiently large, and let G 1 , G 2 , G 3 be graphs on a common vertex set of size n with no rainbow triangle and assume that every edge is colored and e(G 1 )e(G 2 )e(G 3 ) is maximal.For a vertex v and i ∈ [3], let N i (v) be the set of neighbors of v in G i which are not neighbors of v in G l for all l = i.For any {i, j, l} = {1, 2, 3}, we denote the set of neighbors of the vertex v in G i and G j but not in G l by N ij (v).
Assume e(G 1 )e(G 2 )e(G 3 ) ≥ γn 6 1 − o(1) .Then we have for any sufficiently large n.Since three-colored edges cannot be adjacent to any edge with at least two colors, the number of three-colored edges is at most n/2.Hence the number of two-colored edges is at least 0.3n 2 .
Claim 3. The graph containing all edges with at least two colors is the union of vertex disjoint cliques such that every edge of each clique has the same coloring.
Proof.Let e = uv be a two-colored edge, and assume that e has colors 1 and 2. If Let w ∈ N 12 (v).Then uw is not colored with color 3. Suppose by the way of contradiction that uw is a one-colored edge.Without loss of generality, we may assume that uw is of color 1.Then by the maximality of the coloring, there is a vertex w ′ such that w ′ / ∈ {v, u, w} and edges uw ′ and ww ′ are colored with colors 1 and 3 in any order.This is a contradiction since for any coloring of the edge w ′ v, the triangle w ′ vu or the triangle w ′ vw is a rainbow triangle.Hence Then the claim follows from ( 2) and (3).
Let A be a clique of maximum size in the graph consisting of edges of at least two colors.Let a be the size of A. Then (a−1)n 2 ≥ 0.3n 2 since the maximum degree in the graph of the two-colored edges is a − 1 and we observed earlier that there are at least 0.3n 2 two-colored edges.Hence we have a ≥ 0.6n.Since a > n/2 and there are at least 0.3n 2 two-colored edges, it follows a 2 + n−a 2 ≥ 0.3n 2 .Thus we have a ≥ 0.723n.
Without loss of generality, we can assume that the edges of A are colored with colors 1 and 2. Then we have e(A) ≥ 0.26n 2 and it follows e(G 3 ) ≤ 0.24n 2 .From the maximality of the product e(G 1 )e(G 2 )e(G 3 ) and Claim 3, we have that all one-colored edges are of color 3. Indeed, otherwise we could change the color of all the one-colored edges to color 3 and since e(G 3 ) < e(A), this would increase the product.Moreover, for any maximal clique B in the graph different from A and consisting of edges of at least two colors, one of those colors must be color 3 (for otherwise, changing one of the colors in B to color 3 would increase the product).
By maximality, it is easy to observe that there is at most one clique colored with colors i and j for all 1 ≤ i < j ≤ 3. Let a be the size of clique colored with colors 1 and 2, let b be the size of clique colored with colors 1 and 3, and let c be the size of clique colored with colors 2 and 3. Let d be the number of three-colored edges.Then G 1 consists of a complete graph of size a, a complete graph of size b and a matching of size d, the graph G 2 consists of complete graphs of size a and c and a matching of size d, and G 3 consists of all edges not in A. Without loss of generality we may assume c ≥ b.We may also assume that we do not have the case b = c = 0 for otherwise the product is only O(n 5 ).Then the following holds: Therefore d = 0, otherwise by changing the coloring, we could increase the product.Thus a + b + c = n and since a ≥ 0.72n, we have Therefore without loss of generality, we can assume b = 0, otherwise by changing the coloring, we could increase the product.Thus, we have obtained that G 1 , G 2 and G 3 have the form of the construction in the proof of Theorem 1.That is, we have a partition of the ground set into two parts X and Y , and each edge inside X is colored with colors 1 and 2, each edge inside Y is colored with colors 2 and 3, and all edges between X and Y are colored with 3. The maximum product of the number of edges among such constructions is again given asymptotically by maximizing the expression (1), thus yielding an upper bound of the form γn 6 1 + o(1) .
Next we obtain some results about graphs avoiding a rainbow P 4 (recall P 4 denotes the path with 4 vertices).Proof.Let V be the vertex set of size n.Let H be the graph induced by all edges with three colors.Then H is P 4 -free, so e(H) ≤ ex(n, P 4 ) ≤ n.Hence we can assume that there is no edge with three colors.For any vertex v ∈ V and for any i be a partition of V , where A i is the set of vertices v with c(v) = {i}, A ij is the set of vertices v with c(v) = {i, j} and A 123 is the set of vertices v with c(v) = {1, 2, 3}.We call the sets A i , A ij and A 123 the parts of G. Let Let G 1 , G 2 , G 3 be graphs on V satisfying the assumptions above and maximizing e(G 1 )e(G 2 )e(G 3 ).Let G be the graph G 1 ∪ G 2 ∪ G 3 .Then we may assume that G[A i ] is complete in G i for any i ∈ {1, 2, 3} and G[A ij ] is complete in G i and G j for any 1 ≤ i < j ≤ 3. We may also assume that every vertex in A i is connected to every vertex in A 123 with an edge of color i for i ∈ [3] and every vertex in A i,j is connected to every vertex in A i and in A j with an edge of color i and of color j, respectively.
Let e i = e(G i ) for any i ∈ [3] and let Lemma 6.For any v ∈ V , we have Proof.Let u, v be two vertices in V .By maximality of e 1 e 2 e 3 , putting u from its part to the part of v, we obtain Similarly, by putting v from its part to the part of u, we obtain k(v)+o By Theorem 4, we may assume that e 1 e 2 e 3 ≥ n 6 /256.Then e 1 + e 2 + e 3 ≥ 3 3 n 6 /256 > 0.47n 2 .
Case 1: A i is not empty for any i ∈ [3].Let v i be a vertex in A i for any i ∈ [3], and let {i, j, k} = {1, 2, 3}.Applying Lemma 6 to v i for any i ∈ [3], we obtain Hence Then we obtain e 1 = e 3 + o(n 2 ).Hence, Proof.Let V be the vertex set.Let H be the graph induced by all edges with at least three colors.Then H is P 4 -free.Hence e(H) ≤ ex(n, P 4 ) ≤ n.So we can assume that there is no edge with at least three colors.
For any vertex v ∈ V and for any i , there are no edges between A and 1≤i<j≤4 A ij , no edges between any two sets in {A ij : 1 ≤ i < j ≤ 4} and no edges between A i and j∈ [4]\{i} A j ∪ k,l∈ [4]\{i}: k<l A kl ).Let G 1 , G 2 , G 3 , G 4 be graphs on V satisfying the assumptions above and maximizing the product of the size of the edge sets, and let G be the graph . By Theorem 7, we may assume e(G 1 )e(G 2 )e(G 3 )e(G 4 ) ≥ n 8 1/4096 + o (1) .Therefore e(G 1 ) + e(G 2 ) + e(G 3 ) + e(G 4 ) ≥ n 2 /2 + o(n 2 ).Since there are at most n 2 /2 edges in G and no edges with at least three colors, we know that the number of edges with two colors is at least as great as the number of missing edges in G. Then Hence there are i, j ∈ [4], say 1 and 2, such that We conclude by mentioning some open problems.First, it appears plausible that for 6 graphs G 1 , G 2 , . . ., G 6 avoiding a rainbow K 4 , the asymptotically optimal construction is simply 6 copies of the Turán graph with 3 parts.
Second, for 2k graphs avoiding a rainbow P 4 , one can take an independent set of size n(2k − 1)/(4k − 1) and 2k cliques, each of size n/(4k − 1), each containing edges of one of the colors, as well as the edges between each of the cliques and the independent set in their respective colors.It appears this construction may be asymptotically optimal.
Finally, for k graphs avoiding a rainbow path P k+1 (k +1 vertices), one could take two disjoint cliques of size n/2, each consisting of k-colored edges from two different sets of k colors.

Theorem 1 .
There exist graphs G 1 , G 2 , G 3 on a common vertex set of size n and with no rainbow triangle such that e(G 1 )e(G 2 )e(G 3 ) ≥ γn 6 1 − o(1) .

Theorem 4 .
There exist graphs G 1 , G 2 , G 3 on a common vertex set of size n and with no rainbow P 4 such that e(G 1 )e(G 2 )e(G 3 ) ≥ n 6 1 256 − o(1) .Proof.Let [n] = X ∪Y be a partition of [n] with X and Y of sizes approximately 0.5n.Let G 1 consist of a complete graph on X, let G 2 consist of a complete graph on Y , and let G 3 consist of a complete graph on X and a complete graph on Y .Observe that e(G 1 )e(G 2 )e(G 3 ) = n 6 1 256 − o(1) .Theorem 5.For three graphs G 1 , G 2 , G 3 on a common vertex set of size n with no rainbow P 4 , we have e(G 1 )e(G 2 )e(G 3 ) ≤ n 6 1 256 + o(1) .
be a partition of V , where A i is the set of vertices v with c(v) = {i}, and A ij is the set of vertices v with c(v) = {i, j} and A is the set of vertices v with |c(v)| ≥ 3. Let a i = |A i | for any i ∈ [4], a ij = |A ij | for any 1 ≤ i < j ≤ 4 and a = |A|.If one part of this partition has size o(n), then we assume the size of this part is 0. Note that there are no edges in G[A]
3 and a 123 = |A 123 |.If one part of this partition has size o(n), then we assume that the size of this part is 0. Note that there are no edges in G[A 123 ], there are no edges between any two sets from {A 12 , A 13 , A 23 , A 123 }, and there are no edges between A i1 and a 123 > 0.8n.Since there is no edge in G[A 123 ], each edge is colored at most two times, thus e 1 + e 2 + e 3 ≤ 2 n One of the parts A i , say A 1 , is empty and the other two are not.First, observe that A 123 is empty.Applying Lemma 6 to some vertex in A 2 and in A 3 , we obtain Hence e 2 + e 3 = n 6 (n + a 23 ) + o(n 2 ).Then e 2 e 3 ≤ n 12 2 (n + a 23 ) 2 + o(n 4 ).Two of the parts A i , say A 1 and A 2 , are empty and the other one is not.First, observe that A 123 is empty.If A 13 is empty, then moving all vertices in A 3 to A 23 would increase the product.Hence we may assume that A 13 and A 23 are not empty.Applying Lemma 6 to some vertex in A 13 , in A 3 and in A 23 , we obtain ).Hence a 12 = 0 or a 13 = a 23 + o(n).If a 12 = 0, then since |A 3 | > o(n), we know e23 > e 1 e 2 + o(n 4 ), a contradiction.So we have a 13 = a 23 + o(n).
[3]e 4: A i is empty for all i ∈[3].First, observe that A 123 is empty.Without loss of generality, we can assume a 12 ≤ a 13 ≤ a 23 .Then the following holds:The preceding inequality is easy to verify by taking a difference of the rightand left-hand sides, multiplying out and pairing off negative terms with positive ones, using a 12 ≤ a 13 ≤ a 23 .It follows that a 12 = 0 since otherwise we would increase the product e 1 e 2 e 3 by moving half of the vertices from A 12 to A 13 and the other half to A 23 .Then There exist graphs G 1 , G 2 , G 3 , G 4 on a common vertex set of size n and with no rainbow P 4 such that e(G 1 )e(G 2 )e(G 3 )e(G 4 ) ≥ n 8 ∪Y be a partition of [n] with X and Y of sizes approximately 0.5n.Let G 1 , G 2 consist of a complete graph on X and G 3 , G 4 consist of a complete graph on Y .Observe that e(G 1 )e(G 2 )e(G 3 )e(G 4 ) = n 8 1 8 4 −o(1) .Theorem 8.For four graphs G 1 , G 2 , G 3 , G 4 on a common vertex set of size n and with no rainbow P 4 , we have e(G 1 )e(G 2 )e(G 3 )e(G 4 ) ≤ n 8 1 8 4 + o(1) . 2.2.