A Kolmogorov complexity proof of the Lovász Local Lemma for satisfiability

A Kolmogorov complexity proof of the Lovász Local Lemma for satisfiability

Theoretical Computer Science 461 (2012) 55–64 Contents lists available at SciVerse ScienceDirect Theoretical Computer Science journal homepage: www...

259KB Sizes 0 Downloads 19 Views

Theoretical Computer Science 461 (2012) 55–64

Contents lists available at SciVerse ScienceDirect

Theoretical Computer Science journal homepage: www.elsevier.com/locate/tcs

A Kolmogorov complexity proof of the Lovász Local Lemma for satisfiability✩ Jochen Messner ∗ , Thomas Thierauf Aalen University, 73430 Aalen, Germany

article

abstract

info

Keywords: Lovász Local Lemma Satisfiability Kolmogorov complexity

The Lovász Local Lemma provides a syntactic property that a Boolean formula is satisifiable. Moser and Tardos came up with a constructive proof of the lemma, i.e. the proof gives a method to actually construct a satisfying assignment. In this paper, we give another constructive proof of the lemma, based on Kolmogorov complexity. Actually, we even improve their result slightly. © 2012 Elsevier B.V. All rights reserved.

1. Introduction The Lovász Local Lemma applied to the satisfiability problem states that a k-CNF formula is satisfiable if each clause has common variables with at most 2k e

2k e

− 1 other clauses (see [19,9]). The bound on the clause neighborhood has been slightly re-

laxed to in [18]. The proofs in [19,18] are non-constructive: they provide no hint on how to efficiently compute a satisfying assignment of the given formula. Starting with a paper by Beck [3] there appeared a series of papers [1,21,15] that came up with constructive proofs of the lemma, but with stronger bounds on the clause neighborhood. Then Moser [16] made a big step ahead and came up with a randomized algorithm that finds a satisfying assignment if the neighborhood of each clause is bounded by 2k /8. In his conference talk on [16], Moser presented an ingeniously simple argument for this bound, which lends itself to presentation in terms of Kolmogorov complexity (see [7]). Thereafter, Moser and Tardos [14] improved this to the bound claimed by the k

Local Lemma from [19], 2e − 1, with a different proof that uses more complicated probabilistic arguments. The main contribution of this paper is to provide again a constructive proof for the Local Lemma via Kolmogorov complexity, in Section 4. Actually, we even improve Moser and Tardos’ result slightly and show in Section 5 the somewhat k

better bound 2 e−1 . Our method also applies to the more general conflicting neighborhood setting, also called the lopsided version, with the same bounds. In the next section we give a more detailed introduction to the Local Lemma for satisfiability. In Section 3 we introduce the concepts and tools we use, like Kolmogorov complexity, binary entropy bounds on binomial coefficients, and the number of d-ary trees. 2. The Lovász Local Lemma Throughout this paper, ϕ is a k-CNF formula with n variables and m clauses, where every clause has exactly k ≥ 2 variables. The variables of a clause are the variables that occur in a clause, positive or negative. A literal is a variable or the ✩ Work supported in part by the Indo-German DST-DFG program, DFG grant TH 472/4-1 and DST grant DST/CS/20100251.



Corresponding author. Tel.: +49 73615764195. E-mail addresses: [email protected] (J. Messner), [email protected] (T. Thierauf).

0304-3975/$ – see front matter © 2012 Elsevier B.V. All rights reserved. doi:10.1016/j.tcs.2012.06.005

56

J. Messner, T. Thierauf / Theoretical Computer Science 461 (2012) 55–64

negation of a variable. We define a dependence relation or neighborhood relation Γ = Γϕ on the clauses of ϕ as follows: for clauses C ̸= D,

(C , D) ∈ Γ if C and D have a common variable. We also consider the conflicting neighborhood relation or lopsided dependence relation Γ ′ = Γϕ′ ,

(C , D) ∈ Γ ′ if C has a literal whose negation occurs in D. We also write D ∈ Γ (C ) for (C , D) ∈ Γ , respectively D ∈ Γ ′ (C ) for (C , D) ∈ Γ ′ . The neighborhood graphs Gϕ and G′ϕ are given by the m clauses as nodes and Γ and Γ ′ as edges, respectively. Crucial parameters in the following are the maximum degrees dϕ = maxC |Γ (C )| and d′ϕ = maxC |Γ ′ (C )|. Clearly we have Γ ′ ⊆ Γ , and therefore d′ϕ ≤ dϕ . The Lovász Local Lemma roughly states that if Γ (resp., Γ ′ in the lopsided version) is not too dense then ϕ is satisfiable. We will consider only the symmetric version of the Lemma. In the symmetric Local Lemma the restriction on the density of Γ (resp., Γ ′ ) is given by an upper bound on the maximal degree dϕ (resp., d′ϕ ). Moreover the symmetric Local Lemma only applies to k-CNF formulas ϕ where every clause C has exactly k ≥ 2 variables. See [9] for a recent overview on the symmetric Local Lemma for satisfiability. Since we obtain the same bounds for dϕ and d′ϕ it suffices to present upper bounds that guarantee satisfiability for the lopsided version. Let us mention that the papers [19,18,14] also consider more general versions of the Lovász Local Lemma which are formulated in some probabilistic setting. The symmetric Local Lemma was introduced by Erdős and Lovász [5] with the bound dϕ ≤ 2k−2 . The generalization ′ dϕ ≤ 2k−2 to the conflicting neighborhood setting, the lopsided version, is due to Erdős and Spencer [6]. The version presented here uses the improved bound from [19] for dϕ , cf. [2]. It has been mentioned in [13] that one obtains the same bound for the lopsided dependence degree d′ϕ . Symmetric Local Lemma. Let ϕ be a k-CNF formula, d = d′ϕ . Then ϕ is satisfiable if

