29
Improved Bounds and Algorithms for Hypergraph 2-Coloring * Jaikumar Radhakrishnan, 1 Aravind Srinivasan 2 1 School of Technology and Computer Science, Tata Institute for Fundamental Research, Mumbai 400005, India; e-mail: [email protected] 2 Bell Laboratories, Lucent Technologies, Room 2C-302A, 700 Mountain Avenue, Murray Hill, NJ 07974-0636; e-mail: [email protected] Received 19 January 1999; accepted 25 August 1999 ABSTRACT: We show that for all large n, every n-uniform hypergraph with at most 0:7 p n/ ln n × 2 n edges can be 2-colored. This makes progress on a problem of Erd˝ os [Nordisk Mat. Tidskrift 11, 5–10 (1963)], improving the previous-best bound of n 1/3-o1 × 2 n due to Beck [Discrete Math. 24, 127–137 (1978)]. We further generalize this to a “local” version, improving on one of the first applications of the Lov´ asz local lemma. We also present fast randomized algorithms that output a proper 2-coloring with high probability for n-uniform hypergraphs with at most 0:7 p n/ ln n × 2 n edges, for all large n. In addition, we derandomize and parallelize these algorithms, to derive NC 1 versions of these results. © 2000 John Wiley & Sons, Inc. Random Struct. Alg., 16, 4–32, 2000 Correspondence to: A. Srinivasan *Part of this work was done when the authors attended the Workshop on Randomized Algorithms preced- ing the Annual Conference on Foundations of Software Technology and Theoretical Computer Science, 1997. A preliminary version of this research appears in the Proc. IEEE Symposium on Foundations of Computer Science, 1998. The second author’s work was done: (i) at the School of Computing, National University of Singapore, Singapore 119260; and (ii) while visiting DIMACS (Center for Discrete Mathe- matics and Theoretical Computer Science). DIMACS is an NSF Science and Technology Center, funded under contract STC-91-19999; and also receives support from the New Jersey Commission on Science and Technology. © 2000 John Wiley & Sons, Inc. CCC 1042-9832/00/010004-29 4

Improved bounds and algorithms for hypergraph 2-coloring

Embed Size (px)

Citation preview

Page 1: Improved bounds and algorithms for hypergraph 2-coloring

Improved Bounds and Algorithms forHypergraph 2-Coloring*

Jaikumar Radhakrishnan,1 Aravind Srinivasan2

1School of Technology and Computer Science, Tata Institute for FundamentalResearch, Mumbai 400005, India; e-mail: [email protected]

2Bell Laboratories, Lucent Technologies, Room 2C-302A, 700 Mountain Avenue,Murray Hill, NJ 07974-0636; e-mail: [email protected]

Received 19 January 1999; accepted 25 August 1999

ABSTRACT: We show that for all large n, every n-uniform hypergraph with at most0:7√n/ ln n × 2n edges can be 2-colored. This makes progress on a problem of Erdos

[Nordisk Mat. Tidskrift 11, 5–10 (1963)], improving the previous-best bound of n1/3−o�1� × 2n

due to Beck [Discrete Math. 24, 127–137 (1978)]. We further generalize this to a “local”version, improving on one of the first applications of the Lovasz local lemma. We alsopresent fast randomized algorithms that output a proper 2-coloring with high probabilityfor n-uniform hypergraphs with at most 0:7

√n/ ln n× 2n edges, for all large n. In addition,

we derandomize and parallelize these algorithms, to derive NC1 versions of these results.© 2000 John Wiley & Sons, Inc. Random Struct. Alg., 16, 4–32, 2000

Correspondence to: A. Srinivasan*Part of this work was done when the authors attended the Workshop on Randomized Algorithms preced-ing the Annual Conference on Foundations of Software Technology and Theoretical Computer Science,1997. A preliminary version of this research appears in the Proc. IEEE Symposium on Foundations ofComputer Science, 1998. The second author’s work was done: (i) at the School of Computing, NationalUniversity of Singapore, Singapore 119260; and (ii) while visiting DIMACS (Center for Discrete Mathe-matics and Theoretical Computer Science). DIMACS is an NSF Science and Technology Center, fundedunder contract STC-91-19999; and also receives support from the New Jersey Commission on Scienceand Technology.© 2000 John Wiley & Sons, Inc. CCC 1042-9832/00/010004-29

4

Page 2: Improved bounds and algorithms for hypergraph 2-coloring

ALGORITHMS FOR HYPERGRAPH 2-COLORING 5

1. INTRODUCTION

A hypergraph H = �V;E� consists of a set V and a collection E of subsets of V . Theelements of V and E are, respectively, called vertices and edges, and we only considerfinite hypergraphs here. Hypergraph coloring is a generalization of graph coloring:H is said to be c-colorable iff there is a function V → �1; 2; : : : ; c� such that noedge is monochromatic. In contrast with graphs, deciding if a given hypergraph is2-colorable is NP-complete, even if all edges have cardinality at most 3 (Lovasz[20], Garey and Johnson [16]). Hypergraph 2-colorability is a central problem incombinatorics that has been studied since the early part of this century. It has alsobeen studied by computer scientists due to its connections to the graph coloringand satisfiability problems. In this work, we make progress on an extremal problemof Erdos on 2-colorable hypergraphs, improving on a result of Beck from 1978[6]; we further generalize this to a “local” version, improving on one of the firstapplications of the Lovasz local lemma [12]. Furthermore, our first result translatesto fast sequential and parallel (deterministic) algorithms.

History. The property of hypergraph 2-colorability, also called Property B, has longbeen studied (Bernstein [8], Miller [23]: see Jensen and Toft [17]). Much work hasbeen done on proving hypergraph families 2-colorable and on the correspondingalgorithmic questions [1, 2, 6, 7, 12, 21, 22, 24, 26, 29]. Inspired in part by recentwork on approximate graph coloring via semidefinite programming (Karger, Mot-wani, and Sudan [18]), Alon, et al. [3], Chen and Frieze [9], and Krivelevich andSudakov [19] have provided approximation algorithms for coloring 2-colorable hy-pergraphs. They present polynomial-time algorithms to c-color a given 2-colorablehypergraph H = �V;E�, where c is a function of �V � and maxf∈E �f �. There is alsoa natural maximization version of 2-coloring: color V with two colors such that amaximum possible number of edges are nonmonochromatic. Approximation algo-rithms with a performance ratio of 0:724 : : : for this problem, have been providedby Andersson and Engebretsen [5].

We now present the setting of our first main result. H = �V;E� is called an`-uniform hypergraph if each edge is of cardinality `. In an approach that is now of-ten used in the context of, e.g., the maximum satisfiability problem, Erdos showedin 1963 that any n-uniform hypergraph with less than 2n−1 edges is 2-colorable:color the vertices Red and Blue uniformly, at random, and independently, and ob-serve that the expected number of monochromatic edges is smaller than 1 [10]. Thisprompted one of his extremal problems: what is the least m�n� such that there isan n-uniform hypergraph with m�n� edges that is not 2-colorable? (This is problem15.1 in [17].) Clearly, his above result shows that m�n� ≥ 2n−1. In yet another ap-proach that is now much used in computer science, Erdos then used the probabilisticmethod to construct a “random n-uniform hypergraph” for which no 2-coloring ex-ists: he showed that m�n� < n22n+1 [11]. See [17] for bounds on m�n� for small n,as well as recurrence relations for m�n�.

It was conjectured by Erdos and Lovasz in their seminal paper [12] that m�n�may be 2�n2n�. An elegant result of Beck showed that m�n� > n1/3−o�1�2n; i.e.,for a certain function g�n� that tends to 0 as n increases, Beck showed (using arandomized algorithm) that any n-uniform hypergraph with n1/3−g�n�2n edges is 2-colorable [6]. (Of course, in such positive results, the n-uniformity condition can

Page 3: Improved bounds and algorithms for hypergraph 2-coloring

6 RADHAKRISHNAN AND SRINIVASAN

be weakened to each edge having at least n vertices: just restrict each edge to anarbitrary n-element subset of it.) A simpler, probabilistic and algorithmic, proofof Beck’s result was presented by Spencer [26]. Recall from above that m�n� =O�n22n�. To quote Spencer from the second edition of [27]:

“It may appear then that the bounds on m�n� are close together. Butfrom a probabilistic viewpoint a factor of 2n−1 may be considered a unit.We could rewrite the problem as follows. Given a family F let X denotethe number of monochromatic sets under a random coloring. What isthe maximal k = k�n� so that, if F is a family of n-sets with E�X� ≤ k,then Pr�X = 0� > 0? In this formulation cn1/3 < k�n� < cn2 and theproblem clearly deserves more attention.”

1.1. Contributions of This Work

(i) Improved Lower Bounds for m�n�. By building on the Beck–Spencer approach,we improve on Beck’s result to prove that m�n� = ��√n/ ln n × 2n�. We showthat if H = �V;E� is an n-uniform hypergraph with at most �1/10�√n/ ln n × 2n

edges, then H is 2-colorable; for sufficiently large n, this bound can be improvedto 0:7

√n/ ln n× 2n. We, in fact, present fast randomized algorithms that output a

proper 2-coloring with high probability for such hypergraphs. We also derandom-ize and parallelize these algorithms, to derive NC1 versions of these results. SeeTheorems 2.1 and 3.1.

(ii) Two-coloring Hypergraphs with Small Overlap. Next, we generalize result (i)to a “local” version, using the Lovasz local lemma. A useful parameter of H is itsoverlap D, defined to be the maximum number of edges, including itself, that anyedge of H intersects. One of the first and major applications of the powerful Lovaszlocal lemma [12]—abbreviated LLL here—was to show that any n-uniform hyper-graph with D ≤ 2n−1/e is 2-colorable. (Here, as usual, e denotes the base of thenatural logarithm.) The local lemma was also applied to this parametrization basedon D to show, e.g., that for any d ≥ 9, any d-uniform hypergraph in which eachvertex appears in at most d edges, is 2-colorable [12]; see [2, 29, 22] for further im-provements. The “D ≤ 2n−1/e” result was major progress on the extremal question:what is the least D∗ = D∗�n� for which there exists an n-uniform hypergraph withoverlap at most D∗ that is not 2-colorable? The result of [11] described previously,shows that D∗�n� = O�n22n�. By applying Theorem 4.1 to our approach for prov-ing result (i), we show in Theorem 4.2 that D∗�n� > 0:17

√n/ ln n2n for sufficiently

large n. This improves on the previously seen ��2n� lower bound of [12]. In otherwords, we show that for sufficiently large n, any n-uniform hypergraph with over-lap D at most 0:17

