Weak and strong versions of the 1-2-3 conjecture for uniform hypergraphs

Given an $r$-uniform hypergraph $H=(V,E)$ and a weight function $\omega:E\to\{1,\dots,w\}$, a coloring of vertices of $H$, induced by $\omega$, is defined by $c(v) = \sum_{e\ni v} w(e)$ for all $v\in V$. If there exists such a coloring that is strong (that means in each edge no color appears more than once), then we say that $H$ is strongly $w$-weighted. Similarly, if the coloring is weak (that means there is no monochromatic edge), then we say that $H$ is weakly $w$-weighted. In this paper, we show that almost all 3 or 4-uniform hypergraphs are strongly 2-weighted (but not 1-weighted) and almost all $5$-uniform hypergraphs are either 1 or 2 strongly weighted (with a nontrivial distribution). Furthermore, for $r\ge 6$ we show that almost all $r$-uniform hypergraphs are strongly 1-weighted. We complement these results by showing that almost all 3-uniform hypergraphs are weakly 2-weighted but not 1-weighted and for $r\ge 4$ almost all $r$-uniform hypergraphs are weakly 1-weighted. These results extend a previous work of Addario-Berry, Dalal and Reed for graphs. We also prove general lower bounds and show that there are $r$-uniform hypergraphs which are not strongly $(r^2-r)$-weighted and not weakly 2-weighted. Finally, we show that determining whether a particular uniform hypergraph is strongly 2-weighted is NP-complete.