d  1 ≤ 2k . (d + 1) · 1 +

(1)

d

Often the symmetric Local Lemma is mentioned in its asymptotic version where Ineq. (1) is replaced by d≤

2k e

− 1,

(2)

where e denotes the Euler number. Notice that Ineq. (2) implies Ineq. (1), since (1 + 1/d)d is strictly increasing for d > 0 and approaches e from below as d → ∞. Moser and Tardos [14] obtained a constructive proof of the Local Lemma from [19]. From their result it follows that one can efficiently compute a satisfying assignment for ϕ provided that Ineq. (1) holds with d = d′ϕ . The algorithm to compute a satisfying assignment of a k-CNF-formula ϕ is randomized and goes as follows. Search(ϕ ) Pick a random assignment for the variables of ϕ while there is a clause in ϕ that is not satisfied do . Choose an unsatisfied clause C . Reassign the variables in C independently at random output the satisfying assignment. We can use any deterministic way to choose an unsatisfied clause in the while-loop, for example the smallest one according to some fixed ordering of the clauses. k

Clearly, there is a chance that Search(ϕ ) runs forever. However, if Ineq. (1) holds or, more relaxed, if d′ϕ ≤ 2e − 1, the expected running time is O(m) [14]. Moreover, when Search halts, it has computed a satisfying assignment. A very good exposition of this result with the bound formulated for d = dϕ is given by Spencer [20]. In Section 4 we show how to obtain Moser and Tardos’ result using a Kolmogorov complexity argument. In Section 5 we improve the bound and show that algorithm Search will still find a satisfying assignment for ϕ if we have the following weaker bound for d = d′ϕ

 d·

1+

1 d−1

d−1

≤ 2k − 1.

(3)

A similar observation as above shows that Ineq. (3) holds if 2k − 1

. (4) e This improvement provides a step towards a constructive proof of the optimal Local Lemma of Shearer [18]. Shearer’s Local Lemma allows the degree dϕ to be larger by 1 than in the version mentioned above. d≤

J. Messner, T. Thierauf / Theoretical Computer Science 461 (2012) 55–64

57

Optimal Symmetric Local Lemma. Let ϕ be a k-CNF formula, d = dϕ . Then ϕ is satisfiable if

 d·

1+

d−1

1 d−1

≤ 2k .

(5)

Again Ineq. (5) is implied by its asymptotic version 2k

. (6) e Shearer considers only the non-lopsided version. He also shows that the bound is optimal in the more general probabilistic setting. We note that Shearer’s proof can be generalized to the lopsided version, i.e. we can replace dϕ by d′ϕ in the optimal symmetric Local Lemma. d≤

k Let us also note that the new bound ⌊ 2 e−1 ⌋ is larger by one than the bound ⌊2k /e⌋ − 1 for infinitely many k. To see this, observe that



2k e

   k  1 2 + 1− ≥ +1 e

e

if a 1 appears in the binary expansion of 1/e at position k + 1 in the fractional part. Is further improvement possible? First, we hope that our observations provide some tools for a constructive proof of Shearer’s optimal Local Lemma. Second, notice that Shearer [18] proves optimality only in the more general probabilistic setting. So for the satisfiability problem improvements may be possible beyond the optimal Local Lemma. As far as we know, Ineq. (5) currently provides the largest known upper bound on dϕ to guarantee satisfiability. However, the optimality of the bound is not known for k ≥ 3. Trivially, the formula ϕ in k-CNF with k variables that contains all possible 2k clauses is unsatisfiable and we have dϕ = d′ϕ = 2k − 1 in this case. Therefore the bound d′ϕ ≤ 2 provided by Ineq. (5) is optimal for k = 2 to guarantee satisfiability. In fact this bound is also constructive since 2-SAT is efficiently solvable anyway. Using a construction from [8] it is shown in [10] that for some constant c there are unsatisfiable k-CNF formulas ϕ with dϕ ≤ 2k ( 1e + √c ). This shows that the factor 1/e in Ineq. (6) cannot be replaced by a larger constant factor to guarantee k

satisfiability. However there is still much room for improvement. Note that the constructions in [8,10] aim at bounds that are formulated in terms of asymptotic expressions in k so it is not immediately clear what they yield for small values of k. In Section 6 we briefly discuss that the construction in [8,10] will not yield unsatisfiable k-CNFs with d′ϕ < 2k − 1 for k = 3