√n/ ln n2n is 2-colorable. Modulo constant factors, this is easily

seen to be a generalization of our result (i), since �E� ≥ D trivially.

(iii) Hypergraphs with “Small” Intersections. What could be a possible avenue forimproving our result (i)? One answer is to start by considering some restrictedbut interesting family F of uniform hypergraphs. In Section 5, we build on a leadsuggested by the work of [12] and present a candidate family F . We show thatthe upper bound O�n22n� of [11] holds even for m�n� restricted to this family. We

Page 4: Improved bounds and algorithms for hypergraph 2-coloring

ALGORITHMS FOR HYPERGRAPH 2-COLORING 7

then show that for all ε > 0, m�n� ≥ ��n1−ε2n� for this family, by analyzing amodification of our algorithm for result (i).

At a high level, our main contribution is the following. An important branch of thebasic probabilistic method is the method of alteration: one starts with an appropri-ate random construction, which, however, may (or will) contain some “blemishes.”To correct the blemishes, we first argue that we do not expect too many blemishes,and then proceed to make a (hopefully) small alteration to correct these blemishes.See [4, 27] for several concrete instances of this methodology. In “correcting theblemish,” two popular approaches are to proceed deterministically, or to alter sev-eral components of the current structure independently, with low probability. Theabove-mentioned result of Beck is essentially an example of the latter idea [6]. Moreprecisely, one starts with a random coloring, and then independently flips the colorsof vertices lying in monochromatic edges, with a small probability. Our main ideais to slow down this recoloring process: in the random recoloring process, we re-color the vertices lying in monochromatic edges in random order, processing thesevertices one-by-one. The probabilistic recoloring of a vertex will take place only if acertain condition necessitates it: the advantage is that the effect of previously pro-cessed vertices may have hopefully falsified this condition. The reader is referredto Section 2 for a precise description and analysis. Can such “lazy alteration” beapplied to other probabilistic (alteration) arguments?

The rest of this paper is organized as follows. Section 2 presents the main result,and a derandomized parallel version is shown in Section 3. Sections 4 and 5 studyhypergraphs with small overlap and small intersections, respectively.

2. SLOW RECOLORING

We now prove our first main result—result (i) of the Introduction. Edges of H willbe denoted by f , f ′, h, h′; etc.

For a coloring χx V → �Red;Blue�, let

M�χ� = �f ∈ Ex f is monochromatic in χ�;

and for v ∈ V , let

M�v; χ� = �f ∈ M�χ�x v ∈ f�:

For S ⊆ V , let R�S; χ� denote the event “S is completely red in χ,” and B�S; χ�the event “S is completely blue in χ.” Sometimes, instead of R�S; χ� and B�S; χ�we write “S is red in χ” and “S is blue in χ,” respectively.

The Algorithm.

Phase 1. Generate a random coloring χ0x V → �Red;Blue� by choosing χ0�v� tobe Red or Blue with probability 1/2, independently for each vertex v ∈ V .

Page 5: Improved bounds and algorithms for hypergraph 2-coloring

8 RADHAKRISHNAN AND SRINIVASAN

Phase 2. In this phase, we flip the colors of some of the vertices to make edgesin M�χ0� nonmonochromatic, and hope that this does not make the already non-monochromatic edges monochromatic. In the method of [26], colors of all verticesthat belonged to at least one monochromatic set were flipped (independently, witha certain probability q) simultaneously. In our proof we will not recolor all verticesat the same time. Instead, each vertex will be a assigned a delay, which will be a realnumber between 0 and 1, and the vertices will be processed in the order of theirdelays.

Formally, we pick the delay function delayx V → �0; 1� by choosing delay�v�uniformly at random in �0; 1� and independently for each v ∈ V . (Note that withprobability 1, no two vertices are assigned the same delay.) Next, pick bx V → �0; 1�by choosing b�v� = 1 with probability p, and b�v� = 0 with probability 1 − p,independently for each v ∈ V . (Appropriate values for p will be presented later.)Using delay and b, we will recolor in �V � steps as follows.1 Let v1; v2; : : : be thevertices of H written in the order of their delays (v1 has the smallest delay).

Step 1. If M�v1; χ0� 6= Z and b�v1� = 1, then flip the color of v1. Let the result-ing coloring be χ1.

Step 2. If some edge in M�v2; χ0� continues to be monochromatic in χ1 andb�v2� = 1, then flip the color of v2. Let the resulting coloring be χ2.

:::Step i. If some edge in M�vi; χ0� continues to be monochromatic in χi−1 and

b�vi� = 1, then flip the color of vi. Let the resulting coloring be χi.

Let χ∗ be the coloring obtained after all vertices have been considered.

This slow recoloring is the key to our improvement: one expects that a vertex thatgets a “large” delay will have a “low” probability of having to be recolored dueto the effect of the vertices with smaller delays. Intuitively, this helps increase theprobability that an edge that was nonmonochromatic at some point, remains so.

Simplification. Boppana (personal communication) has shown that the secondphase of the algorithm can be considerably simplified, as follows. We pick delaysand let v1; v2; : : : be the vertices written in the order of their delays, as before. InStep i, if some edge in M�vi; χ0� continues to be monochromatic in χi−1, then weflip the color of vi. Let the resulting coloring be χi. Boppana has shown that thisalgorithm also achieves the performance bounds we claim for our algorithm.

Indeed, one of the referees pointed out that this can be seen readily by com-paring what happens in Phase 2 of the two algorithms. Let N be the number ofvertices that belong to some monochromatic set after Phase 1, and let X be a ran-dom variable having binomial distribution bin�N;p�. The claim is that if Boppana’salgorithm is stopped after the first X (of the N) vertices have been considered,then it corresponds exactly to the algorithm we have presented above. In our algo-rithm, the number of vertices v with b�v� = 1 has the same distribution as X, and

1 The previous version of this algorithm used delays in the (discrete) range 1; : : : ; r, where r was aboutln n. Spencer showed that choosing real-valued delays from the range �0; 1� considerably simplifies thecalculations.

Page 6: Improved bounds and algorithms for hypergraph 2-coloring

ALGORITHMS FOR HYPERGRAPH 2-COLORING 9

these vertices are considered in a random order. On the other hand, in Boppana’salgorithm (with stopping after X) we pick a random order order on all vertices andstop after X vertices have been considered. Clearly, the two are the same. Thus,Boppana’s algorithm when stopped after X vertices have been considered does atleast as well as our algorithm; it could do no worse (and might even do better) ifit is not stopped early. Note that the bits b�v� play no role in Boppana’s algorithm;they appear only in the analysis of the algorithm!

2.1. Analysis

Let �E� = k2n, for some parameter k = k�n�. We wish to show that M�χ∗� = Z withnonzero probability if k = k�n� is not “too large.” Consider an edge f of H. We willestimate the probability that f is monochromatic in χ∗. We have two cases basedon whether or not at least one vertex of f changed its color during the recoloringphase.

Case 1. If f was blue in both χ0 and χ∗, then we say that event ABlue�f � tookplace; that is

ABlue�f � ≡ B�f; χ0� ∧ B�f; χ∗�:

Similarly, we have ARed�f � ≡ R�f; χ0� ∧ R�f; χ∗�, which states that the edge f wasred in χ0 and this was not rectified while recoloring.

Case 2. Suppose f was not blue in χ0 but became blue during the recoloring phase.That is, during the recoloring phase every red (in χ0) vertex of f changed its color.Let w be the last red vertex of f to change its color. Why was it necessary torecolor w? There must be an edge f ′ 6= f such that w ∈ f ′, and f ′ was red inχ0 and continued to be red until w was considered. That is, f became blue in χ∗

because w had to be recolored to rectify the improper coloring of f ′. When thishappens, we say that f blames f ′ for making it (i.e., f ) blue; this event is denotedby BBlue�f; f ′�. Note that a fixed f can blame more than one f ′, that is, BBlue�f; f ′�might hold for more than one f ′.

To account for the possibility that f was not red in χ0 but became red in χ∗, weinterchange the roles of red and blue in the previous discussion. We then arrive atthe event BRed�f; f ′�, which is true exactly when f blames f ′ for making it red. Wethus have the following lemma.

Lemma 2.1. If f ∈ E is blue in χ∗, then at least one of ABlue�f � or BBlue�f; f ′� takesplace for some f ′ ∈ E (f 6= f ′). If f is red in χ∗, then at least one of ARed�f � orBRed�f; f ′� takes place for some f ′ ∈ E (f 6= f ′).

Thus, to bound the probability that there is some monochromatic set in χ∗ it isenough to bound the probabilities of the events

∃f ∈ Ex �ABlue�f � ∨ ARed�f �� and ∃f; f ′ ∈ E x �BBlue�f; f ′� ∨BRed�f; f ′��:

The next three claims will help us estimate the probabilities of these events.

Page 7: Improved bounds and algorithms for hypergraph 2-coloring

10 RADHAKRISHNAN AND SRINIVASAN

Claim 2.1. Pr�ABlue�f �� = Pr�ARed�f �� = 2−n�1− p�n:

Proof. Now ABlue�f � ≡ B�f; χ0� ∧ �∀v ∈ f x b�v� = 0�. Thus, Pr�ABlue�f �� =2−n�1− p�n: Similarly, Pr�ARed�f �� = 2−n�1− p�n:

Claim 2.2. If �f ∩ f ′� > 1, then Pr�BBlue�f; f ′�� = Pr�BRed�f; f ′�� = 0.

Proof. Suppose f blames f ′ for making it blue. Then, the red vertex of f thatwas recolored last, say w, lies in f ′. That is, all other vertices of f ∩ f ′ became bluebefore w was considered. But then f ′ could not have been red just before w wasconsidered for recoloring. Thus, Pr�BBlue�f; f ′�� = 0. Similarly, Pr�BRed�f; f ′�� = 0.

Let f ∩ f ′ = �w�. For S ⊆ f − f ′, consider the following event:

E1Blue�S; f; f ′� ≡ R�f ′; χ0� ∧ B�f − S − f ′; χ0� ∧ R�S; χ0�

∧ �∀v ∈ �S ∪ �w��x b�v� = 1�:

Suppose BBlue�f; f ′� holds. Then the event E1Blue�S; f; f ′� must hold for some S ⊆

f − f ′ [namely, S is the set of red vertices (in χ0) of f − f ′]. Furthermore, since wwas the last red vertex of f to be recolored and f ′ was red until then, we have thatthe following event also holds.

E2Blue�S; f; f ′� ≡ �∀u ∈ Sx delay�u� ≤ delay�w��

