In theoretical computer science, the algorithmic Lovász local lemma gives an algorithmic way of constructing objects that obey a system of constraints with limited dependence.
Given a finite set of bad events in a probability space with limited dependence amongst the Ais and with specific bounds on their respective probabilities, the Lovász local lemma proves that with non-zero probability all of these events can be avoided. However, the lemma is non-constructive in that it does not provide any insight on how to avoid the bad events.
If the events are determined by a finite collection of mutually independent random variables, a simple Las Vegas algorithm with expected polynomial runtime proposed by Robin Moser and Gábor Tardos[1] can compute an assignment to the random variables such that all events are avoided.
See main article: Lovász local lemma.
The Lovász Local Lemma is a powerful tool commonly used in the probabilistic method to prove the existence of certain complex mathematical objects with a set of prescribed features. A typical proof proceeds by operating on the complex object in a random manner and uses the Lovász Local Lemma to bound the probability that any of the features is missing. The absence of a feature is considered a bad event and if it can be shown that all such bad events can be avoided simultaneously with non-zero probability, the existence follows. The lemma itself reads as follows:
Letbe a finite set of events in the probability space Ω. Forl{A}=\{A1,\ldots,An\}
letA\inl{A}
denote a subset of\Gamma(A)
such thatl{A}
is independent from the collection of eventsA
. If there exists an assignment of realsl{A}\setminus(\{A\}\cup\Gamma(A))
to the events such thatx:l{A} → (0,1)
\forallA\inl{A}:\Pr[A]\leqx(A)\prodB(1-x(B))
then the probability of avoiding all events in
is positive, in particularl{A}
} (1-x(A)).\Pr\left[\overline{A1}\wedge … \wedge\overline{An}\right]\geq\prodA
The Lovász Local Lemma is non-constructive because it only allows us to conclude the existence of structural properties or complex objects but does not indicate how these can be found or constructed efficiently in practice. Note that random sampling from the probability space Ω is likely to be inefficient, since the probability of the event of interest
\Pr\left[\overline{A1}\wedge … \wedge\overline{An}\right]
is only bounded by a product of small numbers
\prodA
and therefore likely to be very small.
Under the assumption that all of the events in
l{A}
l{P}
l{P}
l{A}
Hence, this algorithm can be used to efficiently construct witnesses of complex objects with prescribed features for most problems to which the Lovász Local Lemma applies.
Prior to the recent work of Moser and Tardos, earlier work had also made progress in developing algorithmic versions of the Lovász Local Lemma. József Beck in 1991 first gave proof that an algorithmic version was possible.[2] In this breakthrough result, a stricter requirement was imposed upon the problem formulation than in the original non-constructive definition. Beck's approach required that for each
A\inl{A}
|\Gamma(A)|<2n/48
|\Gamma(A)|<
2n | |
e |
,
This bound is known to be tight. Since the initial algorithm, work has been done to push algorithmic versions of the Local Lemma closer to this tight value. Moser and Tardos's recent work are the most recent in this chain, and provide an algorithm that achieves this tight bound.
Let us first introduce some concepts that are used in the algorithm.
For any random variable
P\inl{P},vP
(vP)l{P
The unique minimal subset of random variables in
l{P}
If the event A is true under an evaluation
(vP)l{P
(vP)l{P
Given a set of bad events
l{A}
l{P}
\forallP\inl{P}
vP\leftarrow
\existsA\inl{A}
(vP)l{P
A\inl{A}
\forallP\invbl(A)
vP\leftarrow
(vP)l{P
In the first step, the algorithm randomly initializes the current assignment vP for each random variable
P\inl{P}
The algorithm then enters the main loop which is executed until all events in
l{A}
Let
l{P}
l{A}
x:l{A}\to(0,1)
\forallA\inl{A}:\Pr[A]\leqx(A)\prodB(1-x(B))
then there exists an assignment of values to the variables
l{P}
l{A}
Moreover, the randomized algorithm described above resamples an event
A\inl{A}
x(A) | |
1-x(A) |
times before it finds such an evaluation. Thus the expected total number of resampling steps and therefore the expected runtime of the algorithm is at most
\sumA
The proof of this theorem using the method of entropy compression can be found in the paper by Moser and Tardos [1]
The requirement of an assignment function x satisfying a set of inequalities in the theorem above is complex and not intuitive. But this requirement can be replaced by three simple conditions:
\forallA\inl{A}:|\Gamma(A)|\leqD
\forallA\inl{A}:\Pr[A]\leqp
ep(D+1)\leq1
The version of the Lovász Local Lemma with these three conditions instead of the assignment function x is called the Symmetric Lovász Local Lemma. We can also state the Symmetric Algorithmic Lovász Local Lemma:
Let
l{P}
l{A}
l{P}
l{A}
Moreover, the randomized algorithm described above resamples an event
A\inl{A}
1 | |
D |
n | |
D |
The following example illustrates how the algorithmic version of the Lovász Local Lemma can be applied to a simple problem.
Let Φ be a CNF formula over variables X1, ..., Xn, containing n clauses, and with at least k literals in each clause, and with each variable Xi appearing in at most
2k | |
ke |
This statement can be proven easily using the symmetric version of the Algorithmic Lovász Local Lemma. Let X1, ..., Xn be the set of mutually independent random variables
l{P}
Firstly, we truncate each clause in Φ to contain exactly k literals. Since each clause is a disjunction, this does not harm satisfiability, for if we can find a satisfying assignment for the truncated formula, it can easily be extended to a satisfying assignment for the original formula by reinserting the truncated literals.
Now, define a bad event Aj for each clause in Φ, where Aj is the event that clause j in Φ is unsatisfied by the current assignment. Since each clause contains k literals (and therefore k variables) and since all variables are sampled uniformly at random, we can bound the probability of each bad event by
\Pr[Aj]=p=2-k.
Since each variable can appear in at most
2k | |
ke |
D=k\left(
2k | |
ke |
-1\right)\leq
2k | |
e |
-1
other events. Therefore:
D+1\leq
2k | |
e |
,
multiplying both sides by ep we get:
ep(D+1)\leqe2-k
2k | |
e |
=1
it follows by the symmetric Lovász Local Lemma that the probability of a random assignment to X1, ..., Xn satisfying all clauses in Φ is non-zero and hence such an assignment must exist.
Now, the Algorithmic Lovász Local Lemma actually allows us to efficiently compute such an assignment by applying the algorithm described above. The algorithm proceeds as follows:
It starts with a random truth value assignment to the variables X1, ..., Xn sampled uniformly at random. While there exists a clause in Φ that is unsatisfied, it randomly picks an unsatisfied clause C in Φ and assigns a new truth value to all variables that appear in C chosen uniformly at random. Once all clauses in Φ are satisfied, the algorithm returns the current assignment. Hence, the Algorithmic Lovász Local Lemma proves that this algorithm has an expected runtime of at most
n | ||||
|
steps on CNF formulas that satisfy the two conditions above. A stronger version of the above statement is proven by Moser,[3] see also Berman, Karpinski and Scott.[4]
The algorithm is similar to WalkSAT which is used to solve general boolean satisfiability problems. The main difference is that in WalkSAT, after the unsatisfied clause C is selected, a single variable in C is selected at random and has its value flipped (which can be viewed as selecting uniformly among only
k
2k
As mentioned before, the Algorithmic Version of the Lovász Local Lemma applies to most problems for which the general Lovász Local Lemma is used as a proof technique. Some of these problems are discussed in the following articles:
The algorithm described above lends itself well to parallelization, since resampling two independent events
A,B\inl{A}
\operatorname{vbl}(A)\cap\operatorname{vbl}(B)=\emptyset
Under the assumption that the assignment function x satisfies the slightly stronger conditions:
\forallA\inl{A}:\Pr[A]\leq(1-\varepsilon)x(A)\prodB(1-x(B))
for some ε > 0 Moser and Tardos proved that the parallel algorithm achieves a better runtime complexity. In this case, the parallel version of the algorithm takes an expected
O\left( | 1 |
\varepsilon |
log\sumA
steps before it terminates. The parallel version of the algorithm can be seen as a special case of the sequential algorithm shown above, and so this result also holds for the sequential case.