and k = 4. On the other hand for k ≥ 5 there are unsatisfiable k-CNFs ϕ with dϕ = d′ϕ < 2k − 1. 3. Preliminaries

Kolmogorov Complexity. For an algorithm A that computes a function A : {0, 1}∗ → {0, 1}∗ and a fixed pairing function ⟨·, ·⟩ let KA (x | y) = min({|w| | A(⟨y, w⟩) = x} ∪ {∞}). Since there are at most 2l − 1 strings w ∈ {0, 1}∗ of length less than l, we have for any l ∈ R, all y ∈ {0, 1}∗ , and any set S ⊆ {0, 1}∗

|{x ∈ S | KA (x | y) ≥ l}| ≥ |S | − 2l + 1. This implies that for any c ∈ R

|{x ∈ S | KA (x | y) ≥ log |S | − c }| ≥ |S | − 2log |S |−c + 1 > (1 − 2−c )|S |.

(7)

In particular KA (x | y) ≥ |x| for some x ∈ {0, 1} (let c = 0 and S = {0, 1} ). It is known that there are (universal) algorithms U such that for every A there is a constant cA such that s

s

KU (x | y) ≤ KA (x | y) + cA . We fix such a U and denote KU (x | y) by K (x | y). Let us briefly write K (x | y, z ) instead of K (x | ⟨y, z ⟩). See, e.g., [12,4] for more details on Kolmogorov complexity. Binomials and Entropy. By h we denote the binary entropy, h(p) = −p log p − (1 − p) log(1 − p) for 0 < p < 1. We use ds following well known upper bound for s (see e.g. [17]). For d ≥ 2, and s ≥ 1

  ds s

< 2dh(1/d)s .

(8)

Notice that 2dh(1/d) =

dd

 =d· 1+

1

d−1

. (d − 1)d−1 d−1 For integral d ≥ 2 the above expression is non-integral

(9)

58

J. Messner, T. Thierauf / Theoretical Computer Science 461 (2012) 55–64 dd

Lemma 1. The fraction (d−1)d−1 is non-integral for d ≥ 2. Proof. Clearly gcd(d, d − 1) = 1. Therefore gcd(dd , (d − 1)d−1 ) = 1.  This shows that we can rephrase Ineq. (1) and Ineq. (3) using < instead of ≤ for k ≥ 2. Using Eq. (9) we can rewrite Ineq. (1) in the following form, that is sometimes more suitable. Lemma 2. For k ≥ 2 Ineq. (1) on page 56 is equivalent to

(d + 1) · h(1/(d + 1)) < k. The number of d-ary trees. An important tool in our argument below is an estimate on the number of d-ary trees with s nodes, denoted by Td (s). We consider here trees like in the usual computer science data structure for d-ary trees where each node has reserved d slots for its subtrees, and subtrees can be empty. For example, the number of d-ary trees with two nodes is Td (2) = d, and the number of trees with zero or one node is Td (0) = Td (1) = 1. Well known is the case of binary trees, i.e. when d = 2, where T2 (s) are the Catalan numbers, T2 (s) =

1 s+1

  2s . s

In general, Td (0) = 1 and for s > 0 the numbers Td (s) obey the recursion



Td (s) =

Td (s1 )Td (s2 ) · · · Td (sd ),

s1 +s2 +···+sd =s−1

because a d-ary tree has one node as root and the remaining s − 1 nodes are split into d subtrees of the root, where each subtree is again a d-ary tree. Td (s) is given by the Fuss–Catalan numbers (see [11]) Td (s) =

1

 

(d − 1)s + 1

s

ds

.

Actually we consider not only trees, but forests that consist of up to m d-ary trees (in m slots). Let us call this a (d, m)forest. The number Fd,m (s) of such forests with s nodes is given by Fd,m (s) =



Td (s1 )Td (s2 ) · · · Td (sm ).

s1 +s2 +···+sm =s

For example, the number of (d, m)-forests with one node is Fd,m (1) = m, because there are m (root-) slots where the node could sit. The following solution of this equation is given in [11] Fd,m (s) =

m



ds + m

ds + m s

 .

Using Ineq. (8) we have for d ≥ 2 and s, m ≥ 1 Fd,m (s) =

m ds + m



(d + m/s)s s



  (ds+m)h d+1m/s

<2

  (ds+m)h 1d

<2

.

(10)

4. The Kolmogorov complexity argument The core of the Kolmogorov complexity argument is to reconstruct the random bits used by Search using a description that is as small as possible. The size of this description will then give a bound on the running time of Search. 4.1. The LOG The sequence of clauses that is chosen by algorithm Search during the execution of the while-loop is called the LOG [14]. Clearly, the LOG depends on the random choices in each iteration. Also, the LOG could be an infinite sequence in the case that Search does not halt. Therefore we cut off the LOG after a finite number of iterations: let s ≥ 1 be some integer and assume that Search makes ≥s iterations, then the LOG up to this point is a sequence of clauses (C1 , . . . , Cs ). Note that Search consumes exactly n + ks random bits up to this point: n for the initial assignment and then k for each iteration. Lemma 3. Given the LOG (C1 , . . . , Cs ) and the assignment α after iteration s, we can reconstruct the random bits used by Search.