∧ �∀v ∈ �f ′ − �w��x �delay�v� ≥ delay�w� ∨ b�v� = 0��:

Here S is the set of red vertices of f . Thus, BBlue�f; f ′� implies

BBlue�f; f ′� def= ∃S ⊆ f − f ′ x EBlue�S; f; f ′�;

where EBlue�S; f; f ′� ≡ E1Blue�S; f; f ′� ∧ E2

Blue�S; f; f ′�. Similarly, when consideringthe event BRed�f; f ′� we obtain the corresponding event BRed�f; f ′�. We summarizeour observations as follows.

Claim 2.3. BBlue�f; f ′� implies BBlue�f; f ′� and BRed�f; f ′� implies BRed�f; f ′�.

Claim 2.4. If �f ∩ f ′� = 1, then Pr�BBlue�f; f ′�� = Pr�BRed�f; f ′�� ≤ 2−2n+1p.

Proof. It is easy to check, using our definition of χ0, delay; and b, that

Pr[EBlue�S; f; f ′� � delay�w� = x] = 2−2n+1p�S�+1x�S��1− xp�n−1:

Page 8: Improved bounds and algorithms for hypergraph 2-coloring

ALGORITHMS FOR HYPERGRAPH 2-COLORING 11

On integrating over x and summing over all S, we obtain

Pr[BBlue�f; f ′�

] ≤ 2−2n+1n−1∑`=0

(n− 1`

)p`+1

∫ 1

0x`�1− xp�n−1 dx

= 2−2n+1p∫ 1

0�1− xp�n−1

[n−1∑`=0

(n− 1`

)p`x`

]dx

= 2−2n+1p∫ 1

0�1− xp�n−1�1+ xp�n−1 dx

= 2−2n+1p∫ 1

0�1− �xp�2�n−1 dx

≤ 2−2n+1p∫ 1

0dx

= 2−2n+1p:

Similarly, Pr�BRed�f; f ′�� ≤ 2−2n+1p.

Recall that �E� = k2n. We are now ready to show that if k is not “too large,” thenwith constant probability M�χ∗� = Z. First, from Claim 2.1, we have

Pr[∃f ∈ Ex ABlue�f � ∨ ARed�f �

] ≤ k2n × 2 × 2−n�1− p�n ≤ 2k�1− p�n: (1)

Remark. By considering the positive correlation between the events considered inClaim 2.1, one can improve the bound in (1) to 1− �1− �1− p�n�2k. The detailedargument is presented in the appendix.

Next, from Claims 2.2, 2.3, and 2.4, we have

Pr�∃f; f ′ ∈ E x BBlue�f; f ′� ∨BRed�f; f ′�� ≤ k222n × 2 × 2−2n+1p = 4k2p: (2)

By Lemma 2.1,Pr[M�χ∗� 6= Z] ≤ 2k�1− p�n + 4k2p: (3)

For 0 < ε ≤ 1, k = �1/√2��1 − ε�√n/ ln n, p = �1/2� ln n/n, and for all large n,this probability is at most 1 − ε. (In particular, for any fixed ε > 0 and n ≥ n0�ε�,every n-uniform hypergraph with �1/√2��1− ε�√n/ ln n× 2n edges has a proper 2-coloring.) If ε is, e.g., a constant, then this “success probability” of ε can of coursebe boosted to any constant probability less than 1 by repeating our basic randomprocess a sufficiently large constant number of times. If n ≥ 2 is arbitrary, we cantake, e.g., k = �1/10�√n/ ln n and p = �1/2� ln n/n; (3) will then imply that everyn-uniform hypergraph with at most �1/10�√n/ ln n× 2n edges is 2-colorable.

Theorem 2.1. Let H = �V;E� be an arbitrary n-uniform hypergraph with at most�1/10�√n/ ln n× 2n edges; if n is sufficiently large, then H having up to 0:7

√n/ ln n×

2n edges is also admissible. Then, H is 2-colorable; also, a proper 2-coloring for H canbe found with high probability in O�poly��V � + �E��� time.

A derandomized parallel version of Theorem 2.1 is presented in the next section(see Theorem 3.1).

Page 9: Improved bounds and algorithms for hypergraph 2-coloring

12 RADHAKRISHNAN AND SRINIVASAN

2.2. When There Are Few Singleton Intersections

In our discussion above, pairs of edges that intersect in only one element play aspecial role. Call f ∈ E relevant iff there is some f ′ 6= f such that �f ∩ f ′� = 1; letI�H� be the set of relevant edges of H. Suppose we can 2-color the subhypergraphof H that only contains the edges in I�H�. Then there is a simple way to startwith this and 2-color H, as follows. First, if any vertex is currently uncolored (sinceit only occurred in edges in E − I�H�), color each such vertex arbitrarily. Next,repeat the following as long as there exists any monochromatic edge: choose anarbitrary monochromatic edge and flip the color of any one of its vertices. It isknown and easy to see that no new monochromatic edge is ever created, and hencethis process stops after considering each edge in E − I�H� at most once. Thus, asimple consequence of Theorem 2.1 is

Theorem 2.2. The consequences of Theorem 2.1 hold even if the upper bounds ofTheorem 2.1 on �E�, are only upper bounds on �I�H��.

[In particular, this implies the known fact that if I�H� = Z, then H is 2-colorablein polynomial time.]

3. DERANDOMIZED PARALLEL VERSION:RECOLORING WITH DISCRETE DELAYS

We show how to derandomize and parallelize our algorithm. To this end, we firstpresent the original version of our algorithm, which is more amenable to deran-domization. We then present the derandomized parallel version in Section 3.2.

3.1. Recoloring with Discrete Delays

The original version of our coloring algorithm uses delays chosen from the set�1; 2; : : : ; r� (for a suitable r = ��log n�) instead of �0; 1�, and will be a useful ver-sion on which to base our derandomized parallel algorithm. Since the randomizedalgorithm is very similar to that of Section 2, we only present a brief descriptionhere. Phase 1 is the same as that of Section 2. In Phase 2, the main difference is thatwe pick the delay function delayx V → �1; 2; : : : ; r� by choosing delay�v� = i withprobability 1/r, independently for each v ∈ V . The bits b�·� are chosen the sameway as before: b�v� = 1 with probability p, and b�v� = 0 with probability 1 − p,independently for all v ∈ V .

In Phase 2, we now recolor in r stages as follows. Let χj denote the coloring atthe end of stage j. In stage i, all v with delay�v� = i perform the following actionin parallel: if some edge in M�v; χ0� continues to be monochromatic in χi−1 andb�v� = 1, then flip the color of v.

The analysis is almost identical to the analysis in Section 2.1. Here, we shalldescribe only the parts where there is a difference. Let events ABlue�f �; ARed�f �;BBlue�f; f ′�; and BRed�f; f ′� be defined as before. Then, Lemma 2.1 and Claim 2.1are still valid. For Claim 2.2 we have the following analog.

Page 10: Improved bounds and algorithms for hypergraph 2-coloring

ALGORITHMS FOR HYPERGRAPH 2-COLORING 13

Claim 3.1. If either BBlue�f; f ′� or BRed�f; f ′� takes place, then all vertices in f ∩ f ′must have the same delay.

Proof. Suppose BBlue�f; f ′� holds, but delay�u� < delay�v� for some u; v ∈ f ∩ f ′.Clearly, u and v were both made blue during the the recoloring phase, and u becameblue before v. But then, when the last red vertex in f was considered the color of uwas already blue. Hence, f ′ was not red at that stage; so f could not have blamedf ′ for making it blue. Thus, all vertices in f ∩ f ′ must have the same delay. Bysymmetry, the same conclusion follows when BRed�f; f ′� holds.

Claim 3.2. Pr�BBlue�f; f ′�� = Pr�BRed�f; f ′�� ≤ 2−2n+1p�2p/r��f∩f ′ �−1e�n−�f∩f′ ��p/r .

Furthermore, this calculation can be done by only considering the χ0, delay, and bvalues of the vertices in f ∪ f ′.

Proof. The proof has the same structure as that of Claim 2.4; the only differenceis that we allow �f ∩ f ′� > 1. Let f ∩ f ′ = T and let t = �T �. For S ⊆ f − f ′, considerthe following event:

E1Blue�S; f; f ′� ≡ R�f ′; χ0� ∧ B�f − S − f ′; χ0� ∧ R�S; χ0�

∧ (∀v ∈ �S ∪ T �x b�v� = 1):

Suppose BBlue�f; f ′� holds. Then the event E1Blue�S; f; f ′� must hold for some S ⊆

f − f ′ (namely, S is the set of red vertices (in χ0) of f − f ′). Also, by Claim 3.1 allvertices in f ∩ f ′ have the same delay, say d. Since the last red vertex of f to berecolored is in f ′, and f ′ was red until that vertex was taken up for recoloring, thefollowing event also holds:

E2Blue�S; d; f; f ′� ≡

(∀u ∈ Sx delay�u� ≤ d)∧(∀v ∈ �f ′ − T �x �delay�v� ≥ d ∨ b�v� = 0�):

Thus BBlue�f; f ′� implies

∃d ∃S ⊆ f − f ′x EBlue�S; d; f; f ′�;

where EBlue�S; d; f; f ′� ≡ E1Blue�S; f; f ′� ∧ E2�S; d; f; f ′� ∧ delay�T � = �d�.

It is easy to check, using our definition of χ0, delay, and b, that Pr�delay�T � =�d�� = 1/rt , for d = 1; 2; : : : ; r, and that

Pr[EBlue�S; d; f; f ′� � delay�T � = �d�] = 2−2n+tp�S�+t�d/r��S��1− �d − 1�p/r�n−t :

On summing over all d and S, we obtain

Pr[BBlue�f; f ′�

] ≤ 2−2n+tn−t∑`=0

(n− t`

)p`+t�1/r�t

r∑d=1

(d

r

)`(1− d − 1

rp

)n−t= 2−2n+t�p/r�t

r∑d=1

