Extremal graph theoretic questions for q-ary vectors

A $q$-graph $H$ on $n$ vertices is a set of vectors of length $n$ with all entries from $\{0,1,\dots,q\}$ and every vector (that we call a $q$-edge) having exactly two non-zero entries. The support of a $q$-edge $\mathbf{x}$ is the pair $S_{\mathbf{x}}$ of indices of non-zero entries. We say that $H$ is an $s$-copy of an ordinary graph $F$ if $|H|=|E(F)|$, $F$ is isomorphic to the graph with edge set $\{S_{\mathbf{x}}:\mathbf{x}\in H\}$, and whenever $v\in e,e'\in E(F)$, the entries with index corresponding to $v$ in the $q$-edges corresponding to $e$ and $e'$ sum up to at least $s$. E.g., the $q$-edges $(1,3,0,0,0), (0,1,0,0,3)$, and $(3,0,0,0,1)$ form a 4-triangle. The Tur\'an number $\mathrm{ex}(n,F,q,s)$ is the maximum number of $q$-edges that a $q$-graph $H$ on $n$ vertices can have if it does not contain any $s$-copies of $F$. In the present paper, we determine the asymptotics of $\mathrm{ex}(n,F,q,q+1)$ for many graphs $F$.


Introduction
The main problem of extremal graph theory is to determine the Turán number ex(n, F ), the maximum number of edges that an n-vertex graph H can have if H does not contain F as a subgraph.The analogous parameter for forbidding a family F of subgraphs is denoted by ex(n, F ).The asymptotics of ex(n, F ) is given by the Erdős-Stone-Simonovits theorem [3,2] whenever F has chromatic number at least 3.For many bipartite graphs F , even the order of magnitude is unknown; for a survey see [4].
Theorem 1.1 (Erdős-Stone-Simonovits, [2,3]).For a family F of graphs, let χ(F ) denote the minimum value of χ(F ) over all members F of F .Then ex(n, F ) = (1− 1 χ(F )−1 −o(1)) n 2 .In this paper, we present a generalization of this problem via the incidence matrix of graphs.The incidence matrix of a graph G is an |E(G)| × |V (G)| matrix M, whose rows are indexed with the edges, the columns are indexed with the vertices of G, and for v ∈ V (G) and e ∈ E(G) the corresponding entry is M[e, v] = 1 if v ∈ e and M[e, v] = 0 if v / ∈ e.A 0-1 matrix is an incidence matrix of a simple graph if and only if all its columns are pairwise distinct, and every column contains exactly two 1-entries.
We want the setting to be more general by allowing entries from {0, 1, . . ., q}, but still every column should have exactly two non-zero entries.To do so first we define the generalization of an edge on n vertices: it is a vector x ∈ {0, 1, . . ., q} n that we call a q-edge, and its ith coordinate will be denoted by x i .The support of x ∈ {0, 1, . . ., q} n is S x := {i : 1 ≤ i ≤ n, x i = 0}.We introduce the notation Q(n, r) := {x ∈ {0, 1, . . ., q} n : |S x | = r}.Then a q-graph on n vertices is any subset H of Q(n, 2).For a q-graph H, we write S H to denote {S x : x ∈ H}.We denote Q(n, 2) by 2(n, 2), 3(n, 2) in case q = 2, 3 respectively.
We still need to define when two q-edges intersect at a certain vertex, or more generally when a q-graph H contains an ordinary graph F .There are probably several ways how one could do that, we use the following approach of ours: in the recent manuscript [8], generalizing set intersection, for an integer s ≥ 1 we defined the s-sum intersection of two q-edges x, y ∈ {0, 1, . . ., q} n as x∩ s y = {i : 1 ≤ i ≤ n for which x i + y i ≥ s}.(The case q = 1, s = 2 is ordinary set intersection via characteristic vectors.)As an analogous definition, we would say that q-edges of support size 2 form an s-copy of a graph F if they s-sum intersect "according to F ". Formally, we introduce the following definition.Definition 1.2.If F = (V (F ), E(F )) is an ordinary graph without isolated vertices and H ⊆ Q(n, 2) is a q-graph, then we say that H is an s-copy of F if the graph (V, E) with V = ∪ x∈H S x , E = S H is isomorphic to F ; and if ι : F → (V, E) is an isomorphism1 , then for every e, e ′ ∈ E(F ) and v ∈ e ∩ e ′ we have ι(e) ι(v) + ι(e ′ ) ι(v) ≥ s.
For graphs F with isolated vertices, we say that H ⊆ Q(n, 2) is an s-copy of F if n ≥ |V (F )| and H is an s-copy of F [U], where U is the set of non-isolated vertices of F .
In this paper, we will only consider cases s = q + 1 and for the sake of simplicity we write ex(n, F, q) for ex(n, F, q, q + 1).
There are several very natural first thoughts that one can have when starts thinking about determining ex(n, F, q).
A trivial construction is to consider an ordinary F -free graph G on n vertices with ex(n, F ) edges and define H G,q := {x ∈ Q(n, 2) : S x ∈ E(G)}.Clearly, H G,q does not contain any (q + 1)-copies of F and |H G,q | = q 2 • ex(n, F ).This shows that ex(n, F, q) ≥ q 2 • ex(n, F ) for any graph F and q ≥ 1, but it turns out that this inequality is hardly ever sharp.Trivial exceptions are matchings for which the "sum-intersection condition" is void.
As we will show, there is a simple construction and an easy observation that partition graphs according to the asymptotics of ex(n, F, q).Our first result shows that the construction U q,n separates the asymptotics of ex(n, F, q) for F being a forest from the value of ex(n, F, q) for all graphs containing a cycle We defer the definition of U q,n to the next section.
Theorem 1.4.For any tree T and integer q ≥ 2, there exists a positive constant c = c T,q such that ex(n, T, q Our next theorem shows that the asymptotics of ex(n, T, 2) (and probably of ex(n, T, q) in general, too) depends on the radius2 of the tree.Let t n,r denote the number of edges of the r-partite Turán graph3 on n vertices, and let t ′ n,r denote the number of edges of the complete r-partite graph on n vertices with one part having size ⌊ n 2r−1 ⌋ with the other part sizes differing by at most one (so their size is (1 + o(1)) 2n 2r−1 ).Theorem 1.5.Suppose T is a tree of radius r. ( ).
Our next result states that the construction U q,n is asymptotically optimal for bipartite graphs with all components containing at most one cycle.
Theorem 1.6.Suppose F is a bipartite graph such that all its components are unicyclic 4 or trees, and F contains at least one cycle.Then For graphs F that contain an odd cycle, we have ex(n, F, q) ≥ q 2 • ex(n, F ) ≥ ( q 2 2 + o(1)) n 2 .If q is odd, then the coefficient is strictly larger than that of the size of U q,n , while if q is even, then the two asymptotics are the same.We show that for the triangle, this trivial lower bound is sharp for q = 2. Theorem 1.7.For n ≥ 2 we have Whenever the forbidden graph F contains a component with more than one cycle, or equivalently with more edges than vertices, then the asymptotics of ex(n, F, q) changes dramatically.This follows from a simple observation.We need the following definition: for any H ⊆ Q(n, 2), we denote by H L the q-graph formed by the q-edges x ∈ H with L does not contain a (q + 1)-copy of G and so ex(n, F, q) ≥ (q 2 − (q − ⌈ q+1 2 ⌉ + 1) 2 ) n 2 .A trivial upper bound using H L is as follows.
Proposition 1.9.For any graph F , if H ⊆ Q(n, 2) does not contain a (q + 1)-copy of F , then Proof.This follows from the simple observation that S H L is F -free.
Proposition 1.9 and Theorem 1.1 yield a general upper bound involving χ(F ).In the next section, we introduce the robust chromatic number χ 1 (F ) of F and obtain lower bounds using this parameter.We will determine the asymptotics of ex(n, F, q) whenever χ 1 (F ) = χ(F ).We will show that in some sense, almost all graphs have this property.
Let K(m, r, p) denote the probability space of all labeled r-partite graphs with each partite set having size m, where any two vertices in different parts are joined with probability p independently of any other pairs.Theorem 1.10.
with probability tending to one as m tends to infinity.
One might wonder whether out of the two expressions involving the robust and the ordinary chromatic number, one always gives the asymptotics of ex(n, F, q).By considering complete 3-partite graphs we show that this is not the case.We determine the asymptotics of ex(n, K r,s,t , 2) and will compare the next theorem to χ 1 (K r,s,t ) and χ(K r,s,t ) in the next section.Note that the case r = s = t = 1 was included in Theorem 1.7.
Notation.In many of the proofs, for a q-graph H ⊆ Q(n, 2), we will consider the graph of pairs (ij) that are supports of some edges of H with prescribed entries.Formally, for − → H a,b be the directed graph of all edges (ij) for which the q-edge x ∈ Q(n, 2) with S x = {i, j} and x i = a, x j = b belongs to H.

Constructions, preliminary results
We start with the construction of the universal tree U q,n , which is very similar to the one showing that extremal problems for oriented graphs are only meaningful if the forbidden subgraph is a directed acyclic graph: if the vertex set is [n] = {1, 2, . . ., n} and we orient every edge (uv) of the complete graph on [n] towards v if u < v, then this oriented complete graph does not contain any directed cycles.Definition 2.1.For n, q ≥ 1 we define the universal q-tree U q,n = U < ∪ 1≤i<j≤n U i,j,= , where Lemma 2.2.The universal q-tree does not contain a (q + 1)-copy of any cycle.
Proof.If C is a (q + 1)-copy of a cycle, then for any x ∈ C, we must have n h=1 x h = q + 1 as for any vertex v of the cycle, the two adjacent q-edges x, y we must have x v + y v ≥ q + 1 so But if C consists only of q-edges x with h x h = q + 1, then if v denotes the smallest vertex in S C , then for both adjacent q-edges x, y ∈ C we should have We continue with the simple lower bound of Proposition 1.8.
Proof of Proposition 1.8.Without loss of generality we can assume that F is connected.For any i and a q-copy F q of F there can be at most one x ∈ F q with x i < q+1 2 .Therefore, the total number of x ∈ F q with at least one non-zero coordinate being less than q+1 2 is at most |V (F )| < |E(F )|, and thus at least one x ∈ F q must have both non-zero coordinates at least q+1 2 .
Proposition 1.8 can be strengthened via the following definition.
Definition 2.3.We say that a mapping f : Proposition 2.4.For any graph F , if a q-graph H contains a (q + 1)-copy of F , then S H L must contain a copy of F f for some 1-selection f of F .
Proof.If H contains a (q + 1)-copy H ′ of F with support V , then for any v ∈ V there can be at most one edge e ∈ E(F ) with v ∈ e such that the q-edge x playing the role of e in H ′ has x v < q+1 2 .(Otherwise the two q-edges would not intersect at v.) So we can define the 1-selection f of F by letting f (v) this edge.Removing the corresponding q-edges leaves a (q + 1)-copy of In particular, if Proof.To see the lower bound consider the q-graph H that we obtain by setting This H cannot contain a (q + 1)-copy of F by Proposition 2.4.The estimate on the size of H follows from Theorem 1.1.Asymptotic equality in the second part of the lemma follows from Proposition 1.9 and Theorem 1.1.Lemma 2.5 establishes the asymptotics of ex(n, F, q) for all non-unicyclic5 graphs F with χ 1 (F ) = χ(F ).Unfortunately, we can only characterize the class of graphs satisfying χ 1 (F ) = χ(F ) = 2.The edge set of the image of any 1-selection forms a graph with all components C having at most V (C) vertices, i.e. all components are unicyclic or trees.On the other hand, for any such graph G, one can define the 1-selection with image exactly E(G): if x 1 , x , . . ., x k is the unique cycle, then f (x i ) := (x i x i+1 ) and for vertices y = x i , one can let f (y) := (yz), where z is the unique neighbor of y one closer to the cycle than y.
We close this section with comparing Theorem 1.11 to the lower bound of Lemma 2.5 and the upper bound of Proposition 1.9 First, we determine χ 1 (K r,s,t ).A detailed introduction of and more results on the robust chromatic number χ 1 (F ) will be given in the forthcoming manuscript [1].Note that χ Proof.We have χ 1 (K r,s,t ) ≥ 2 if and only if t ≥ 2 as in any 1-selection there remains an edge.If r = 2, then let u, v be the vertices in the part of size 2, and let B and C be the parts of size s and t.Then for any 1-selection f with f (b) = {u, b} for all b ∈ B and f (c) = {v, c} for all c ∈ C, the 1-removed (K r,s,t ) f is bipartite showing χ 1 (K r,s,t ) = 2 for r ≤ 2.
For the case r ≥ 3, it is enough to consider G = K 3,3,3 .Suppose to the contrary that χ(G f ) ≤ 2 for some 1-selection f .Then G f contains an independent set of size at least 5.But any set of 5 vertices induces at least 6 edges in K 3,3,3 so f cannot remove all of them.
3. Proofs 3.1.Bipartite graphs with unicyclic components.Lemma 3.1.Let G be a bipartite graph such that all its components are unicyclic or trees.Suppose H ⊆ Q(n, 2) does not contain any (q +1)-copy of graph G. Then for any (a, b) Proof.The proof is based on the following simple claim. 2 ≤ b ≤ a holds.Color the edge (i, j) of H (a,b),(a,b) blue if x, y ∈ H with x i = a, x j = b, y i = a, y j = b and red otherwise, i.e. if x ′ , y ′ ∈ H with x j = a, x i = b, y j = a, y i = b.By definition of R, we obtain that there exist two disjoint sets U, V with |U| = |V | = |V (G)| such that for any u ∈ U and v ∈ V the q-edges x, y with x u = a, y u = a, x v = b, y v = b are present in H.We claim that a (q + 1)-copy of G with support in U ∪ V can be defined.By induction on the number of vertices in G, it is enough to embed one component.Let 2ℓ be the length of the unique cycle in the component (if there exists one).We fix u 1 , u 2 , . . ., u ℓ ∈ U and v 1 , v 2 , . . ., v ℓ ∈ V .The q-edges x j with x j u j = a, x j v j = b and y j with y j v j = b and y j u j+1 = a form a (q + 1)-copy of C 2ℓ , where u ℓ+1 = u 1 .To embed the trees hanging from the cycle (or the one tree if there is no cycle at all), one can proceed greedily according to the distance to the cycle by using q-edges from − → H a,b if the already embedded vertex is in V while using q-edges from − → H a,b if the already embedded vertex is in U.As H should not contain a (q + 1)-copy of G, this contradiction proves the claim.
The statement of the lemma now follows from Claim 3.2 and Theorem 1.12.
Proof of Theorem 1.6.The lower bound is given by the construction U q,n .
For the upper bound, let G be a bipartite graph with all its component containing at most one cycle and suppose H ⊆ Q(n, 2) does not contain any (q + 1)-copies of G. Then we partition the edges of H according to their entries.If q + 1 is even, then Lemma 3.1 implies that H q+1 3.2.Forests.
Lemma 3.3.Let T be a tree of radius r.If H ⊆ Q(n, 2) does not contain any (q + 1)-copy of T , then for any Observe that as long as V \ ∪ i j=1 V j = ∅, then V i+1 cannot be empty.Indeed, otherwise − → T (a directed version of T with all edges oriented towards the center) can be embedded greedily to and thus H would contain a (q + 1)-copy of T .Also, if t is the first index for which V = ∪ t j=1 V j , then t ≤ r.Indeed, if v ∈ V r+1 , then − → T can be embedded greedily into {v} ∪ ∪ r j=1 V j with v playing the role of the center.
We can now bound be the graph obtained by removing these arcs.As shown above, . By our bounds on the number of removed arcs, we have Proof of Theorem 1.4.Fix T and q, and let H ⊆ Q(n, 2) be a q-graph not containing any (q + 1)-copies of T .As S H L cannot contain T , we must have |H L | = O q,T (n).We do not bound H S and assume Q(n, 2) S ⊆ H.In order to prove the theorem, we group the possible weights: (a, b) with (b, a), (a, b), and (b, a).It is enough to show that there exists c = c q,T such that for any a, b with 1 This follows by the statement of Lemma 3.3.
Proof of Theorem 1.5.For the lower bounds, we have the following general constructions.Let A = (A 1 , A 2 , . . ., A r ) be a fixed partition of [n], and for any u Then we define two families of q-edges F A , F ′ A ⊆ Q(n, 2): and A does not contain 3-copies of any tree T of radius r, while F A does not contain 3-copies of any tree T of radius r and diameter 2r, as the longest path in F ′ A is of length 2(r − 1), while the longest path in F A is of length 2r − 1.Indeed, if a path contains a q-edge with two 1-entries, then it can be only continued by paths corresponding to paths in − → H 1,2 , so the length is at most 2(r − 1) + 1.In F ′ A there is no such q-edge with support completely in A r and thus the length of the longest path is indeed 2(r − 1).
To see the upper bounds, observe first that if H ⊆ 2(n, 2) does not contain a 3-copy of T , then the number of q-edges in H with two 2-entries is linear as H 2,2 cannot contain T .Also, by Lemma 3.1, ). Lemma 3.3 yields the upper bound of (1).To obtain the upper bound of (2), assume that the diameter of T is 2r − 1.We use the partition of − → H 1,2 as in Lemma 3.3: V 1 is the set of those vertices that have in-degree at most . Again, as long as [n] \ ∪ i j=1 V j = ∅, the set V i+1 is non-empty, otherwise we would find a 3-copy of T .Also, [n] = ∪ r i=1 V r as otherwise we would find a 3-copy of T in H. Finally, H 1,1 [V r ] has maximum degree less than |T | as otherwise again one would be able to greedily embed T in H using the vertex v ∈ V r with degree at least |T | and its neighbors in H 1,1 [V r ] and directed trees in − → H 1,2 rooted at the neighbors.We obtained that apart from a o(n 2 ) error term | − → H 1,2 | is bounded by the number of edges in a complete r-partite graph G, and |H 1,1 | is bounded by the number of pairs not completely inside the last part V r of G.If one fixes the size of V r , then standard symmetrization shows that maximum is obtained when all other parts have (almost) equal size.So we have r − 1 parts of size αn and one part of size (1 − (r − 1)α)n.Then apart from a sub-quadratic error term, we have It is easy to see that the above expression takes its maximum at α = 2n 2r−1 proving (2).