J. Messner, T. Thierauf / Theoretical Computer Science 461 (2012) 55–64

59

Proof. The random bits used by Search can be obtained by going backwards through the LOG, starting with Cs , and computing the assignments αi after iteration i. At the beginning, αs = α . Search chooses clause Ci in iteration i because Ci is violated before. Since clauses are disjunctions, there is precisely one assignment of the variables occurring in Ci that makes Ci false. Moreover, αi differs from αi−1 only in the values assigned to the variables in Ci . This uniquely describes αs−1 . Finally we get the assignment α0 at the beginning and, on the way, we have computed all the random bits used to reassign variables.  Our argument to show that the algorithm runs for less than s steps will essentially go as follows: There are n + ks random bits used in s iterations. The bits used in an actual run of the algorithm can be represented by the LOG of this run. Now assume that any possible LOG of s iterations can be represented by substantially less than ks bits, say α ks bits for some α < 1. Then Lemma 3 allows us to represent the n + ks bits used in s iterations by n + α ks bits, where encoding the assignment after iteration s needs n bits. This leads to a contradiction by a Kolmogorov complexity argument. Hence the assumption that the algorithm runs for at least s iterations was wrong, the algorithm must have stopped before. Currently we can represent the LOG as follows: fix an ordering of the m clauses. Then each clause is determined by its position i ∈ [m] in this ordering. Hence we can code the LOG with s log m bits, and an assignment can be encoded by n bits. Thus by Lemma 3 the random bits can be described with n + s log m bits, given ϕ . However, this encoding is still too long for our purpose. Using the approach described above it only implies that ϕ is satisfiable for m < 2k . A crucial observation is that the precise LOG is not needed: we call two clauses C and D independent if they have no opposite literals in common, i.e., (C , D) ∈ / Γϕ′ , and C ̸= D. We claim that when we permute the LOG by sequentially swapping independent pairs of neighboring clauses, we still can reconstruct the random bits used by Search. Lemma 4. Given a sequence of clauses (D1 , . . . , Ds ) obtained by starting with the LOG and swapping adjacent independent clauses several times, and the assignment α after iteration s, we can reconstruct the random bits used by Search as well as the original LOG. (j)

Proof. Let (C1 , . . . , Cs ) be the LOG and let αi

∈ {0, 1} denote the j-th assignment given to xi by Search, for 0 ≤ j ≤ si , where (s ) (0) si is the number of clauses in the LOG that contain xi . Hence αi is the initial assignment to xi , and αi i is the assignment to n (s1 ) (sn ) xi after iteration s. That is, (α1 , . . . , αn ) = α , and ks = i =1 s i . In the proof of Lemma 3 we went through the LOG backwards and computed the assignments in previous iterations. In (j) terms of the αi , what we did is to define (si −1)

αi

0,

if xi in Cs ,

1,

if xi in Cs .

 =

Then this step is repeated recursively on the LOG (C1 , . . . , Cs−1 ) with si − 1 instead of si . Now let us swap two independent clauses Cj and Cj+1 in the LOG, i.e. we consider the permuted LOG (C1 , . . . , Cj−2 , (j)

Cj , Cj−1 , Cj+1 , . . . , Cs ). Then the above reconstruction algorithm still produces the same values αi : this is obvious for the variables that occur in only one of the two clauses. If Cj and Cj+1 have variable xi in common, then we have (l−1)

αi

(l−2)

= αi

 =

0,

if xi in Cj and Cj+1 ,

1,

if xi in Cj and Cj+1 , (l)

where l is the number of times the variable xi appears in C1 , . . . , Cj , i.e. αi is the assignment to xi after iteration j. Note that it cannot be the case that xi in Cj and xi in Cj+1 or vice versa, since (Cj , Cj+1 ) ̸∈ Γϕ′ . (j)

Inductively, we can swap independent pairs of clauses several times and still get the same values αi for 1 ≤ i ≤ n, 1 ≤ j ≤ si . (j) To reconstruct the random bit string used by Search we start Search using the values αi for the successive assignments to the variables. Recall that the choice of the next clause in Search is deterministic. This yields the assignment to the clauses and in turn the random bits, and also the original LOG produced by the algorithm.  4.2. Witness forests From the LOG we will next define a witness forest (cf. the witness trees in [14]). Our final algorithm to reconstruct the random bits used by Search will have a coding of these witness forests as input. From the witness forest we will not directly get the LOG of Search, but a permutation of the LOG as described in Lemma 4. By Lemma 4, this suffices for our purpose. We construct the witness forest of a LOG (C1 , . . . , Cs ) iteratively by inserting Cj for j = 1, . . . , n into the initially empty forest. To insert Cj proceed as follows: (i) If there is a node in the forest labeled by a clause D ∈ {Cj } ∪ Γϕ′ (Cj ) then proceed as follows: Select a node in the forest with a label from {Cj } ∪ Γϕ′ (Cj ) that is at the lowest possible level in the forest. Then at this node add a child with label Cj . (ii) Otherwise create a new tree in the forest that consists of a node as root with label Cj .