(1− d − 1

rp

)n−t n−t∑`=0

(n− t`

)(dp

r

)`

Page 11: Improved bounds and algorithms for hypergraph 2-coloring

14 RADHAKRISHNAN AND SRINIVASAN

= 2−2n+t�p/r�tr∑d=1

(1− d − 1

rp

)n−t(1+ d

rp

)n−t≤ 2−2n+t�p/r�t

r∑d=1

(1+ p

r

)n−t≤ 2−2n+tpt�1/r�t−1e�n−t�p/r :

Similarly, we bound Pr�BRed�f; f ′��.

Recall that �E� = k2n. To bound the probability that M�χ∗� 6= Z, we repeat thecalculation presented at the end of Section 2, this time using Claims 3.1 and 3.2instead of Claims 2.2, 2.3, and 2.4.

Inequality (1) still holds. To bound the probability of the event “∃f; f ′ ∈Ex �BBlue�f; f ′� ∨BRed�f; f ′��,” we use Claim 3.2 and obtain that for edges f andf ′ (f 6= f ′) with �f ∩ f ′� = t ≥ 1,

Pr[BBlue�f; f ′� ∨BRed�f; f ′�

] ≤ 2 × 2−2n+1p�2p/r�t−1ep�n−t�/r ≤ 4× 2−2npepn/r y

the last inequality holds because r ≥ 2. Thus, we have

Pr[∃f; f ′ ∈ Ex �BBlue�f; f ′� ∨BRed�f; f ′��

] ≤ k222n × 4× 2−2npepn/r = 4k2pepn/r :

By Lemma 2.1,

Pr�M�χ∗� 6= Z� ≤ 2k�1− p�n + 4k2pepn/r : (4)

For 0 < ε ≤ 1, k = �1/√2��1− ε�√n/ ln n, p = �1/2� ln n/n, r = ⌈ε−1 ln n⌉

, andfor all large n, this probability is at most 1− ε.

3.2. Derandomization and Parallelization

We now show how the above algorithm can be derandomized and can also bemade to run in NC1. A fundamental idea in derandomization, due to Naor andNaor [25], is that randomized algorithms are typically robust to small changes inthe underlying distribution. As explained in more detail below, this opens up thefollowing avenue to potentially derandomize a given randomized algorithm. Thekey goal is to show that there is an efficiently constructible “small” sample space,such that sampling from this small space changes a (carefully crafted) analysis of thealgorithm negligibly. Thus, the algorithm will work essentially as well, if its randomchoice comes from the small space. This in turn yields a deterministic algorithm,which runs the randomized algorithm (in parallel) on all possible seeds from thesmall space, and finally outputs the best solution found. The work of [25] presentsexplicit constructions of small sample spaces that “approximate” some propertiesof certain much larger sample spaces, in a precise sense. To specify the type of“approximation” we need, we start with a definition.

For any nonnegative integer t, let �t� = �0; 1; : : : ; t − 1�; an interval of �t� is aset of the form �ix a ≤ i ≤ b�, for some a; b ∈ �t� such that a ≤ b. Let Jt be the setof all intervals of �t�.

Page 12: Improved bounds and algorithms for hypergraph 2-coloring

ALGORITHMS FOR HYPERGRAPH 2-COLORING 15

Extending the work of [25], Even et al. [13, 14] defined the following. SupposeX1;X2; : : : ;XN ∈ �t� are independent random variables with arbitrary individualdistributions and joint distribution D; let X denote the vector �X1;X2; : : : ;XN�.Call a set A ⊆ �t�N an �`; δ�-approximation for D if, for Y = �Y1; : : : ; YN� sampleduniformly at random from A,

• for all index sets I ⊆ �1; 2; : : : ;N� with �I� ≤ `, and

• for all Jx I → Jt ,

we have ∣∣∣∣Pr[∧i∈I�Yi ∈ J�i��

]−∏i∈I

PrD

[Xi ∈ J�i�

]∣∣∣∣ ≤ δ:(We call any event of the form “

∧i∈I�Xi ∈ J�i��” an interval event w.r.t. X.)

Among other results, it was shown in [13] that such a set A with cardinalitypoly�2`; logN;δ−1� can be constructed explicitly using poly��A� +N� processors inO�log��A� + N�� time on an EREW PRAM. (See [14] for the journal version of[13].)

Some remarks on this construction of [13]:

• The construction possesses some stronger properties, which, however, we donot need here.

• As described in [13], the construction handles the situation where J�i� is asingleton for each i, but it is easy to see that a minor modification makes it workfor all interval events.

• The description in [13] does not explicitly discuss such parallel constructions,but such a parallel version of the work of [13] is immediate from a reading of [13].

• �A� above does not depend on t, since we can assume without loss of gener-ality that t = O�`/δ� [13].

One basic utility of such constructions to, say, derandomized parallel algorithms,is as follows. Given a randomized algorithm that uses the independent randomvariables X1;X2; : : : ;XN , one first shows that the analysis is changed little by anapproximation as defined above, if ` is sufficiently large and δ is suitably small.Then, one may just exhaustively search such a sample space A (allocating an ap-propriate number of processors to each element of A), and thus deterministicallyfind a value for �X1;X2; : : : ;XN� that is “good enough” for the algorithm. In ourcontext, we get

Theorem 3.1. For any sufficiently large n, let H = �V;E� be an arbitrary n-uniformhypergraph with at most 0:7

√n/ ln n× 2n edges. Then, H is 2-colorable; also, a proper

2-coloring for H can be found in NC1.

Proof. Suppose for a sufficiently large n that H = �V;E� is an n-uniform hyper-graph with at most 0:7

√n/ ln n× 2n edges. Clearly, we may assume without loss of

generality that �V � ≤ n�E�. We may also assume that �E� ≥ 2n/500: if not, one canemploy the NC1 algorithm of [1] to 2-color H. So suppose �E� ≥ 2n/500. Then, the“input size” for our problem is 22�n�, and hence an NC1 algorithm would use 22�n�

processors and O�n� time.

Page 13: Improved bounds and algorithms for hypergraph 2-coloring

16 RADHAKRISHNAN AND SRINIVASAN

We now show how to derandomize the algorithm of this section within these pro-cessor and time bounds. In the “approximating distributions” notation used above,the underlying independent random variables X1;X2; : : : are the χ0, b; and delayvalues of the vertices; t = r. Let D be the joint distribution of these independentrandom variables. Our plan is to proceed as follows. We will show that our failureprobability bound (4) is obtainable as a sum of at most s = 2O�n� terms, where eachterm is the probability of an interval event (w.r.t. X) that depends on at most 6n ofthe variables X1;X2; : : :. So, since (4) leads to a failure probability that is boundedaway from 1, we may instead generate the random variables X1;X2; : : : from a�6n; δ�-approximation A for D, where δ = o�1/s� (say, 1/�s log n�); it is then easyto check that our failure probability is still bounded away from 1. Thus, we wouldhave shown the existence of a point in A that leads to a successful 2-coloring forH. Since �A� = 22�n�, the exhaustive search of A can be made to run in O�n� timeusing 22�n� processors.

So, let us study our analysis of this section, and the proof of Claim 3.2. Recallour goal from above: to show that our failure probability bound is a sum of at most2O�n� terms, each term being the probability of an interval event that depends on atmost 6n of the Xi. Our failure probability was the sum of the probabilities of theevents ABlue�f �; ARed�f �; EBlue�S; d; f; f ′�; and ERed�S; d; f; f ′�, for all edges f , forall f ′ 6= f with f ′ ∩ f 6= Z, for all S ⊆ �f − f ′�, and for all d ∈ �1; 2; : : : ; r�. It isimmediate that there are 2k2n events of the form ABlue�f � and ARed�f �, and thateach of these is an interval event w.r.t. X that depends on 2n of the Xi. Next, choosedistinct edges f; f ′ arbitrarily such that �f ′ ∩ f � ≥ 1. There are at most 22npoly�n�such choices. Having fixed such a choice of f; f ′, choose any S ⊆ �f − f ′� and anyd ∈ �1; 2; : : : ; r�: there are at most O�2n log n� such choices. We now show thatEBlue�S; d; f; f ′� can be expressed as the disjunction of at most 2n disjoint intervalevents; similarly for ERed�S; d; f; f ′�. This would conclude the proof.

Let f ∩ f ′ = T . Recall that EBlue�S; d; f; f ′� ≡ E1Blue�S; f; f ′� ∧ E2�S; d; f; f ′� ∧

delay�T � = �d�. It is easily seen that EBlue�S; d; f; f ′� depends on at most 6n ofthe Xi. Also, EBlue�S; d; f; f ′� is “almost” an interval event, except for the part“∀v ∈ �f ′ − T � x �delay�v� ≥ d ∨ b�v� = 0�.” However, for any given v, the event“delay�v� ≥ d ∨ b�v� = 0” can be rewritten as the disjunction of two disjoint intervalevents,(

delay�v� ≥ d ∨ b�v� = 0) ≡ �b�v� = 0� ∨ �b�v� = 1 ∧ delay�v� ∈ �d; r��:

Thus, EBlue�S; d; f; f ′� is the disjunction of at most 2n disjoint interval events. Thisfinishes the proof.

4. GENERALIZATION: A LOCAL VERSION

As mentioned in the Introduction, a useful parameter of H is its overlap D =maxf∈E ��f ′ ∈ Ex f ∩ f ′ 6= Z��. We now show that any n-uniform hypergraph withD ≤ 0:17

√n/ ln n× 2n is 2-colorable, for sufficiently large n.

Let us recall a special case of the LLL, which shows a useful sufficient conditionfor simultaneously avoiding a set A1;A2; : : : ;AN of “bad” events:

Page 14: Improved bounds and algorithms for hypergraph 2-coloring

ALGORITHMS FOR HYPERGRAPH 2-COLORING 17

Theorem 4.1 ([12]). Suppose events A1;A2; : : : ;AN are given. Let S1; S2; : : : SN besubsets of �N� such that for each i, Ai is independent of (any Boolean combinationof ) the events �Ajx j ∈ ��N� − Si��. Suppose that ∀i ∈ �N�: (i) Pr�Ai� < 1/2, and(ii)

∑j∈Si Pr�Aj� ≤ 1/4. Then, Pr�∧i∈�N�Ai� > 0.

Remark. Often, each j ∈ N will be an element of at least one of the sets Si; insuch cases, it clearly suffices to only verify condition (ii) of Theorem 4.1.

Suppose H is an n-uniform hypergraph with overlap D = λ2n. Let χ∗ be therandom coloring obtained by running the slow recoloring algorithm of Section 2;the value of p will be specified shortly. By Lemma 2.1, if we can simultaneouslyavoid the following events, then χ∗ will be a valid 2-coloring of H:{

ABlue�f �;ARed�f �x f ∈ E} ∪ {BBlue�f; f ′�;BRed�f; f ′�x f; f ′ ∈ E

}:

In Claims 2.2 and 2.3 we observed that the event BBlue�f; f ′� holds only if�f ∩ f ′� = 1 and the event BBlue�f; f ′� holds; similarly BRed�f; f ′� holds only if�f ∩ f ′� = 1 and the event BRed�f; f ′� holds. Thus, it is enough if we can simulta-neously avoid the following two types of events.