Introduction
Let H = (V, E) be a hypergraph on the vertex set V and with the set of (hyper)edges E ⊆ 2 V . In this paper we consider r-uniform hypergraphs, meaning that each edge has size r. Let ω : E → {1, . . . , w} be a weight function. Furthermore, let c : V → N be a vertex-coloring induced by ω defined as c(v) = v e ω(e) for each v ∈ V . The vertex-coloring is weak if there is no monochromatic edge and strong if each edge is rainbow, i.e., for each {v 1 , . . . , v r } ∈ E we have c(v i ) = c(v j ) for every 1 ≤ i < j ≤ r. We say that H is weakly w-weighted if there exists ω : E → {1, . . . , w} such that the vertex-coloring c induced by ω is weak. Similarly, we say that H is strongly w-weighted if the corresponding coloring is strong. Clearly each strongly w-weighted hypergraph is also weakly w-weighted. Note that for graphs (r = 2) weak and strong colorings (and therefore weightings) are the same.
The well-known 1-2-3 Conjecture of Karoński, Luczak and Thomason [13] asserts that every graph without isolated edges is 3-weighted. This conjecture attracted a The second author was supported in part by Simons Foundation Grant #244712 and by the National Security Agency under Grant Number H98230-15-1-0172. The United States Government is authorized to reproduce and distribute reprints notwithstanding any copyright notation hereon. The third author was supported in part by NSF grant DMS1362785. lot of attention and has been studied by several researchers (see, e.g., a survey paper of Seamone [14]). The 1-2-3 conjecture is still open but it is known due to a result of Kalkowski,Karoński,and Pfender [11] that every graph without isolated edges is 5-weighted. (For previous results see [1,2,15]).
In this paper we study an analogue of this conjecture for hypergraphs. This stream of research was initiated by Kalkowski, Karoński, and Pfender [12] who studied weakly weighted hypergraphs. In particular, they proved that any r-uniform hypergraph without isolated edges is weakly (5r − 5)-weighted and that 3-uniform hypergraphs are even weakly 5-weighted. The authors also asked whether there is an absolute constant w 0 such that every r-uniform hypergraph is weakly w 0 -weighted. Furthermore, they conjectured that each 3-uniform hypergraph without isolated edges is weakly 3-weighted. We show that for almost all uniform hypergraphs these conjectures hold.
In this paper we are interested in both strongly and weakly weighted hypergraphs. We say that a hypergraph is nice if there is no pair of vertices u and v such that the set of edges containing u is the same as the set of edges containing v. Note that only nice hypergraphs can be strongly weighted.
First we provide a lower bound on w assuming that r-uniform hypergraph is strongly (or weakly) w-weighted. Theorem 1.1.
(i) Let r ≥ 3 be such that r − 1 is prime power. Then, there exists a nice r-uniform hypergraph that is not strongly (r 2 − r)-weighted. Furthermore, for all large r, there exists a nice r-uniform hypergraph that is not strongly (r 2 −o(r 2 ))-weighted. (ii) Let r ≥ 3. Then, there exists an r-uniform hypergraph that is not weakly 2-weighted.
We say that almost all r-uniform hypergraphs on n vertices have property P if as n tends to infinity, o 2 ( n r ) r-uniform hypergraphs on n vertices do not have property P. It is easy to see that almost all uniform hypergraphs are nice. Furthermore, we prove the following statement. (i) Almost all 3 or 4-uniform hypergraphs are strongly 2-weighted (but not 1-weighted). (ii) The probability that a hypergraph chosen uniformly at random from the space of all 5-uniform hypergraphs of order n is strongly 1-weighted is e − √ 6/π + o(1) and that it is strongly 2-weighted (but not 1-weighted) is 1 − e − √ 6/π + o(1). (iii) Let r ≥ 6.Then, almost all r-uniform hypergraphs are strongly 1-weighted.
Part (iii) is much easier, since a hypergraph is strongly 1-weighted if and only if there is no edge containing a pair of vertices of the same degree. Thus, the interesting parts are (i) and (ii). In particular, the latter which gives a nontrivial distribution between 1 or 2-weightedness. Theorem 1.2 can be viewed as an extension of a result of Addario-Berry, Dalal and Reed [2] who showed that almost all graphs are 2-weighted. (Our proofs are different.) We complement the above result with an analogous statement for weakly weightedness.
This theorem mainly follows from Theorem 1.2 since strong weightedness implies weak weightedness.
We also show that determining whether a particular uniform hypergraph is strongly 2weighted is NP-complete. Consequently, there is no simple characterization of strongly 2-weighted hypergraphs, unless P=NP. (Note that determining 1-weightedness in an runiform hypergraph can be done in polynomial time, since a hypergraph is 1-weighted if and only if all vertex degrees are distinct.) Formally, let 2-WEIGHTED (r) = {H : H is a strongly 2-weighted r-uniform hypergraph} .
Although we were unable to provide a general upper bound for strongly weighted hypergraphs we believe that the following holds. Conjecture 1.5. For every r ≥ 3 there is a constant w = w(r) such that each nice r-uniform hypergraph is strongly w-weighted.
If true, then by Theorem 1.1 such constant w is at least r 2 − r + 1 for infinitely many r, and at least r 2 − o(r 2 ) for all r. For weakly weighted hypergraphs we believe that the 1-2-3 conjecture for graphs also holds for hypergraphs. Conjecture 1.6. For each r ≥ 3 every r-uniform hypergraph without isolated edges is weakly 3-weighted.

Lower bound
Here we prove Theorem 1.1. We start with part (i). First we recall some basic properties of projective planes (see, e.g., [8]). A projective plane P (q) of order q is an incidence structure on a set P of points and a set L of lines such that: any two points lie in a unique line, and every line contains q + 1 points, and every point lies on q + 1 lines. It is known that for every prime power q such incidence structure P (q) exists with |P | = |L| = q 2 + q + 1. In other words, P (q) is a (q + 1)-regular (q + 1)-uniform hypergraph of order q 2 + q + 1.
Set r = q + 1. Clearly, q 2 + q = r 2 − r. So for each r − 1 prime power there exists an r-uniform hypergraph which is not strongly (r 2 − r)-weighted.
The remaining part of (i) is very similar. It is well-known that for large x there exists a prime number between x(1 − o(1)) and x (see, e.g., [4]). Hence, for large r there is a prime number q such that (r − 1)(1 − o(1)) ≤ q ≤ r − 1. First, as above we start with P (q) and construct a 2-regular (q + 1)-uniform hypergraph H = (V, E) by blowing up each vertex of P (q). If q = r − 1, then we are done. Otherwise, if q < r − 1, then we extend H to an r-uniform hypergraph I = (W, F ). Let W = V ∪ U , where |U | = r + 1.
3. Tools used in the proof of Theorems 1.2 and 1.3 In order to prove Theorems 1.2 and 1.3 we will consider random hypergraphs. Let H (k) (n, p) be an r-uniform random hypergraph such that each of [n] r r-tuples is contained with probability p, independently of others. We say that an event E n occurs with high probability, or w.h.p. for brevity, if lim n→∞ Pr(E n ) = 1. We will use some standard probabilistic tools, which we state here for convenience (for more details see, e.g., [3,10]).