60

J. Messner, T. Thierauf / Theoretical Computer Science 461 (2012) 55–64

The witness forest has the following important properties: 1. It is a (d + 1, m)-forest for d = d′ϕ : (i) there are at most m roots, one for each clause of ϕ , and (ii) each node has at most d + 1 children. The children of a node with label Ci have labels from {Ci } ∪ Γϕ′ (Ci ). Recall that d′ϕ = maxj |Γϕ′ (Cj )|. 2. If Cj ∈ {Ci } ∪ Γϕ′ (Ci ) and i < j then the node added for Cj is lower in the tree than the node added for Ci . 3. If Ci and Cj are in the same depth of the forest, then they are independent. Therefore, if we output the labels of the nodes by increasing depth in any order, we obtain a sequence (D1 , . . . , Ds ) of clauses that can be obtained from the LOG by swapping independent clauses. The next observation is crucial: there is no need to store the labels of the nodes, because we can compute the labels from the precise structure of the forest! For this, choose an arbitrary ordering of the clauses in ϕ . This induces an ordering in all the sets Γϕ′ (Ci ). Hence, in the witness forest, we can think of every node as having d + 1 slots reserved in a certain order, one for each child to come. That is, we can for example distinguish the tree with a node with label, say, C1 with a child with label C2 from the tree where the child of C1 has label C3 . Similarly, for the potential roots of the trees, we have m slots reserved. When Ci becomes the root of a tree, we put it at slot j, if j is the position of Ci in the ordering of all clauses. Therefore, if we know the precise structure of the forest, we can reconstruct the labels of the nodes. Since we can enumerate all (d + 1, m)-witness forests with s nodes we can encode a witness forest by its index in the enumeration which, by Ineq. (10), needs ⌈log Fd+1,m (s)⌉ < ⌈((d + 1)s + m)h(1/(d + 1))⌉ bits. Lemma 5. Given s and ϕ , and the index of a (d + 1, m)-witness forest representing the LOG and the assignment after iteration s we can reconstruct the random bits used by Search and the original LOG. Moreover if we assume the condition from Ineq. (1), the LOG can be represented with substantially less than ks bits. Lemma 6. Let d = d′ϕ , k ≥ 2, and let

 d 1 (d + 1) · 1 + ≤ 2k . d

Then there is an s0 = O(m) and some α < 1 such that for any s ≥ s0 a LOG of s iterations of Search can be represented by α ks bits, given s and ϕ . Proof. Let β =

(d+1)·h(1/(d+1)) k

Then we have for s ≥ s0 =

⌈log Fd+1,m (s)⌉ < = < =

. By Lemma 2, Ineq. (1) is equivalent to β < 1. Let α be such that β < α < 1, and let ϵ = α −β .

mh(1/(d+1))+1 ϵk

= O(m)

⌈((d + 1)s + m)h(1/(d + 1))⌉ ⌈β ks + mh(1/(d + 1))⌉ β ks + ϵ ks α ks

which is the bound we claimed.  4.3. Putting things together Now we have all the tools for the Kolmogorov complexity argument. Theorem 7. Let ϕ be a formula in k-CNF with m clauses and n variables, and let d = d′ϕ . Search finds a satisfying assignment for ϕ in expected time O(m) if



(d + 1) · 1 +

1

d

d

≤ 2k .

Proof. Assume that Search makes ≥s iterations of the while-loop. Fix a Kolmogorov random string w ∈ {0, 1}n+ks with K (w | ϕ, s) ≥ n + ks − c

(11)