• Type 1 events: �ABlue�f �;ARed�f �x f ∈ E�.• Type 2 events: �BBlue�f; f ′�; BRed�f; f ′�x �f; f ′ ∈ E� ∧ ��f ∩ f ′� = 1��.

We will now show that for λ ≤ 0:17√n/ ln n, these events satisfy the conditions of

Theorem 4.1. Thus, we can simultaneously avoid these bad events.Our argument rests on the following observations.

(a) Every bad event has at most two edges as its arguments.(b) The occurrence of a bad event is completely determined once the value of

χ0�v�, delay�v�; and b�v� are fixed for all vertices belonging to its arguments.

For instance, consider the bad event B = BBlue�f; f ′�. Suppose C is any collectionof bad events such that for each event E ∈ C: no argument of E intersects f , andno argument of E intersects f ′. Then, the above observations, together with the factthat χ0, delay and b are chosen independently for different vertices, imply that Bis independent of any Boolean combination of events in C.

For a bad event B, let S�B� be the set of all bad events at least one of whosearguments has a nonempty intersection with an argument of B. Thus, as discussedabove, B is independent of any Boolean combination of the events outside S�B�.Thus, to apply Theorem 4.1, we need to bound the sum of the probabilities of theevents in S�B�. To do this, we will first bound the number of events of each type inS�B�; then we will use Claims 2.1 and 2.4 to bound their probabilities.

Claim 4.1. For all bad events B, S�B� has at most 4D events of type 1 and at most8D2 events of type 2.

Proof. Let the arguments of B be f and f ′ (we will take f = f ′ if B is a type 1event). The only events of type 1 that are in S�B� correspond to edges that intersecteither f or f ′. There are at most 2D such edges by the definition of D; for each

Page 15: Improved bounds and algorithms for hypergraph 2-coloring

18 RADHAKRISHNAN AND SRINIVASAN

such edge h, there are two type 1 events—ABlue�h� and ARed�h�. Thus, S�B� has atmost 4D events of type 1.

For a type 2 event with arguments �h; h′� to be in S�B�, at least one of h andh′ must intersect at least one of f and f ′; furthermore, h and h′ must themselvesintersect. It follows that there are at most 4D2 possibilities for �h; h′�. For each suchargument �h; h′�, there are two bad events BBlue�h; h′� and BRed�h; h′� in S�B�.Thus the number of type 2 events in S�B� is at most 8D2.

Claim 4.2. Suppose D = λ2n, where λ ≤ 0:17√n/ ln n and n is sufficiently large.

Then, for any bad event B,∑

E∈S�B� Pr�E� ≤ 1/4.

Proof. We use Claim 4.1 to bound the number of events of each type in S�B�; tobound the probabilities of these events, we use Claims 2.1 and 2.4. We have∑

E∈S�B�Pr�E� ≤ 4D× 2−n�1− p�n + 8D2 × 2−2n+1p = 4λ�1− p�n + 16λ2p:

If p = �1/2� ln n/n, ε > 0; and λ = �1− ε�√1/32√n/ ln n, then for all large n, this

probability is less than 1/4. (Note that√

1/32 > 0:176.)

We have thus established that condition (ii) of Theorem 4.1 holds if D is chosensuitably. As remarked before, this implies that condition (i) holds as well.

Theorem 4.2. Suppose, for a sufficiently large n, that H is an arbitrary n-uniformhypergraph in which each edge intersects at most 0:17

√n/ ln n× 2n other edges. Then,

H is 2-colorable.

By following the proof of Theorem 2.2, we see that Theorem 4.2 holds even ifeach relevant edge intersects at most 0:17

√n/ ln n× 2n other relevant edges.

5. ALMOST-DISJOINT HYPERGRAPHS

We now explore possibilities for improving the results of Sections 2 and 4. As seen inSection 2.2, hypergraphs where pairwise edge-intersections are typically “large,” canoften be 2-colored. This seems to suggest that 2-coloring may be most difficult forhypergraphs where edge-intersections are “small.” Motivated in part by this, Erdosand Lovasz considered simple hypergraphs (also called nearly-disjoint hypergraphs),wherein any two distinct edges intersect in at most one vertex [12]. Recall thefunction m�n� defined in the Introduction; let m∗�n� be the analog of m�n� whenwe restrict our attention to nearly disjoint n-uniform hypergraphs. It is shown in[12] that

��4n/n3� ≤ m∗�n� ≤ O�n44n�: (5)

(These results of [12] were pointed out to us by Alon and Kim.) This lower boundon m∗�n� has been further improved to 4n/n1+ε by Szabo [28], for any fixed ε > 0and all sufficiently large n. This result was pointed out to us by Beck.

Page 16: Improved bounds and algorithms for hypergraph 2-coloring

ALGORITHMS FOR HYPERGRAPH 2-COLORING 19

Thus, m∗�n� � m�n�. So, in order to make progress on our goal of improvingthe result of Section 2, we need to consider a restricted family of hypergraphs suchthat: (i) edge-intersections are “small,” and (ii) the family is rich enough so that therestriction of m�n� to the family is not much bigger than m�n�. This is what is donein the rest of this section.

Remark. Simple hypergraphs sometimes connote “hypergraphs with no repeatededges.” Throughout this paper, simple hypergraphs mean nearly disjoint hyper-graphs as mentioned above.

5.1. Definition and Theorems

Let F be a collection of subsets of some universe A. For the definitions below, wedo not assume that all elements of F are distinct, i.e., we allow F to be a multiset;however, when we construct hypergraphs, we will ensure that in the end all its edgesare distinct. For a ∈ A, let

dF�a� def= ∣∣�f ∈ F x a ∈ f�∣∣:Define

(Ft

)to be the (multi-)set of all t-element subcollections of F . Let

3�F� def= ∑a∈A

max�0; dF�a� − 1�

I �F� def= 23�F�

It�F� def= EH∈�Ft�

�I �H��: (6)

[In (6), the expectation is over a H chosen uniformly at random from(Ft

).]

Our interest in 3�F� stems from the equality∣∣∣∣⋃f∈F

f

∣∣∣∣ = (∑f∈F�f �)− 3�F�:

If the edges of F are disjoint, then 3�F� = 0, and It�F� = 1 for all t ≥ 1. SupposeF = �f1; f2; : : :� and that for some s and any i 6= j, �fi ∩ fj� ≤ s. Then, by inclusion–exclusion, �⋃f∈F f � ≥

∑f∈F �f � − s

(�F �2

); i.e.,

3�F� ≤ s(�F �

2

)y ∀t ≥ 1; It�F� ≤ 2s�t2�: (7)

Thus, I being “small” can be thought of some notion of “small pairwise intersec-tions.” We wish to consider hypergraphs whose edges do not, on an average, intersectmuch. We will use It�F� to formalize this notion.

Definition 5.1 (ε-almost-disjoint hypergraphs.). We say that a family of hypergraphs�Gn = �Vn;En�� is a family of uniform ε-almost-disjoint hypergraphs if Gn is n-uniform, and for all large n, there exists a t (2 ≤ t ≤ �ln n�1/3) such that

It�En� ≤ nεt−3: (8)

Page 17: Improved bounds and algorithms for hypergraph 2-coloring

20 RADHAKRISHNAN AND SRINIVASAN

So, rather than require all pairwise edge-intersections to be “small” (say, at most1), we just need edge-intersections to be “small on average,” in the sense definedabove. We will show that for almost-disjoint families of hypergraphs, there is acoloring algorithm that works even if more edges are allowed. First, we will see thatDefinition 5.1 captures a large enough family of hypergraphs, by showing that m�n�restricted to such families, for any fixed ε > 0, is still at most O�n22n�.

Theorem 5.1. For any fixed ε > 0, there is an infinite family �Gn� of uniform ε-almost-disjoint hypergraphs such that: (a) Gn has at most n22n edges, and (b) for allsufficiently large n, Gn is not 2-colorable.

We next show the main result of this section that complements Theorem 5.1.Theorem 5.2 shows that for ε-almost-disjoint families of hypergraphs, there is acoloring algorithm that works even if up to n1−ε2n edges are allowed. [From now on,whenever we claim that an algorithm 2-colors a hypergraph “with high probability”(whp), we just mean that the algorithm succeeds with probability lower bounded bysome positive constant. Since we can efficiently check if a coloring is a 2-coloring,such an algorithm can be repeated a sufficient number of times to drive down thefailure probability.]

Theorem 5.2. Let �Gn� be a family of uniform ε-almost-disjoint hypergraphs. Sup-pose Gn has at most n1−ε2n edges (ε > 0). Then, for all large enough n (i.e., n ≥ n�ε�),Gn is 2-colorable; there is a randomized polynomial-time algorithm that constructs sucha 2-coloring whp.

5.2. Proof of Theorem 5.1: A Random Family Is Almost Disjoint

The probabilistic construction of non-2-colorable n-uniform hypergraphs in [4, p. 8]proceeds as follows: take V �Gn� = n2/2, and for E�Gn� pick �e�ln 2�/4+ o�1��n22n

edges at random (with replacement, say, but note that the probability of picking thesame n-set in two different trials is negligible, and the hypergraph will whp haveno repeated edges). As usual, e here denotes the base of the natural logarithm.Then, with probability at least 3/4, the resulting random hypergraph Gn cannot be2-colored [4]. We will show that with probability at least 3/4 the hypergraph willbe almost-disjoint; thus, the “n1−ε” in Theorem 5.2 cannot be replaced by any termlarger than n2.

We define exp�x� := ex. We start with a useful claim.

Claim 5.1. For the random family �Gn� considered above, we have for all t ≥ 2 andfor all n ≥ 4 ln�2t� that E�It�E�Gn��� ≤ 2 exp�4t2�.

Proof. Let F = �f1; f2; : : : ; ft� be a random collection of n-subsets of Vn obtainedby choosing t subsets at random (with replacement). We will show that if n ≥4 ln�2t�, then

E�I �F�� ≤ 2 exp�4t2�: (9)

It will then follow, by linearity of expectation, that E�It�E�Gn��� ≤ 2 exp�4t2�.

Page 18: Improved bounds and algorithms for hypergraph 2-coloring

ALGORITHMS FOR HYPERGRAPH 2-COLORING 21

Let N def= �Vn�. Instead of computing I �F� directly, it will be easier to relate itto I �F ′�, for a slightly different family F ′ (for which the calculations are simpler).The family F ′ has t sets f ′1; f

′2; : : : ; f

′t , where f ′i is generated by picking each element

of the universe independently with probability p def= 2n/N = 4/n. If each set in F ′