Method of Moments.
Let λ be a positive constant. Suppose that X 1 , X 2 , . . . are random variables such that for each fixed k we have E((X n ) k ) → λ k as n tends to infinity. Then, X n ∼ Po(λ).

Inequalities.
(i) Markov's bound: Let X be a nonnegative integral random variable and γ > 0. Then Chernoff's bound: Let Bin(n, p) denote the random variable with binomial distribution with number of trials n and probability of success p. If X ∼ Bin(n, p) and 0 < γ ≤ E(X), then (iii) Bernstein's bound: Let X 1 , . . . , X m be independent random variables, and X = m i=1 X i . Suppose that |X i − E(X i )| ≤ C always holds for all i, and γ > 0. Then, Several times we will also need to estimate binomial coefficients (for more details see, e.g., Chapter 22 in [9]).

Binomial Coefficients Approximation.
(A1) Let p > 0 and be functions of m ( can be negative). Assume that 2 = o(p) and 2 = o(m − p) as m tends to infinity. Then, Throughout the next sections all logarithms are natural (base e) and all asymptotics are taken in n.
We prove Theorem 1.2 in Sections 4-7 starting with the easiest case r ≥ 6 and Theorem 1.
Thus, by (A3) (1) which is o(1) for any r ≥ 6. Thus, the first moment method yields the statement. 5. Almost all 5-uniform hypergraphs are either 1 or 2 strongly weighted 2 ) ∼ 6/π. Set λ = 6/π. We will show by using the method of moments that X ∼ Po(λ). First we prove two auxiliary results which we will also use in the next sections. Proof. The probability that a fixed pair of vertices u and v is not contained in any edge is 2 −( n−2 r−2 ) = 2 −Ω(n r−2 ) . Thus, by the union bound we get that the probability that there exists a pair of vertices which is not contained in any edge is at most n 2 2 −Ω(n r−2 ) = o(1). Let and the expected value is 1≤s≤r Conditioning on x S = β S for 2 ≤ |S| ≤ r and S ⊆ U , we get that the probability that Due to (4) we may assume that β S = n−k r−|S| /2+ S and |a− 1≤s<(r+1)/2 This implies that and further the probability that deg(v i,1 ) = · · · = deg(v i,k i ) for each 1 ≤ i ≤ α (still conditioning on β S 's) asymptotically equals and finally by the law of total probability, where β * S denotes the summation over all possible values of β S for each 2 ≤ |S| ≤ r satisfying |β S − n−k r−|S| /2| = O(n (r−|S|)/2 √ log n). This completes the proof of (2), since Now we use Lemma 5.2 to show that E((X 2 ) k ) → λ k as n tends to infinity. Observe that (X 2 ) k consists of n 2 n−2 2 · · · n−2k+2 2 terms of k vertex-disjoint pairs and O(n 2k−1 ) remaining terms. The pairs in the remaining terms are not vertex disjoint. Let U be the union over all vertices in such k pairs. Clearly, k ≤ |U | ≤ 2k −1, where the lower bound, k, corresponds to a k-cycle. Vertices in U can be divided into α groups (each of size k i ≥ 2) in such a way that in each group all vertices have the same degrees. Observe that k 1 + · · · + k α = |U | and since |U | < 2k, 1 ≤ α < |U |/2. Due to (3) the probability of occurrence of this degree sequence is at most O(n −2(|U |−α) ) = o n −|U | . Thus, O(n |U | · n −2(|U |−α) ) = o(1) and 2 ) Hence, the method of moments implies that X 2 ∼ Po(λ) and consequently Pr(H (5) (n, 1/2) is strongly 1-weighted) = Pr(X It remains to show that w.h.p. the random hypergraph H (5) (n, 1/2) is strongly 2weighted. Let X which is o(1) for r = 5. So far we have established the following properties of H (5) (n, 1/2). By the Markov bound, Pr(X (5) 2 ≥ log n) = o(1) and by (6) and the first moment method w.h.p. no three vertices have the same degree.
Once the edges of H (5) (n, 1/2) are revealed we may assume that we have s vertex- We show that there is a matching saturating all u i 's such that each matching edge contains one vertex from S and 4 vertices from [n] \ S. One can find such matching greedily. Assume that we already chose matching edges e 1 , . . . , e k with u i ∈ e i . The number of edges incident to u k+1 that are not disjoint with e 1 , . . . , e k or S \ {u k+1 } is at most O(n 3 log n) but deg(u i ) = Ω(n 4 ). Hence, we can extend the matching by a new edge containing u k+1 .
Finally, we are ready to define a 2-weighting. First we assign to each edge weight 2. Now the colors of all vertices are even and every vertex has a different color except the u i and v i . Next we replace the weights of matching edges by 1 so now all vertices have different colors. 6. Almost all 4-uniform hypergraphs are strongly 2-weighted (but not 1-weighted) First we show using the second moment method that w.h.p. H (4) (n, 1/2) is not strongly 1-weighted. By (1), E(X 2 ) = Θ( √ n) and clearly it goes to infinity together with n. Now we compute the variance. Let X By Lemma 5.2 (applied with r = 4, k = k 1 = 3, and α = 1), Again by Lemma 5.2 (applied with r = 4, k = 4, k 1 = k 2 = 2 and α = 2) Thus, where the last asymptotic equality follows from (A3). Consequently, E((X 2 ) 2 and hence Var(X 2 ) 2 ). Thus, the second moment method together with Lemma 5.1 implies that w.h.p. there is a pair of vertices of the same degrees which is contained in a edge (so the hypergraph is not strongly 1-weighted). Now we show that w.h.p. H (4) (n, 1/2) is strongly 2-weighted. We already observed that E(X Hence, by the union bound (taken over all n 4 quadruples) we get that w.h.p. there are no such four vertices. Similarly, (with essentially the same proof as Lemma 5.2) we get that w.h.p. there are no four vertices v 1 , v 2 , v 3 and v 4 in H (4) (n, 1/2) such that Once the edges of H (4) (n, 1/2) are revealed we may assume that there are a vertexdisjoint pairs {u i , v i } and b triples {x j , y j , z j } such that deg(u i ) = deg(v i ), deg(x j ) = deg(y j ) = deg(z j ), and 1 ≤ i ≤ a ≤ √ n log n and 1 ≤ j ≤ b ≤ log n. (All other vertices have different degrees.) Let S 1 = i {u i , v i } and S 2 = j {x j , y j , z j } and T = [n] \ (S 1 ∪ S 2 ). We show that there are edges e i , f j , f j , and g j such that u i ∈ e i , {x j } = f j ∩ f j , y j ∈ g j and e i , f j , f j , and g j contain no other vertices from S 1 ∪ S 2 and e i ∩T , f j ∩T , f j ∩T , and g j ∩T are pairwise vertex-disjoint. Similarly as in the previous section one can find such edges greedily. First assume that we already found e 1 , . . . , e k edges so that u i ∈ e i . The number of edges incident to u k+1 that are not disjoint with e 1 , . . . , e k or S 1 ∪ S 2 \ {u k+1 } is at most O(n 2 √ n log n) but deg(u i ) = Ω(n 3 ). Hence, we can extend e 1 , . . . , e k by a new edge e k+1 that contains u k+1 . Similarly we find edges f j , f j , and g j . Now we define a 2-weighting. First we assign to each edge weight 2. Now the colors of all vertices are even and only vertices {u i , v i } ⊆ S 1 and {x j , y j , z j } ⊆ S 2 have the same color. Furthermore, there is no vertex w such that for some j we have deg(x j ) = deg(y j ) = deg(z j ) = deg(w) − 1 or deg(x j ) = deg(y j ) = deg(z j ) = deg(w). Next we replace the weights of all e i , f j , f j , and g j edges by 1 yielding all vertices to have different colors.
7. Almost all 3-uniform hypergraphs are strongly 2-weighted (but not 1-weighted) As in Section 6 the second moment method and Lemma 5.1 imply that w.h.p. there is a pair of vertices of the same degrees which is contained in a edge. Thus, w.h.p. H (3) (n, 1/2) is not strongly 1-weighted. As a matter of fact we will see later that w.h.p. H (3) (n, 1/2) is not even weakly 1-weighted. Now we show that w.h.p. H (3) (n, 1/2) is strongly 2-weighted. Here our proof method differs from our other proofs that hypergraphs are 2-weighted. Since the expected number of pairs of vertices with the same degree is linear, we cannot simply give all edges weight 2 and then alter the weighting by flipping the weights of a few edges. We use a more complicated argument which we will outline after some lemmas.
First we need some auxiliary results. For G = (V, E) and S ⊆ V , let N (S) denote the neighborhood of S, i.e., the set of all vertices in V adjacent to some element of S. This lemma is a weaker version of a more general result of Frieze and Krivelevich [7] (where the authors obtained an optimal constant γ = 1/2 − o(1)). For the sake of completeness we show here a simple proof.
First observe that since for any u, v ∈ A and u, v ∈ B we have |N (v)| ∼ Bin(n, 1/2) and |N ({u, v})| ∼ Bin(n, 3/4), the Chernoff bound yields that with probability 1 − o(1/n) for any u, v ∈ A and u, v ∈ B, Assume that we already found a collection M i = {M 1 , . . . , M i } of perfect matchings in G. We show that G i+1 = G \ M i also contains a perfect matching M i+1 . It suffices to show that if i < γn, then the Hall condition holds, i.e., if S ⊆ A and |S| ≤ n/2, then |N G i+1 (S)| ≥ |S|, and if T ⊆ B and |T | ≤ n/2, then |N G i+1 (T )| ≥ |T |.
Therefore, we may assume that 2 ≤ |S| ≤ n/2. Let {u, v} ⊆ S. Then, Proof. Consider first a complete bipartite graph F on V 1 ∪ V 2 . Then, since F is nregular bipartite graph, it can be decomposed into n edge disjoint perfect matchings, say F = M 1 ∪ · · · ∪ M n . Let H i be a 3-partite 3-uniform hypergraph on V 1 ∪ V 2 ∪ V 3 and the set of edges We generate a random 3-partite 3-uniform hypergraph by revealing edges in each H i . It suffices to show that the random hypergraph induced by H i contains with probability 1 − o(1/n) at least γn edge disjoint perfect matchings, where γ is a constant from Lemma 7.1. The latter is obviously true since the random graph induced by H i can be viewed as G = G(n, n, 1/2) on M ∪ V 3 (since |M | = |V 3 | = n) and any perfect matching in G yields a perfect matching in the 3-partite hypergraph.
Proof. We start with an outline. First we consider an equipartition V 1 ∪ V 2 ∪ V 3 of the vertex set V = [n]. Then we reveal the random hypergraph H (3) (n, 1/2). Due to Lemma 7.2 (assuming that n is divisible by 3) there is w.h.p. a family M of disjoint perfect matchings such that M = γn 2 and each edge in each matching has one vertex in each part of the partition. We then randomly label the vertices in V 1 with real number labels in [0, 1/9], the vertices in V 2 with labels in [1/9, 2/9], and the vertices in V 3 with labels in [2/9, 1/3]. Let (v) denote the label of vertex v. We then randomly weight the edges, where any non-matching edge {u, v, w} ∈ [n] 3 gets weight 2 with probability (u) + (v) + (w), and any matching edge gets weight 2 with probability 1 2 . We will show that E(|{c : 0 ≤ c ≤ n 2 , ∃ x, y such that |c(x) − c| ≤ 2 and |c(y) − c| ≤ 2}|) We will call pairs {x, y} such that |c(x) − c| ≤ 2 and |c(y) − c| ≤ 2 for some c dangerous and pairs such that c(x) = c(y) bad. We will also show that E(|{c : 0 ≤ c ≤ n 2 , ∃ x, y, z such that |c(x) − c| ≤ 2, |c(y) − c| ≤ 2, |c(z) − c| ≤ 2}|) is o(1). Finally, we will alter the weights on certain edges so that we kill all bad pairs (i.e. after changing the weights no two vertices will have the same color) which will complete the proof.
In this paragraph and the next we are revealing only the random hypergraph H = H (3) (n, 1/2), and all probabilities are with respect to this distribution. The degrees of vertices are concentrated by the Chernoff bound. More specifically, for any vertex v, and any distinct parts V i and V j there are m = n 2 /9+O(n) triples containing v together with one additional vertex from V i and one from V j (the O(n) term is to account for the possibility that v is in one of V i or V j ). Each of these triples has probability 1/2 of being an edge of H, independently, and so if we let d i,j (v) denote the number of these edges present in H, the Chernoff bound tells us that and so the union bound gives us that the probability there exists v, i, j such that |d i,j (v) − m/2| > n log n is at most 3n · exp −Ω(log 2 n) = o(1). Hence, w.h.p. for every vertex v and distinct parts V i , V j there are n 2 /18 + O(n log n) edges containing v and additionally one vertex from each of V i , V j . Similarly (using the Chernoff and union bounds), w.h.p. for any vertex v and part V i there are n 2 /36 + O(n log n) edges containing v and additionally two vertices from V i . Until the last paragraph of this proof will assume that n is divisible by 3. Due to Lemma 7.2 there is w.h.p. a family M of disjoint perfect matchings where |M| = γn 2 and each edge in each matching goes between the partition (i.e. has one vertex in each V i ).
Henceforth we assume that all the edges of H were revealed obtaining a hypergraph H that has the degree properties mentioned in the previous paragraphs, and the family of matchings M.
Next we reveal the vertex labels and the non-matching edge weights. The weight of edge {x, y, z} is distributed as (1 + (x) + E( (v)) + E( (w))) where on the last line we have used our estimate of deg H\M (x). Note that the Θ(n 2 ) term may depend on i (recall x ∈ V i ) but does not otherwise depend on x or (x) (by the fact that the degree of each vertex v into sets V i , V j etc. is concentrated). Now since c H\M (x) = {x,v,w}∈E(H)\M w(x, v, w), and the random variables w(x, v, w) are independent (given the vertex labels), we can apply Bernstein's inequality. For our application we use m = deg H\M (x). We can easily use C = 2, and put Var(w(x, v, w)) ≤ E(w(x, v, w) 2 ) ≤ 4. We will set γ = n log n. Then we get 3 · 2n log n = exp −Ω log 2 n and so by the union bound, w.h.p. for each vertex x, c H\M (x) is within n log n of its expectation. Now for any fixed integer a and fixed vertex x, P r (x) 1 4 − γ n 2 − a ≤ n log n = O(log n/n), since this is the probability that (x) falls within an interval of length O(log n/n). Since the vertex labels are independent, the probability that there are log 2 n many vertices x with (x) 1 4 − γ n 2 − a ≤ n log n is at most n log 2 n · (O(log n/n)) log 2 n ≤ ne log 2 n Therefore, by the union bound over integers c from 0 to n 2 , we have that for all such c the number of vertices x with |c H\M (x) − c| ≤ n log n is at most log 2 n. Henceforth we assume that the labels and non-matching edge weights have been revealed and they satisfy this property. Now we reveal the matching edge weights. These are 1 or 2 with probability 1/2. We will denote by c M (x) the sum of the weights of matching edges adjacent to x; note that c(x) = c M (x)+c H\M (x). The key fact we will use here is that since |M| = γn 2 , c M (x) is not likely to be any one particular value. Indeed, since c M (x)−|M| ∼ Bin(|M|, 1/2), the mode of c M (x) occurs with probability where the latter follows from (A3). Also, w.h.p. for all x we have |c M (x) − 3 2 γn 2 | ≤ n log n. Therefore, where on the last line we get the (1/n) 2 in the big-O term since the probability that c(x) = c is O(1/n), and conditioning on that event, the event that c(y) = c still has probability O(1/n) (since revealing c(x) only reveals the weights of O(n) of the γn 2 matching edges containing y, c(y) still essentially has the same distribution as it did before conditioning) and similarly for the conditional probability that c(z) = c. Similarly, E(|{c : 0 ≤ c ≤ n 2 , ∃ x, y, z such that |c(x) − c| ≤ 2, |c(y) − c| ≤ 2, |c(z) − c| ≤ 2} ≤ O n 2 · (log 2 n) 3 · (1/n) 3 = o(1).
Thus, by the Markov bound w.h.p. there are at most log 5 n dangerous pairs, and there is no triple x, y, z such that |c(x) − c| ≤ 2, |c(y) − c| ≤ 2, and |c(z) − c| ≤ 2 for any c. Suppose there are b ≤ log 5 n bad pairs and let {{u i , v i } : 1 ≤ i ≤ b} be the set of bad pairs. For each i we will choose an edge e i such that u i ∈ e i and e i does not intersect any other dangerous pair and all edges e i are vertex-disjoint. As in the previous sections this is easy since each vertex has degree Θ(n 2 ), the number of edges containing any two vertices is O(n), and there are at most log 5 n dangerous pairs. Now for each bad pair {u i , v i } we flip the weight of e i (from 1 to 2 or from 2 to 1). Thus u i no longer has the same color as v i . Also note that now no two vertices in the entire hypergraph can have the same color, since the new color of any vertex can only differ from its old color by at most 1, the only vertices in dangerous pairs whose colors are changed are the vertices that are in bad pairs (and they are only changed to make them not bad anymore), and there is no triple x, y, z such that |c(x) − c| ≤ 2, |c(y) − c| ≤ 2, and |c(z) − c| ≤ 2 for any c. This completes the proof assuming that 3 divides n.
If n is not divisible by 3, then we can still use an equipartition V 1 , V 2 , V 3 , and a family of (not quite perfect) matchings M where |M| = γn 2 , each M ∈ M has size n/3 , and each vertex is covered by γn 2 − O(n) matchings in M. It is relatively straightforward to check that with this small change, the same proof still works.
9. Almost all 3-uniform hypergraphs are weakly 2-weighted (but not 1-weighted) By Theorem 1.2(i) w.h.p. H (r) (n, 1/2) is strongly 2-weighted which obviously implies that it is also weakly 2-weighted. Hence, we only need to show that w.h.p. H (r) (n, 1/2) is not weakly 1-weighted. We do it by applying the second moment method as in Section 6.
Let X 3 counts the number of edges {v 1 , v 2 , v 3 } in H (3) (n, 1/2) such that deg(v 1 ) = deg(v 2 ) = deg(v 3 ). By Lemma 5.2 we get where the latter follows from (A2) (applied with m = n−3 2 and k = 3). Thus, which goes to infinity together with n. We show that E(X 2 3 ) ∼ (E(X 3 )) 2 . For e ∈ [n] 3 , let X e be an indicator random variable which is equal to 1 if all three vertices in e have the same degree. Thus, X e X f + |e∩f |=1 X e X f + |e∩f |=2 X e X f .