for some constant c > 0, and let Search use the bits of w as its random bits. That is, the first n bits are used for the initial assignment and k bits each are used to replace the assignment of the clause variables in each iteration of the while-loop. Now let α < 1 and s0 = O(m) be given as in Lemma 6, and let s ≥ s0 (s will be determined below). By Lemma 5 we can construct w from the assignment after iteration s and a representation of the LOG for which α ks bits suffice by Lemma 6. Hence, for some constant cA > 0, K (w | ϕ, s) ≤ n + α ks + cA . Combined with Ineq. (11) this yields ks − c ≤ α ks + cA A ). This shows that the algorithm halts before this number of iterations and then outputs which is false for s ≥ max(s0 , (1−α) k a satisfying assignment.

c +c +1

J. Messner, T. Thierauf / Theoretical Computer Science 461 (2012) 55–64

61

Using Ineq. (7) it follows that Ineq. (11) holds for a fraction of 1 − 2−c of the possible strings w . Now assume that w is chosen at random by the algorithm and let S be the random variable denoting the number of iterations of Search. We have just shown that for any c ≥ 0





Pr S < max s0 ,

c + cA + 1



(1 − α)k

≥ 1 − 2−c .

(12)

Hence, at this point we can already conclude that Search finds a satisfying assignment with high probability in O(m) steps. We show next that this is also the expected time, i.e. E[S ] = O(m). c +1 Let K = (1 − α)k, s1 = max(s0 , AK ) E[ S ] =



Pr[S ≥ s]

s≥0

=



Pr[S ≥ s] +

0≤s
≤ s1 +





Pr[S ≥ s]

s≥s1

Pr[S ≥ s1 + s]

s≥0

= s1 +

 (1 − Pr[S < s1 + s]). s≥0

For s ≥ 0 define c = sK . Then s = Pr[S < s1 + s] ≥ 1 − 2

−c

c K

and Ineq. (12) implies

= 1 − 2−sK .

Therefore (since K > 0)

  (1 − Pr[S < s1 + s]) ≤ 2−sK = s≥0

s ≥0

and hence E[S ] ≤ s1 + 1−21−K = O(m).

1 1 − 2−K

= O(1),



5. An improvement In the previous section we said that the trees in the witness forest are (d + 1)-ary trees for d = d′ϕ , because the children of a node with label C can be from {C } ∪ Γϕ′ (C ), a set of size ≤ d + 1. However, by the construction of the trees, no node will actually have d + 1 children: if a node with label C has a child with label C this is its only child, because the labels of the other children would be dependent on C . Moreover, we can easily avoid the situation that a node with label C has a child with label C : this happens only when Search picks as the next random assignment for C the same assignment as it had before. We modify Search such that the chosen clauses will get satisfied. Modified-Search(ϕ ) Pick a random assignment for the variables of ϕ while there is a clause in ϕ that is not satisfied do . Choose an unsatisfied clause C . Choose a random i ∈ {1, . . . , 2k − 1} . Assign variables in C by the i-th satisfying assignment for C output the satisfying assignment. Note that Search and Modified-Search are essentially identical algorithms: if Search chooses an unsatisfied clause C and accidentally reassigns the variables such that C stays unsatisfied, it will choose C again in the next iteration, if, for example, the selection method chooses the minimal unsatisfied clause (according to some order on the clauses). In fact, this observation holds for any deterministic choice of the unsatisfied clause if the choice does not depend on the history. Now C will be repeatedly chosen until the reassignment satisfies C . The expected number of iterations until this happens is 2k /(2k − 1) ≤ 2. Then both algorithms again proceed the same way. Lemma 8. Let (C1 , . . . , Cs ) be the LOG of a run of Modified-Search over s iterations. Then in the witness forest constructed from (C1 , . . . , Cs ) no node will have a child with the same label. Proof. If a clause C is picked more than once in a run of Modified-Search we have C = Ci = Cj for some i < j. Let y be a literal in C that is satisfied after iteration i and consider the smallest l such that i < l ≤ j and either y or y is in Cl . Actually it cannot be the case that y is in Cl since the assignments in the iterations i, . . . , l satisfy y, and the algorithm only picks unsatisfied clauses. Thus y is in Cl and therefore l < j and Cl ∈ Γϕ′ (C ). This shows that in the constructed witness tree, the node added for Cj is lower in the tree than the one for Cl which is again lower than the one for Ci . So Cj is not a child of Ci . 

62

J. Messner, T. Thierauf / Theoretical Computer Science 461 (2012) 55–64

Reasoning similarly as in the previous section we obtain that a LOG of Modified-Search can be represented by a (d, m)forest. Since there are fewer (d, m)-forests than (d + 1, m)-forests, we can lower the assumptions needed in Lemma 6. Lemma 9. Let d = d′ϕ , k ≥ 2, and assume

 d·

1+

d−1

1 d−1

< 2l .

(13)

Then there is an s0 = O(m) and some α < 1 such that for any s ≥ s0 a LOG of s iterations of Search can be represented by α sl bits, given s and ϕ . Proof. Consider the proof of Lemma 6 with d + 1 replaced by d.  On the other hand, in s iterations Modified-Search uses random sequences w = w0 w1 , where w0 ∈ {0, 1}n and w1 ∈ {1, . . . , 2k − 1}s . Since there are only 2n (2k − 1)s such sequences we can just guarantee the existence of a w with K (⟨w⟩ | ϕ, s) ≥ n + s log(2k − 1), where ⟨·⟩ is a suitable binary encoding of these sequences. Therefore we can apply Lemma 9 only with l = log(2k − 1) and not l = k which would yield the optimal Local Lemma. We obtain the following improvement to Theorem 7. Theorem 10. Let ϕ be a formula in k-CNF with m clauses and n variables, and let d = d′ϕ . Search and ModifiedSearch find a satisfying assignment for ϕ in expected time O(m) if

 d·

1+

d−1

1 d−1

≤ 2k − 1.

(14)

Proof. Due to linearity of expectation, the expected number of iterations of Search on ϕ is 2k /(2k − 1) times the expected number of iterations of ModifiedSearch. Therefore it suffices to show that ModifiedSearch will find a satisfying assignment for ϕ with O(m) expected number of iterations. Assume that ModifiedSearch makes at least s iterations of the while-loop. Fix a random sequence w = w0 w1 , where w0 ∈ {0, 1}n and w1 ∈ {1, . . . , 2k − 1}s such that K (⟨w⟩ | ϕ, s) ≥ n + s log(2k − 1) − c .

(15)

d−1

Now let l = log(2 − 1). Since 2 is integral but d · 1 + d−1 is not for d ≥ 3 by Lemma 1, it follows that Ineq. (14) is equivalent to Ineq. (13). Note that for k = 2 the maximal solution of both inequalities is d = 1, and for k ≥ 3 the maximal solution is d ≥ 3. By Lemma 9 there is an α < 1 and s0 = O(m) such that for s ≥ s0 the LOG of a run of Modified-Search with s iterations can be represented by α l s bits. Now we proceed as in the proof of Theorem 7 with l = log(2k − 1) substituted for k and using Ineq. (15) instead of Ineq. (11).  k

l



1

6. Some remarks on unsatisfiable k-CNF formulas Let l(k) denote the maximum number l such that all k-CNF formulas ϕ with dϕ ≤ l are satisfiable. To the best of our knowledge, the symmetric Local Lemma from Shearer [18] provides the best known lower bound on l(k) (cf. the overview in [9]). Namely the optimal symmetric Local Lemma implies

    d−1  2k 1 ≤ 2k > . l(k) ≥ max d  d · 1 + d−1 e The best known upper bounds on l(k) are due to Gebauer et al. [8,10]. Note that every unsatisfiable k-CNF formula ϕ yields the upper bound l(k) ≤ dϕ − 1. A trivial upper bound is l(k) ≤ 2k − 2, because the formula ϕ in k variables that consists of all the 2k possible k-clauses is clearly unsatisfiable, and dϕ = 2k − 1. In [8,10], the construction of unsatisfiable formulas is based on special binary trees: a (k, d)-tree is a binary tree T such that (i) each inner node has two children, i.e., T is a full binary tree, (ii) every leaf of T has depth ≥k, and (iii) every subtree of T contains ≤d leaves of depth ≤k. Gebauer [8] shows that one can construct an unsatisfiable (k + 1)-CNF formula ϕ from a (k, d)-tree T such that d′ϕ = dϕ ≤ (k + 1)d.

(16)

Therefore is a (k, d)-tree. In [10] it is shown that there exist (k, d)-trees with d =   l(k+ k1) ≤ (k + 1)d − 1 if there 1  2 2 √1 + O . Hence we have l ( k ) ≤ + o(1) 2k . This shows that the 1e -factor in the Local Lemma is already the e k e k

optimal multiplicative factor. However for k = 3 and k = 4 this approach does not allow an improvement over the trivial bound 2k − 2: Proposition 11. For k ≥ 1 there is no (k, k)-tree.

J. Messner, T. Thierauf / Theoretical Computer Science 461 (2012) 55–64

63

Proof. Let T be a (k, d)-tree. Consider a node v of height k in T . The subtree rooted at v has ≥k inner nodes and therefore ≥k + 1 leaves of depth ≤k.  From a (2, d)-tree we can construct a 3-CNF formula ϕ such that dϕ = 3d, see Eq. (16). By Proposition 11 we have d ≥ 3, and hence, from a (2, 3)-tree we get a 3-CNF ϕ with dϕ = 9 which implies l(3) ≤ 8. But the trivial bound l(3) ≤ 23 − 2 = 6 is already better. Similarly, a (3, 4)-tree yields a formula ϕ such that dϕ = 16 by Eq. (16), which is larger than the dependence degree 15 of the trivial unsatisfiable formula. It is easy to see that (2, 3)-trees and (3, 4)-trees do exist. More significant is the existence of a (4, 6)-tree which yields an improvement on the trivial upper bound for l(5). Proposition 12. There is a (4, 6)-tree. Proof. Similar to [10] we label each node v of a full binary tree by a 5-tuple (t0 , t1 , . . . , t4 ), where ti is the number of leafs at depth i in the subtree rooted at v . For example a leaf has label (1, 0, 0, 0, 0). Now a full binary tree T is a (4, 6)-tree if the following two conditions hold 1. The root of T has label (0, 0, 0, 0, t4 ) for some t4 ≤ 6. 4 2. For any label (t0 , t1 , t2 , t3 , t4 ) of a node in T we have i=0 ti ≤ 6. The construction of a (4, 6)-tree proceeds bottom–up. We call a 5-tuple t = (t0 , t1 , t2 , t3 , t4 ) constructible if there is a full binary tree whose root has label t which fulfills Condition 2 above. For example the tuple (1, 0, 0, 0, 0) is constructible: just take T to be a leaf. We denote this tree by L. Given two trees S and T with root labels s = (s0 , s1 , s2 , s3 , s4 ) and t = (t0 , t1 , t2 , t3 , t4 ), we can join S and T by adding a new root node which is connected to the roots of S and T . We denote the new tree by S + T . The new root gets 3 label (0, s0 + t0 , s1 + t1 , s2 + t2 , s3 + t3 ) which is constructible provided that i=0 si + ti ≤ 6. As a short hand, we write 2T instead of T + T . For example 2L has root label (0, 2, 0, 0, 0). Table 1 Construction of a (4, 6)-tree. Tree

Root label

L 2L 3L 4L Q = 5L 2Q R = 2Q + L S = 2R 2S T = 3S 2T

(1,0,0,0,0) (0,2,0,0,0) (0,1,2,0,0) (0,1,1,2,0) (0,1,1,1,2) (0,0,2,2,2) (0,1,0,2,2) (0,0,2,0,4) (0,0,0,4,0) (0,0,0,2,4) (0,0,0,0,4)

Table 1 shows how to construct label (0, 0, 0, 0, 4) which corresponds to a (4, 6)-tree.  By the construction from [8] mentioned above, a (4, 6)-tree yields an unsatisfiable 5-CNF ϕ with d′ϕ = dϕ ≤ 5 · 6 = 30. We replace each clause Ci ∈ ϕ by two clauses Ci ∨ yi and Ci ∨ yi , where yi is a new variable for each clause. Thereby we obtain an unsatisfiable 6-CNF formula ϕ ′ with dϕ ′ ≤ 2 · 30 + 1 = 61. Now we iterate this procedure and get an unsatisfiable k-CNF formula ϕ with dϕ = d′ϕ ≤ 2k−5 · 31 − 1 ≤ 2k − 2 for all k ≥ 5. This shows that for k ≥ 5 we have an improvement on the trivial upper bound. Corollary 13. l(k) ≤ 2k − 3 for k ≥ 5. Acknowledgments We thank Patrick Scharpfenecker and Uwe Schöning for helpful discussions. References [1] [2] [3] [4] [5]

N. Alon, A parallel algorithmic version of the Local Lemma, Random Structures and Algorithms 2 (4) (1991) 367–378. N. Alon, J. Spencer, P. Erdős, The Probabilistic Method, Wiley, 1992. J. Beck, An algorithmic approach to the Lovász Local Lemma, Random Structures and Algorithms 2 (4) (1991) 343–366. C. Calude, Information and Randomness, Springer, 2002. P. Erdős, L. Lovász, Problems and results on 3-chromatic hypergraphs and some related questions, in: A. Hajnal, V. Sós (Eds.), Infinite and Finite Sets, North-Holland, 1975, pp. 609–627. [6] P. Erdős, J. Spencer, Lopsided Lovász Local Lemma and Latin transversals, Discrete Applied Mathematics 30 (1991) 151–154.

64

J. Messner, T. Thierauf / Theoretical Computer Science 461 (2012) 55–64

[7] L. Fortnow, A Kolmogorov complexity proof of the Lovász Local Lemma. Computational Complexity Blog, 2009. http://blog.computationalcomplexity.org/2009/06/kolmogorov-complexity-proof-of-lov.html. [8] H. Gebauer, Disproof of the neighborhood conjecture with implications to SAT, in: Proc. 17th Annual European Symp. on Algorithms, in: LNCS, vol. 5757, Springer, 2009, pp. 764–775. [9] H. Gebauer, R. Moser, D. Scheder, E. Welzl, The Lovász Local Lemma and satisfiability, in: Efficient Algorithms, in: LNCS, vol. 5760, Springer, 2009, pp. 30–54. [10] H. Gebauer, T. Szabó, G. Tardos, The Local Lemma is tight for SAT, in: 22nd ACM-SIAM Symp. on Discrete Algorithms, 2011, pp. 664–674. [11] R. Graham, D. Knuth, O. Patashnik, Concrete Mathematics, 2nd edition, Addison-Wesley, 1994. [12] M. Li, P. Vitányi, An Introduction to Kolmogorov Complexity and Its Applications, 3rd edition, Springer, 2008. [13] C. McDiarmid, Hypergraph coloring and the Lovász Local Lemma, Discrete Mathematics 167/168 (1997) 481–486. [14] R. Moser, G. Tardos, A constructive proof of the general Lovász Local Lemma, Journal of the ACM 57 (2) (2010) 11:1–11:15. [15] R.A. Moser, Derandomizing the Lovász Local Lemma more efficiently. Technical report, arXiv.org, http://arxiv.org/abs/0807.2120, 2008. [16] R.A. Moser, A constructive proof of the Lovász Local Lemma, in: 41th Symposium on Theory on Computing (STOC), 2009, pp. 343–350. [17] U. Schöning, Algorithmik, Spektrum, 2001. [18] J.B. Shearer, On a problem of Spencer, Combinatorica 5 (3) (1985) 241–245. [19] J. Spencer, Asymptotic lower bounds for Ramsey functions, Discrete Mathematics 20 (1977) 69–76. [20] J. Spencer, Robin Moser makes Lovász Local Lemma algorithmic!, 2010. http://cs.nyu.edu/spencer/moserlovasz1.pdf. [21] A. Srinivasan, Improved algorithmic versions of the Lovász Local Lemma, in: 9th ACM-SIAM Symp. on Discrete Algorithms, 2008, pp. 611–620.