has size at least n, pick a random n-sized subset of each; in this case, the resultingcollection F ′′ has the same distribution as F . Now,

E�I �F ′�� ≥ Pr[∀f ′ ∈ F ′ �f ′� ≥ n]× E

[I �F ′′� � ∀f ′ ∈ F ′�f ′� ≥ n]

= Pr[∀f ′ ∈ F ′ �f ′� ≥ n]× E�I �F��:

Hence

E�I �F�� ≤ E�I �F ′��/Pr�∀f ′ ∈ F ′ �f ′� ≥ n�: (10)

Now our claim will follow from (10), if we show the following:

E�I �F ′�� ≤ exp�4t2�y (11)

Pr�∀f ′ ∈ F ′ �f ′� ≥ n� ≥ 12 : (12)

First, consider (11). We have

E�I �F ′�� = E[23�F

′�] = E

[ ∏a∈Vn

2max�0; dF ′ �a�−1�]

= ∏a∈Vn

E[2max�0;dF ′ �a�−1�]: (13)

It thus suffices to bound E�2max�0; dF ′ �a�−1�� separately for each a. Fix a ∈ Vn. Then,

E[2max�0; dF ′ �a�−1�] = �1− p�t + t∑

j=1

2j−1(t

j

)pj�1− p�t−j

= [�1− p�t + �1+ p�t]/2

≤ [exp�−pt� + exp�pt�]/2

≤ exp�p2t2/2�:

[For the last inequality, compare the Taylor series of the two sides.] Then, by (13),we have

E�I �F ′�� ≤ exp(p2t2

2N

)≤ exp�4t2�;

thus establishing (11).It remains to show (12). For i = 1; 2; : : : ; t (see [4, p. 238,Theorem A.13])

Pr[�f ′i � < n] ≤ exp

(−n

2

4n

)≤ exp

(−n

4

):

Thus, Pr�∃f ′ ∈ F ′ �f ′� < n� ≤ t exp�− n4 � ≤ 1/2, since n ≥ 4 ln�2t�.

Page 19: Improved bounds and algorithms for hypergraph 2-coloring

22 RADHAKRISHNAN AND SRINIVASAN

Given any ε > 0, let n be sufficiently large. Let D be the event that all the edgesof Gn are distinct. It is easy to see that Pr�D� ≥ 9/10. It follows from Claim 5.1 that

E[It�E�Gn�� � D

] ≤ E�It�E�Gn���Pr�D� ≤ 20

9exp�4t2�:

Then, by Markov’s inequality we have, for each t (2 ≤ t ≤ �ln n�1/3),

Pr[It�E�Gn�� ≥ 100 exp�4t2��ln n�1/3 � D] ≤ 1

45�ln n�1/3 ;

and

Pr[∃t; 2 ≤ t ≤ �ln n�1/3x It�E�Gn�� > 100 exp�4t2��ln n�1/3 � D] ≤ 1

45:

Note that if n is sufficiently large as a function of ε, then 100 exp�4t2��ln n�1/3 �nεt−3 for any t ≤ �ln n�1/3. Thus, with probability at least 9

10 × 4445 >

34 , Gn has no

repeated edges and is ε-almost-disjoint in a strong sense: for all t, 2 ≤ t ≤ �ln n�1/3,it is true that It�E�Gn�� ≤ nεt−3.

5.3. Algorithm for Theorem 5.2

As before, let χ0 be the coloring obtained after the first random coloring phase.We say that an edge f ∈ E is almost-red in χ0 if: (1) f 6∈ M�χ0� and (2) f has atmost τ blue vertices (τ is a parameter to be chosen later). Let AR�χ0� be the set ofalmost-red edges with respect to χ0. Similarly, we define almost-blue and AB�χ0�. Inthe recoloring phase we pay special attention to the edges in AR�χ0� and AB�χ0�.

We will modify the algorithm used in the proof of Theorem 2.1. In the analysiswe present now, it is not important that the vertices be considered in a randomorder. So let us fix an ordering v1; v2; : : : of the vertices. Step i is now implementedas follows.

Step i. If in χi−1: (a) vi is the only red vertex of an edge in AB�χ0�, or (b) vi isthe only blue vertex of an edge in AR�χ0�, then skip vi. Otherwise, if some edge inM�vi; χ0� continues to be monochromatic in χi−1 and b�vi� = 1, then flip the colorof vi. Let the resulting coloring be χi.

As before, let χ∗ be the coloring obtained after all vertices have been considered.

5.4. Analysis of the Algorithm of Section 5.3

Fix a family �Gn� of uniform ε-almost-disjoint hypergraphs. Fix n large, and letG = �V;E� stand for the graph Gn = �Vn;En� of the family. Let �E�/2n ≤ k, wherek = n1−ε. Suppose t is the positive integer satisfying (8). We will show that theabove algorithm, with τ = t − 2, produces a proper coloring for G with probabilitylower-bounded by some positive absolute constant. Note that we can assume thatε < 2/3, for by Theorem 2.1, n-uniform hypergraphs with at most n1/32n edges are

Page 20: Improved bounds and algorithms for hypergraph 2-coloring

ALGORITHMS FOR HYPERGRAPH 2-COLORING 23

2-colorable. Recall that the bits b�v� were set to be 1 with probability p and 0with probability 1− p; we will take p = �2 lnk�/n. Let us bound the probability offailure of this algorithm. Suppose f is blue in χ∗ (the other case, when f is red, issimilar). We have three possibilities:

Case 0. f was red in χ0.

Case 1. f was blue in χ0.

Case 2. f was not completely red or blue in χ0, but was made blue during therecoloring process.

Note that this implies that f was not almost-blue in χ0, because the new recoloringphase never makes such edges blue.

We will now bound the probabilities of the three cases separately. We will showthat for all large enough n,

Pr�∃f Case0�f �� < 110 y (14)

Pr�∃f Case1�f �� < 110 y (15)

Pr�∃f Case2�f �� < 110 : (16)

It follows that Pr�M�χ∗� 6= Z� < 2�1/10 + 1/10 + 1/10� = 3/5; therefore, G has aproper 2-coloring that can be found whp using our algorithm.

5.4.1. Case 0. It is easy to see that the probability of this happening is at most�E�2−npn; for large n, this is less than 1/10, since p ≤ �2 ln n�/n and �E� ≤ n2n.Thus (14) holds.

5.4.2. Case 1. Suppose f was blue in χ0 and continued to be blue in χ∗. Let usexamine the events that led to this. Our algorithm attempted to change the colorsof vertices v ∈ f for which b�v� = 1. Thus, if f continued to be blue in χ∗, then itmust be that all these attempts failed. Let

Pivots�f � = {v ∈ f x b�v� = 1}:

We have two cases. First, it might be that not enough attempts were made to changethe color of vertices in f ; that is, Pivots�f � was very small—an extreme case of thisoccurs when Pivots�f � = Z. Second, it might be that a good number of attemptswere made, but each time the color of the vertex could not be flipped because ithappened to be the only blue vertex of some other edge that was almost red in χ0(see the revised recoloring step above). We bound the probabilities of these twocases separately. We, therefore, write

Pr�Case1�f �� ≤ �S1� + �S2�; (17)

where

�S1� = Pr[Case1�f � ∧ �Pivots�f �� ≤ t − 1

]y�S2� = Pr

[Case1�f � ∧ �Pivots�f �� ≥ t]:

Page 21: Improved bounds and algorithms for hypergraph 2-coloring

24 RADHAKRISHNAN AND SRINIVASAN

First, consider �S1�.

�S1� ≤ Pr[B�f; χ0� ∧ �Pivots�f �� ≤ t − 1

]= 2−n Pr

[�Pivots�f �� ≤ t − 1]

= 2−nt−1∑i=0

(n

i

)pi�1− p�n−i

≤ 2−n�1− p�n−tt−1∑i=0

(n

i

)pi

≤ 2−n�1− p�n−tt−1∑i=0

�np�i

≤ 2−n�1− p�n−t�np�t : (18)

Since p = �2 lnk�/n, t ≤ �ln n�1/3; and k = n1−ε, we have

�S1� ≤ 2−n

k3/2 : (19)

Now, we consider �S2�, that is, the probability that f remains blue even when atleast t attempts were made. It follows from our definition of recoloring that if anattempt at recoloring a certain vertex v ∈ Pivots�f � was unsuccessful, then v was thelast blue vertex of some edge f ′ ∈ AR�χ0�. This motivates the following definition.

Definition 5.2. For v ∈ f , we say that v is blocked by the edge f ′ if

(a) f ∩ f ′ = �v�;(b) b�v� = 1;(c) f ′ ∈ AR�χ0�;(d) for all blue (in χ0) vertices w of f ′ − �v�, b�w� = 1.

We then have the following claim.

Claim 5.2. If B�f; χ0� ∧B�f; χ∗� and v ∈ Pivots�f �, then v is blocked by some g ∈ E.

Note, in particular, that if edge g is held responsible for preventing the recoloringof vertex v ∈ Pivots�f �, then g ∩ f = �v�. In our case, not just one but t verticesare prevented from recoloring. Thus, there is a set of edges F = �f1; f2; : : : ; ft�;where each fi blocks a different vertex of Pivots�f �.

Definition 5.3. Let F be a set of t edges �f1; f2; : : : ; ft�, where each fi intersects fon exactly one vertex vi, and these t vertices are distinct. We say that F conspires againstf if

(i) f is blue in χ0.(ii) fi blocks vi, for i = 1; 2; : : : ; t.

Page 22: Improved bounds and algorithms for hypergraph 2-coloring

ALGORITHMS FOR HYPERGRAPH 2-COLORING 25

We then have the following analog of Claim 5.2.

Claim 5.3. If B�f; χ0� ∧ B�f; χ∗� and �Pivots�f �� ≥ t, then ∃F ∈ (Et

)such that F

conspires against f .

Thus,

�S2� ≤ ∑F∈�Et �

Pr�F conspires against f �: (20)

Fix F ∈ (Et

), such that each edge in F intersects f on exactly one element and

different edges in F intersect f on different elements. (If F does not have thisproperty then Pr�F conspires against f � = 0.) Let f1; f2; : : : ; ft be the elements ofF listed in some order. Let f0

def= f ; for i = 1; 2; : : : ; t, let fidef= fi −

⋃i−1j=0 fj . If F

conspires against f , then we must have b�w� = 1 for all vertices w ∈ fi that wereblue in χ0. We summarize our observations as follows: if F conspires against f , then