Odd cycles.
In this subsection, we prove Theorem 1.7.Let us remind the reader that all lower bounds in this subsection follow from ex(n, F, q) ≥ q 2 • ex(n, F ).By Mantel's theorem, we have ex(n, C 3 ) = ⌊ n 2 4 ⌋.To obtain the upper bound, we start with some general lemmas.Lemma 3.4.Suppose a q-graph H ⊂ Q(n, 2) does not contain a (q + 1)-copy of C 3 .Let 1 ≤ a ≤ b ≤ q be integers with a + b = q + 1. (1) ( Proof.Mantel's theorem and the fact that is triangle-free imply (1).To see (2), we proceed by induction on n with the base cases n = 2, 3 being left to the reader.
),(b,a) , then for any u = i, j at most two of (iu), (ui), (ju), (uj) belong to as then the oriented 3-cycle (iu), (uj), (ji) in − → H a,b would correspond to a (q + 1)-copy of a triangle in H.An analogous statement shows that (ui Lemma 3.5.Suppose a q-graph H ⊂ Q(n, 2) does not contain a (q + 1)-copy of a C 3 and Proof.The argument is very similar to the proof of Lemma 3.4 (2).We proceed by induction on n and we leave the base cases n = 2, 3 to the reader.Observe that if H a,a is empty, then ∈ H a,a ) as the q-edges corresponding to these containments together with x would form a (q + 1)-copy of a triangle.Thus, by induction, we obtain Now we are ready to prove Theorem 1.7 on ex(n, C 3 , 2).
Let us make some comments on what makes the problem of determining ex(n, C 3 , q) more difficult for larger values of q.If q = 3, then Lemma 3.4 (1) and ( 2 It is easy to see that the corresponding q-graph does not contain a (q + 1)-copy of We were able to prove that ( 98 + o(1))n 2 is an upper bound, and with this we have 9⌊ 4 ⌋.Things get even worse for q ≥ 4 as then pairs a, b appear with a + b > q + 1 and a < q+1 2 and for these values of a and b, we do not have even the ( 98 +o(1))n 2 upper bound on

3.4.
Graphs having a component with more edges than vertices.We start with the proof of Theorem 1.10.We will need a result from the book [5] of Janson, Luczak, and Ruciński.The setting is as follows: let Γ be a finite set (in our case the edge set of K m,m,...,m ), and we have a set of independent Bernoulli random variables corresponding to the elements γ ∈ Γ.Then for any subset A ⊂ Γ, we write I A to denote the indicator variable of the event that for every γ ∈ A the corresponding Bernoulli random variable takes value 1. (For us A will be the edge set of an r-clique in K m,m,...,m .)For some S ⊆ 2 Γ we define the variable X = A∈S I A .(We will use S as the family of edge sets of all r-cliques in K m,m,...,m .)Theorem 3.6 (Theorem 2.14 in [5]).
Proof of Theorem 1.10.An edge can be contained in at most m r−2 r-cliques in K(m, r, p).
Thus the number of r-cliques that a 1-selection can remove from K(m, r, p) is at most rm r−1 .We apply Theorem 3.6, with X being the number of r-cliques in K(m, r, p).Clearly, we have ) by the assumption p = ω(m −1/( r 2 ) ).We set t = EX 2 .If the edge set of two cliques intersect, then they share at least two vertices.Therefore, we have .
, which is monotone increasing in i. Therefore β i is maximized either at i = 2 or at i = r.Clearly, β r = 2EX and . So as long as EX and m 2 p tend to infinity, so does min{ t 2 rβ 2 , t 2 rβr } which bounds t 2 2∆ from below.As the assumption p = ω(m −1/( r 2 ) ) implies both, applying Theorem 3.6 we obtain that with high probability the number of r-cliques in K(m, r, p) is greater than rm r−1 and thus χ(K(m, r, p) f ) ≥ r for any 1-selection f .Now we turn to Theorem 1.11, the three parts of which will be proved separately.Proposition 2.6 states that if 3 ≤ r ≤ s ≤ t, then χ 1 (K r,s,t ) = χ(K r,s,t ) = 3 holds.In this case, Lemma 2.5 implies the following result which is more general than part (3) of Theorem 1.11.
The next lemma establishes the first half of part (1) of Theorem 1.11 Lemma 3.8.For any 1 ≤ s and 2 ≤ t we have ex(n, K ) n 2 .Proof.We fix s, t, we write f (n) = ex(n, K 1,s,t , 2) and for a fixed ε > 0 we want to show We fix T such that t T ≤ ε/2.Suppose H ⊆ 2(n, 2) does not contain any 3-copies of K 1,s,t and Otherwise, by Theorem 1.12, H 2,2 contains a copy K of K T,T with vertex set U = U 1 ∪ U 2 with the U i s forming the two parts of K. Observe that for any v / ∈ U, we have either ∩ U 2 | < t, as otherwise v and the incident (1, 2)-edges together with K would form a 3-copy of K 1,s,t .Therefore, for any v / ∈ U, the number of edges x in H with x v = 0 and S x ∩ U = ∅ is at most 4(T + t − 1) + 2(T − t + 1).Considering edges of H within U, between U and V (H) \ U, and outside U, yields Applying this repeatedly, we obtain if n is large enough.
The next result is the second part of part (1) of Theorem 1.11.
We apply induction on n.As an anchor, up to any fixed threshold n 0 it can be assumed that ex(n, K 2,s,t , 2) ≤ 3 n 2 + C for a suitably chosen constant C, for all n ≤ n 0 .Let now n > n 0 and let H ⊆ 2(n, 2) be any 2-graph with e(H) Then clearly e(H 2,2 ) ≥ ε 1 n 2 holds, and as above, H 2,2 contains a copy of K T,T with partite classes U 1 and U 2 of size T , where T can be chosen huge, e.g.exponential in both t and 1/ε 1 .
If H 2,2 has at most ε 2 n edges from U := U 1 ∪ U 2 to its complement, then induction proves that H contains a 3-copy of K , and this bound is asymptotically sharp.
Proof.We start with an observation that applies Zykov's symmetrization in this setting.Claim 3.13.If W satisfies (⋆), then, for any pair u, v of vertices, so does W u→v defined as W u→v (uv) = 0, W u→v (ux) = W (vx) for all x = u, v and W u→v (e) = W (e) for all other edges e ∈ E(K k ).
Furthermore, if uv is an i-edge and d Proof of Claim.Clearly, W u→v satisfies Condition (⋆) on V (K k ) \ {u} as does W .For x, y = v we cannot have W u→v (ux) = W u→v (uy) = W u→v (xy) = 3 as then we would have W (vx) = W (vy) = W (xy) = 3 contradicting the triangle-free property of 3-edges of W .A similar argument works for C 4 s in 3-edges in W u→v containing u but not v.Finally, W u→v (uv) = 0 settles the cases of possible triangles and C 4 containing both u and v.
The second part of the claim follows as w(W u→v ) − w(W Suppose w = W k satisfies (⋆).Let v be a vertex with maximum degree.By repeatedly applying Claim 3.13 with W x→v for all x with W (vx) = 0, we obtain W 1 and U 1 ∋ v such that w(W 1 ) ≥ w(W ) and for any u, u ′ ∈ U 1 and x / ∈ U 1 we have W 1 (ux) = W 1 (u ′ x) ≥ 2. Then we repeat this process for a vertex v 2 of maximum degree d W 1 (v 2 ) among vertices not in U 1 .After a finite number of such rounds we obtain W ℓ and U 1 , U 2 , . . ., U ℓ such that w(W ℓ ) ≥ w(W ) and for any x, y, ∈ U i , u, v ∈ U j (i = 1, 2, . . ., ℓ, j = 1, 2, . . ., ℓ, i = j) we have Finally, as long as there exists an i-edge uv for i = 2, 3 with d(v) − d(u) > i, we again apply Claim 3.13.Every such symmetrization moves vertex u ∈ U j to the class U j ′ of v and strictly increases the weight.Since the weight cannot be larger than 3 • The triangle-free part of (⋆) implies that all edges between U i and U j (1 ≤ i < j ≤ m) are 2-edges.• The C 4 part of (⋆) implies that if z is connected by 3-edges to both u i ∈ U * i and • As all degrees are at least 9  4 k, we must have

Because of the pairwise disjoint property, we can add up all lower bounds on sizes and obtain
The right-hand side is at least k (which is a contradiction) unless m = 0 or This is impossible as U * ℓ * and ∪ m i=1 U * i are disjoint.These contradictions finish the proof of the lemma.Definition 3.14.In a graph G, for disjoint subsets X, Y of V (G) we write d(X, Y ) to denote the number of edges e in E(G) Theorem 3.15 (Szemerédi's Regularity Lemma [9]).For any positive integer m and positive real ε there exists an integer M such that any graph G on at least M vertices can be partitioned into and all but εk 2 pairs V i , V j are ε-regular.Definition 3.16.For any graph G and integer t ≥ 2, we denote by G(t) its t-blow-up obtained by replacing each vertex v of G by a t-element independent set I v and vertices v ′ ∈ I v , u ′ ∈ I u are adjacent in G(t) if and only if u and v are adjacent in G. Lemma 3.17 (Key Lemma [6]).Given d > ε > 0, a graph R, and a positive integer m, let the graph G be constructed by replacing every vertex of R by m vertices, and every edge of R by an ε-regular pair of density at least d.Let H be a subgraph of R(t) with maximum degree Proof of Theorem 3.10.We start with the construction H ⊂ 2(n, 2) that shows ex(n, K 2,s,t , 2) ≥ .Observe that H does not contain a 3-copy of K 2.3,3 .Indeed, if X is an 8-set of the union of the supports, then |X ∩ A| ≤ 3 as X ∩ A can contain the support of at most one edge.Therefore X ∩ B must contain at least 5 vertices and thus should contain a 3-copy of K 2,3 , which is impossible by Lemma 1.8.
• The number of edges incident to V 0 is at most ε 2 n 2 both in H 2,2 and H 2,1 .
• By choice of m, the total number of edges within the V i s is at most dn 2 /100 in H 2,1 and H 2,2 .• The total number of edges between non-regular pairs in H 2,2 and H 2,1 is at most ε 2 n 2 .
• The total number of edges of H 2,2 within ε 2 -regular pairs with density at most d/10 is at most d 10 n 2 .
The case n = 4 follows from the n = 3 case by averaging.The support of every q-edge belongs to two triples of the indices, and there are four such triples.Therefore, we obtain 2 ex(4, K 3 , q) ≤ 4 ex(3, K 3 , q) = 4 • 2q 2 .
One potential reason for the problem not being easy is that for even values of q, we have found several non-isomorphic q-graphs, not containing (q + 1)-copies of K 3 , with the same asymptotic size.
• The first construction is U q,n , the universal tree as defined in Definition 2.1.
• The second construction is the K 3 -free ordinary graph with all possible q-edges.It means that (if we suppose that n and q are both even numbers) this q-graph has n 2 4 q 2 q-edges.
• Let n = 2k.Consider two disjoint sets X and Y of size k.In the third construction we put all q-edges (a, b) with 1 ≤ a, b ≤ q 2 into X and Y and put all q-edges (c, d) with 1 ≤ c ≤ q 2 or 1 ≤ d ≤ q 2 between X and Y .It is easy to check that this construction also contains n 2 4 q 2 − O(n) q-edges.• For q = 4 we have a fourth type of construction.Let n = 3k and X, Y, Z be three disjoint sets of size k.We put the following q-edges between the sets: inside X and Y we put the q-edges (3, 1), ( inside Z we put the q-edges (2, 2), (2, 1), (1, 2), (1,1); -between the sets X and Y we put all edges (a, b) with 1 ≤ a, b ≤ 3; -between the sets X ∪ Y and Z we put the following edges: (1, i) where 1 ≤ i ≤ 4, and (i, j) where i = 2, 3, 4 and j = 1, 2. It is easy to see that this construction also fulfils the requirements and the number of edges is Lemma 2.5 determines the order of magnitude of ex(n, F, q) whenever χ 1 (F ) = χ(F ), and gives lower and upper bounds if χ 1 (F ) < χ(F ).Theorem 1.11 shows examples when neither of these bounds are sharp.It would be interesting to find sufficient conditions on F so that the lower or the upper bound holds tight.

Claim 3 . 2 .
H (a,b),(a,b) does not contain K R,R , where R = R(|V (G)|, |V (G)|) is the bipartite Ramsey number, the minimum value of c such that in any 2-edge-coloring of K c,c there exists a monochromatic copy of K |V (G)|,|V (G)| .Proof of claim.Suppose H (a,b),(a,b) contains a copy of K R,R .If a, b ≥ q+1 2 or a, b ≥ q+1 2 , then as G ⊂ K |V (G)|,|V (G)| , H contains a (q + 1)-copy of G.So we may and will assume that a ≤ b ≤ q+1

2 , q+1 2 has
o(n 2 ) edges.By Lemma 3.1, we have |H (a,b),(a,b) | = o(n 2 ), and so ,b by removing directed cycles of length 2, i.e. removing both orientations of the edges of H (a,b),(b,a) .As b = a, a = b, we have H (a,b),(b,a) = H (a,b),(a,b , and thus the number of removed arcs is o(n 2 ).Construct the vertex sets V 1 , V 2 , . . ., V t as follows: V 1 is the set of vertices that have in-degree less than |T | in − → H ′ a,b , and inductively V i+1 is the set of vertices that have in-degree less than |T | in

13 4 n 2 .
Let A = [⌊ n 4 ⌋] and B = [n]\A.For an edge e ∈ A 2 , we set W H (e) = {(1, 1)}, for an edge e ∈ B 2 we set W H (e) = {(1, 1), (2, 1), (1, 2)}, and finally for edges e with |e ∩ A| = |e ∩ B| = 1 we set W H (e) = [2] × [2] Proof of Theorem 1.7.Suppose H ⊆ 2(n, 2) does not contain a 3-copy of a triangle.By applying Lemma 3.4 (2) to bound | − → H 1,2 | and Lemma 3.5 to bound |H 1,1 | + |H 2,2 |, we obtain but one cannot derive any non-trivial bound on | q+1 2 ≤ a < b.Namely, if A ⊂ [n] with |A| = 3n/4 and B = [n] \ A, then one can set 2,2,t .Otherwise consider the set Y of vertices y / ∈ U that have at least ε 3 |U| neighbors in U within H 2,2 .We may assume that at least half of Y have at least ε 3 |U 1 | (2, 2)-neighbors in U 1 .Then there exist a U ′ ⊂ U of size t and a Y ′ ⊂ Y of size ε 4 n completely joined in H 2,2 .If ε 5 n of those vertices of Y ′ have more than one (2, 2)-neighbor in U 2 , then some vertex pair of U 2 has many common neighbors in Y ′ , hence H contains a 3-copy of K 2,2,t .(In fact, even a K 2,t,t occurs.)Else there is a subset Y ′′ ⊂ Y ′ of ε 5 n vertices having at most one (2, 2)-neighbor in U 2 .Consider now the bipartite graph B = H (1,2),(2,1) [Y ′′ , U 2 ].By the choice of Y , each y ∈ Y ′′ has degree at least 2ε 3 |U 2 | in B, because there cannot be more than 4|U 1 | edges from y to U 1 in H. Thus B contains a C 4 = y ′ u ′ y ′′ u ′′ , and consequently a 3-copy of K 2,2,t with vertex classes {y ′ , y ′′ }, {u ′ , u ′′ } and U ′ occurs in H. Let us state the second part of Theorem 1.11 separately.Definition 3.11.We say that e is an i-edge of W k : E(K k ) → {0, 2, 3} if W k (e) = i.A W k satisfies Condition (⋆) if (i) the graph of 3-edges is triangle-free and (ii) if uv, vx, xy, yu 3-edges form a C 4 , then at least one of ux and vy is a 0-edge.The total weight w n 2 , we obtain W * and partition U * 1 , U * 2 , . . ., U * ℓ * of V (K n ) such that all above properties hold, and also |d W * (u) − d W * (v)| ≤ 3 for any pair u, v of vertices.This implies that either w(W ) ≤ w(W * ) ≤ ( 9 4 + o(1)) k 2 or d W * (v) > 9 4 k holds for all v. Without loss of generality, we may assume that U * ℓ * is of largest size, which we denote by x, among all classes, and that U * 1 , U * 2 , . . ., U * m are those other classes that are connected by 3-edges to U * ℓ * and other classes are connected by 2-edges.Let y 1 , y 2 , . . ., y m denote the sizes