(C1) f is blue in χ0; and for i = 1; 2; : : : ; t,(C2) if fi ∩ f = �vi�, then b�vi� = 1;(C3) ∀w ∈ fi B�w;χ0� → b�w� = 1;(C4) fi has at most τ − 1 blue vertices in χ0.

It follows that

Pr�F conspires against f � ≤ 2−n × pt ×t∏i=1

τ−1∑j=0

(�fi�j

)pj2−�fj �: (21)

[Here the first factor is justified by (C1), the second by (C2), and the third by (C3)and (C4).] Let f ′i = fi − f , for i ≥ 1; note that �f ′i � = n− 1. Also let F ′ = �f ′i x 1 ≤i ≤ t�. It is easy to check that

t∑i=1

�fi� =∣∣∣∣ t⋃i=1

f ′i

∣∣∣∣ = t�n− 1� − 3�F ′� = t�n− 1� − 3�F�:

Also, since �fi� ≤ n, we have∑τ−1j=0

(�fi�j

)pj ≤ �np�τ. Thus (21) gives

Pr�F conspires against f � ≤ 2−n × pt × 2−t�n−1�+3�F� × �np�τt : (22)

Then, by (20) we have

�S2� ≤(�E�t

)EF

[2−npt2−t�n−1�+3�F��np�τt]

≤ kt2tn × 2−n2−t�n−1��np�τtpt EF�23�F��

= 2−nkt�np�τt�2p�tIt�E�:

Page 23: Improved bounds and algorithms for hypergraph 2-coloring

26 RADHAKRISHNAN AND SRINIVASAN

Since It�E� ≤ nεt−3, p = �2 lnk�/n, k ≤ n�1−ε�t ; and t; τ ≤ �ln n�1/3, we have for alllarge n

�S2� ≤ 2−nn�1−ε�t�2 ln n�t2(

4 ln nn

)tnεt−3

≤ 2−n

n2 :

Thus,

Pr[Case1�f �] ≤ �S1� + �S2� ≤ 2−n ×

[1k3/2 +

1n2

];

and, considering all possible f ,

Pr[∃f Case1�f �] ≤ 2√

k:

Since k = n1−ε, for large n this quantity is negligible; we have thus established (15).

5.4.3. Case 2.

Notation. In the following, let �`�r = `�`− 1� · · · �`− r + 1�.

Suppose Case 2 holds for f . As discussed before, since f is not almost-blue inχ0, it must have had at least τ + 1 red vertices in χ0. During the recoloring phaseall red (in χ0) vertices of f changed their color; hence, for each v ∈ S, there mustbe an edge fv ∈ E, such that v ∈ fv ∩ f and fv was red in χ0 and continued to be sowhen v was considered for recoloring; we say that fv was responsible for making vchange its color. (Note that an edge can be held responsible for at most one vertex.)Let T be a random �τ + 1�-sized subset of the red vertices of f ; then f blames theset of edges F = �fv x v ∈ T� for making it blue. That is, for each set f with at leastτ + 1 red vertices in χ0, we pick a random subset T = T �f � of those vertices; thesets T �f � are picked independently for each such edge f . Thus,

Pr[Case2�f �] ≤ ∑

F∈� Eτ+1�Pr�f blames F�:

We have already considered the situation when f was completely red in χ0 (thiswas Case 0); so in the sum above, we have a contribution only for Fs that do notcontain f . We will now estimate Pr�f blames F� for fixed f and F , where f 6∈ F .Let U = ⋃f ′∈F f ′. Consider the sequence of events that resulted in f blaming F .

1. All of U was colored red in χ0.2. Let R be the set of red vertices of f . Then, ∀w ∈ R; b�w� = 1. Also, U ∩ f ⊆R; let R1 = U ∩ f and R2 = R− R1. Let r1 = �R1� and r2 = �R2�.

3. Let T ′ = �v ∈ Rx fv ∈ F�; please see a few lines above for the definition ofthe fv. Then, for f to blame F , T ′ must coincide with the randomly chosen�τ + 1�-sized subset T of R.

Page 24: Improved bounds and algorithms for hypergraph 2-coloring

ALGORITHMS FOR HYPERGRAPH 2-COLORING 27

Using these observations, we get

Pr�f blames F� ≤ 2−�U � ×n−r1∑r2=0

(n− r1r2

)2−�f−U �pr1+r2

(r1 + r2τ + 1

)−1

= 2−�U∪f � ×n−r1∑r2=0

(n− r1r2

)pr1+r2

(r1 + r2τ + 1

)−1

:

Note that r1 ≥ τ + 1, and that the sum above is a decreasing function of r1. Thus,

Pr�f blames F� ≤ 2−�U∪f � ×n−�τ+1�∑r2=0

(n− �τ + 1�

r2

)p�τ+1�+r2

(�τ + 1� + r2τ + 1

)−1

≤ 2−�τ+2�n+3�F∪�f�� ×n−�τ+1�∑r2=0

(n− �τ + 1�

r2

)pτ+1+r2

(�τ + 1� + r2τ + 1

)−1

≤ 2−�τ+2�n+3�F∪�f���1+ p�n(

n

τ + 1

)−1

: (23)

For the last inequality, we used the fact that for any x ≥ 0,

q∑i=0

(q

i

)xi+r

�i+ r�r= 1�q+ r�r

q∑i=0

(q+ ri+ r

)xi+r

≤ 1�q+ r�r

q+r∑i=0

(q+ ri

)xi = �1+ x�

q+r

�q+ r�r:

[To derive (23) from this, set x = p, q = n− �τ+ 1�; and r = τ+ 1.] Summing overall f ∈ E and F ∈ ( E

τ+1

) �f 6∈ F�, we obtain

Pr[∃fCase2�f �] ≤ �E�(�E� − 1

τ + 1

)2−�τ+2�n�1+ p�n

(n

τ + 1

)−1

EF ′∈� Eτ+2�

�23�F ′��

≤ k2n(k2n

τ + 1

)2−�τ+2�n�1+ p�n

(n

τ + 1

)−1

Iτ+2�E�;

≤ kτ+4

�n�τ+1Iτ+2�E�; (24)

= kt+2

�n�t−1It�E�: (25)

To get (24), we substituted p = �2 lnk�/n. Since t ≤ �ln n�1/3, k = n1−ε, It�E� ≤nεt−3; and n is large, the right-hand side of (25) is less than n−ε. This establishes(16), and completes the proof of Theorem 5.2.

Page 25: Improved bounds and algorithms for hypergraph 2-coloring

28 RADHAKRISHNAN AND SRINIVASAN

5.5. A Local Version

We now use Theorem 4.1 with a modification of the analysis of Section 5.4, in orderto derive a “local version” generalization of Theorem 5.2 for hypergraphs with smalledge-intersections bounded by a constant a; recall that for such hypergraphs, wehave the inequality (7).

Theorem 5.3. For any fixed �a; ε� with ε > 0, let �Gn� be any family of uniformhypergraphs such that in Gn, any two distinct edges intersect in at most a vertices.Suppose further that Gn has overlap D ≤ n1−ε2n. Then, for all large enough n [i.e.,n ≥ N0�a; ε�], Gn is 2-colorable.

Proof. Suppose D ≤ k2n, where k = n1−ε. We may assume that ε ≤ 2/3, forotherwise we are covered by Theorem 4.2. We will use the algorithm of Section 5.3with p = �2 lnk�/n, t = �3/ε�, and τ = t − 2. As in Section 5.3, we will work with anarbitrary but fixed permutation v1; v2; : : : of the vertices, and consider the verticesin this order, when attempting to recolor.

As in Section 5.4, the analysis of the event “f is blue in χ∗” splits into the samethree cases: Case 0, Case 1, and Case 2.

The idea once again is to define a collection of “bad” events and show thatTheorem 4.1 applies to them. The following bad events, defined for each allowedchoice of F , capture the event that f is blue in χ∗:

• Z1�f �: R�f; χ0� ∧ Pivots�f � = f . This covers the event Case0�f �.• Z2�f �: B�f; χ0� ∧ �Pivots�f �� ≤ t − 1. This corresponds to the subcase of

Case1�f � whose probability was bounded using �S1� in the previous section.

• Z3�f; F�: B�f; χ0�, and F conspires against f . (Here F ∈ (E−�f�t

).) This cor-

responds to the subcase of Case1�f �, whose probability was bounded using (S2) inthe previous section.

• Z4�f; F�: f blames F . (Here F ∈ (E−�f�τ+1

).) This covers Case2�f �.

Similarly, we define analogous events Z′1�f �, Z′2�f �, Z′3�f; F�, and Z′4�f; F� for thecase of f becoming red in χ∗.

Clearly, for each edge f ,

Pr�Z1�f �� = Pr�Z′1�f �� ≤ 2−npn: (26)

Now, for events Z2 and Z′2 (18) gives

Pr�Z2�f �� = Pr�Z′2�f �� ≤ 2−n�1− p�n−t�np�t : (27)

For Z3 and Z′3, we have from (22), that

Pr�Z3�f; F�� = Pr�Z′3�f; F�� ≤ 2−npt2−t�n−1�+3�F��np�τt

≤ 2−npt2−t�n−1�+t�t−1�a/2�np�τt : (28)

Finally, for Z4 (23) gives

Pr�Z4�f; F�� = Pr�Z′4�f; F�� ≤ 2−�τ+2�n+�τ+2��τ+1�a/2enp(

n

τ + 1

)−1

: (29)

Page 26: Improved bounds and algorithms for hypergraph 2-coloring

ALGORITHMS FOR HYPERGRAPH 2-COLORING 29

The main observation once again is that there is not much dependence betweenthese events. All the events above, except Z4�f; F� and Z′4�f; F�, depend only onthe χ0 and b values of the vertices contained in either f or one of the elements ofF ; in the case of F4�f; F� and F ′4�f; F�, we need to know, in addition, the value ofthe random set T �f � to determine if these events hold (see conditions 3 in Case 2of the previous section). Thus, we can proceed as in Section 4. To illustrate this, wefirst note that each of the events E above, has at most ` = 1+ t = O�1/ε� edges asits arguments. Clearly, E depends on at most 2D` events of type Z1, Z′1, and on atmost 2D` events of type Z2, Z′2. How many events of type Z3�f; F� does E dependupon? Some argument f ′ of E must intersect either f or some element of F . Thereare at most ` choices for f ′; fix f ′. If f ′ intersects f , then there are at most Dchoices for f and once we fix f , there are at most

(Dt

)choices for F . Otherwise, f ′

intersects some element f ′′ of F : we can first choose f ′′ (at most D choices), thenchoose f (at most D choices), and finally choose the remaining t − 1 elements ofF (at most Dt−1 choices). So, E depends on at most O�`Dt+1� events of type Z3;similarly, E depends on at most O�`Dτ+2� events of type Z4.

Recall that k = n1−ε, D ≤ k2n, p = �2 lnk�/n, t = �3/ε�, τ = t − 2, and ` ≤O�1/ε�. With these values, one sees that

D`2−n(pn + �1− p�n−t�np�t) + `Dt+12−npt2−t�n−1�+t�t−1�a/2�np�τt

+ `Dτ+22−�τ+2�n+�τ+2��τ+1�a/2enp(

nτ+1

)goes to 0 as n increases. Thus, bounds (26), (29), (27) and (28), in conjunction withTheorem 4.1, complete the proof.

Recall the definition of m∗�n� from the first paragraph of Section 5. As an appli-cation of Theorem 5.3 we obtain the following corollary, giving a different proof ofSzabo’s result [28] that m∗�n� ≥ 4n/n1+ε.

Corollary 5.1. For any fixed ε > 0 and all sufficiently large n, m∗�n� ≥ 4n/n1+ε.

Proof. The following proposition was shown by Erdos and Lovasz [12].

Proposition 5.1 ([12]). Suppose every simple t-uniform hypergraph in which eachvertex lies in at most h�t� edges is 2-colorable. Then, m∗�n� ≥ �h�n− 1��2/n.

We reproduce the proof of [12] below, but before that let us see why this impliesthe corollary. By Theorem 5.3, for any constant ε > 0 and for all sufficiently largen, h�n� ≥ 2n/nε. On substituting this in the proposition above, we obtain m∗�n� ≥��4n/n1+2ε�. This implies the corollary.

Proof of Proposition 5.1. Let H be an n-uniform simple hypergraph which is not2-colorable. We wish to show that H must have many edges. Since H is n-uniform,

�E�H�� ≥ 1n

∑v∈V �H�

dH�v�: (30)

Page 27: Improved bounds and algorithms for hypergraph 2-coloring

30 RADHAKRISHNAN AND SRINIVASAN

Thus, it suffices to show that H has many vertices of high degree. For each e ∈E�H�, let ve be a vertex in e with maximum degree; that is, dH�ve� ≥ dH�w� for allw ∈ e. If there are several such maximum-degree vertices ve, choose one arbitrarily.

Consider the following hypergraph H ′, with V �H� = V �H ′� and

E�H ′� = {e− �ve� x e ∈ E�H�}:Clearly, H ′ is �n − 1�-uniform and simple. Since H is not 2-colorable, H ′ is not2-colorable. By the hypothesis of the proposition, there is a vertex v in H ′ withdH ′ �v� ≥ h�n− 1�. Let e′1; e

′2; : : : ; e

′h (h ≥ h�n− 1�) be the edges of H ′ incident on

v, and let e1; e2; : : : ; eh be the corresponding edges of H. Now, by the definition ofH ′, each ei has a vertex vi different from v, such that dH�vi� ≥ dH�v�. Since H issimple, vi 6= vj for i 6= j. We have thus obtained h distinct vertices each of degreeat least h. Since h ≥ h�n− 1�, the proposition follows from (30).

APPENDIX: EXPLOITING POSITIVE CORRELATION

Let A�f � be the event ABlue�f � ∨ ARed�f �. Then,

A�f � ≡ M�f; χ0� ∧(∀v ∈ f x b�v� = 0

):

Claim A.1. Pr�∃f ∈ E x A�f �� ≤ 1− �1− �1− p�n�2k.

Proof. We have

Pr�∃f ∈ E x A�f ��= 2−�V �

∑χx V→�Red;Blue�

Pr[∃f ∈ M�χ� ∀v ∈ f x b�v� = 0

]= 2−�V �

∑χx V→�Red;Blue�

(1− Pr�∀f ∈ M�χ� ∃v ∈ f x b�v� = 1�): (A.1)

Fix χx V → �Red;Blue�. It is easy to check using the FKG inequality [15] that wehave positive correlation:

Pr[∀f ∈ M�χ� ∃v ∈ f x b�v� = 1

] ≥ ∏f∈M�χ�

Pr[∃v ∈ f x b�v� = 1

]= (1− �1− p�n)�M�χ��:

Thus, by (A.1),

Pr[∃f ∈ Ex A�f �] ≤ 2−�V �

∑χx V→�Red;Blue�

(1− �1− �1− p�n�)�M�χ��

= 1− 2−�V �∑

χx V→�Red;Blue�

(1− �1− p�n)�M�χ��

= 1− Eχ0

[�1− �1− p�n��M�χ0��]≤ 1− �1− �1− p�n�E��M�χ0���y

Page 28: Improved bounds and algorithms for hypergraph 2-coloring

ALGORITHMS FOR HYPERGRAPH 2-COLORING 31

the last inequality follows from Jensen’s inequality, since, for any fixed a > 0,the function x 7→ ax is convex (as its second derivative ax�ln a�2 is nonnegative).Thus, since E��M�χ0��� = 2−n+1 · k2n = 2k, we have Pr�∃f ∈ Ex A�f �� ≤ 1 −�1− �1− p�n�2k.

ACKNOWLEDGMENTS

We thank Noga Alon, Ravi Boppana, Jeong-Han Kim, and Joel Spencer for theirencouragement and several valuable suggestions, which have substantially improvedthe quality of this work. We also thank Jozsef Beck, Devdatt Dubhashi, Alexan-der Russell, and Benny Sudakov for their helpful comments. The exposition of theBeck–Spencer approach in [4, 27] provided much of the inspiration for this work.We thank the referees for several suggestions; in particular, the analysis of Bop-pana’s algorithm, which is included in Section 2 of this version, was shown to us byone of the referees.

REFERENCES

[1] N. Alon, A parallel algorithmic version of the Local Lemma, Random Structures Algo-rithms 2 (1991), 367–378.

[2] N. Alon and Z. Bregman, Every 8-uniform 8-regular hypergraph is 2-colorable, GraphsCombin 4 (1988), 303–305.

[3] N. Alon, P. Kelsen, S. Mahajan, and H. Ramesh, Approximate hypergraph coloring,Nordic J on Computing 3 (1996), 425–439.

[4] N. Alon and J. H. Spencer, The Probabilistic Method, Wiley–Interscience Series, JohnWiley and Sons, Inc., New York, 1992.

[5] G. Andersson and L. Engebretsen, Better approximation algorithms for SET SPLIT-TING and NOT-ALL-EQUAL SAT, Inform Process Lett 65 (1998), 305–311.

[6] J. Beck, On 3-chromatic hypergraphs, Discrete Math 24 (1978), 127–137.[7] J. Beck, An algorithmic approach to the Lovasz Local Lemma, Random Structures

Algorithms 2 (1991), 343–365.[8] F. Bernstein, Zur Theorie der trigonometrische Reihen, Leipz. Ber. 60 (1908), 325–328.[9] H. Chen and A. Frieze, Coloring bipartite hypergraphs, Proceedings of the MPS Confer-

ence On Integer Programming Combinatorial Optimization, Lecture Notes in ComputerScience 1084, Springer-Verlag, Berlin, (1996), pp. 345–358.

[10] P. Erdos, On a combinatorial problem, I. Nordisk Mat. Tidskrift, 11 (1963), 5–10.[11] P. Erdos, On a combinatorial problem, II, Acta Math, Hungary, 15 (1964), 445–447.[12] P. Erdos and L. Lovasz, Problems and results on 3-chromatic hypergraphs and some

related questions, in Infinite and Finite Sets, A. Hajnal et. al., Eds., Colloq. Math. Soc.J. Bolyai 11, North Holland, Amsterdam, pp. 1975, 609–627.

[13] G. Even, O. Goldreich, M. Luby, N. Nisan, and B. Velickovic. Approximations of generalindependent distributions. Proceedings of the Twenty Fourth Annual ACM Symposiumon Theory of Computing, pp. 10–16, 1992.

[14] G. Even, O. Goldreich, M. Luby, N. Nisan, and B. Velickovic, Efficient approximationsfor product distributions, Random Structures Algorithms, 13 (1998), 1–16.

Page 29: Improved bounds and algorithms for hypergraph 2-coloring

32 RADHAKRISHNAN AND SRINIVASAN

[15] C. M. Fortuin, J. Ginibre, and P. N. Kasteleyn, Correlational inequalities for partiallyordered sets, Comm Math Phys, 22 (1971), 89–103.

[16] M. R. Garey and D. S. Johnson, Computers and intractability: a guide to the theory ofNP-completeness, W. H. Freeman and Company, New York, 1978 (printing updated in1991).

[17] T. R. Jensen and B. Toft, Graph coloring problems, Wiley–Interscience Series, JohnWiley & Sons, Inc., 1995.

[18] D. R. Karger, R. Motwani, and M. Sudan, Approximate graph coloring by semidefiniteprogramming, J ACM, 45 (1998), 246–265.

[19] M. Krivelevich and B. Sudakov, Approximate coloring of uniform hypergraphs, Pro-ceedings of the European Symposium on Algorithms, 1998, pp. 477–489.

[20] L. Lovasz, Covering and coloring of hypergraphs, Proceedings of the 4th SoutheasternConference on Combinatorics, Graph Theory and Computing, Utilitas MathematicaPublishing, Winnipeg, 1973, pp. 3–12.

[21] C. McDiarmid, A random recolouring method for graphs and hypergraphs, Combin,Probab Comput 2 (1993), 363–365.

[22] C. McDiarmid, Hypergraph colouring and the Lovasz Local Lemma, Discrete Math,167/168 (1997), 481–486.

[23] E. W. Miller, On a property of families of sets, C R Soc Sci Varsovie, 30 (1937), 31–38.[24] M. Molloy and B. Reed, Further algorithmic aspects of the Local Lemma, Proceedings

of the Thirtieth ACM Symposium on Theory of Computing, 1998, pp. 524–529.[25] J. Naor and M. Naor, Small-bias probability spaces: efficient constructions and applica-

tions, SIAM J Comput, 22(4) (1993), 838–856.[26] J. H. Spencer, Coloring n-sets red and blue, J Combinatorial Theory, Series A, 30

(1981), 112–113.[27] J. H. Spencer, Ten Lectures on the Probabilistic Method, SIAM, Philadelphia, 1987.

(Second edition published in 1994.)[28] Z. Szabo, An application of Lovasz’ local lemma—a new lower bound for the van der

Waerden number, Random Structures Algorithms, 1 (1990), 343–360.[29] C. Thomassen, The even cycle problem for directed graphs, J Amer Math Soc, 5 (1992),

217–229.