Algorithm Search⌘K

Proofs: Lovász local lemma

These are the human proofs of Lovász local lemma, at full length.

The Moser-Tardos algorithm resamples each event A at most x(A)/(1 - x(A)) times in expectation

This proof shows: moser-tardos.

Statement. Let P\mathcal P be a finite set of mutually independent random variables, each of which the algorithm can sample. Let A\mathcal A be a finite set of events, and let each A∈AA \in \mathcal A be determined by the values of a set vbl(A)⊆P\mathrm{vbl}(A) \subseteq \mathcal P of variables. For A∈AA \in \mathcal A let Γ(A)\Gamma(A) be the set of events B∈AB \in \mathcal A with B≠AB \ne A and vbl(A)∩vbl(B)≠∅\mathrm{vbl}(A) \cap \mathrm{vbl}(B) \ne \emptyset, and let Γ+(A)=Γ(A)∪{A}\Gamma^+(A) = \Gamma(A) \cup \{A\}. Assume that there is a map x:A→(0,1)x : \mathcal A \to (0,1) with $$ \Pr[A] \le x(A) \prod_{B \in \Gamma(A)} \bigl(1 - x(B)\bigr) \qquad \text{for each } A \in \mathcal A. \tag{LLL} $$ Run MOSER-TARDOS (lines L1 to L5 of the main page) with a selection rule in line L3 that may use the run so far and extra independent randomness, but not samples that the run has not yet drawn. Let NAN_A be the number of times line L4 resamples the event AA. Then E[NA]≤x(A)/(1−x(A))\mathbb E[N_A] \le x(A)/(1 - x(A)) for each AA. So the expected number of resampling steps is at most ∑Ax(A)/(1−x(A))\sum_{A} x(A)/(1-x(A)), the algorithm stops with probability 1, and its output makes no event of A\mathcal A hold.

Setup.

  • The resampling table. For each variable P∈PP \in \mathcal P fix an infinite sequence P(0),P(1),P(2),…P^{(0)}, P^{(1)}, P^{(2)}, \ldots of independent samples of PP, all sequences independent of each other. The run takes the value of PP in line L1 from P(0)P^{(0)}, and each time line L4 needs a new sample of PP it takes the next unused entry. Each sample is fresh and independent of everything before it, so the run has the same distribution as the algorithm. With this table, the value of PP just before step ss is P(j)P^{(j)}, where jj is the number of steps s′<ss' < s that resampled an event CC with P∈vbl(C)P \in \mathrm{vbl}(C).
  • The log. Let C(1),C(2),…C(1), C(2), \ldots be the events resampled in steps 1,2,…1, 2, \ldots. The log is finite if the run stops.
  • Witness trees. A witness tree is a finite rooted tree whose vertices carry labels in A\mathcal A, such that each child of a vertex uu has a label in Γ+([u])\Gamma^+([u]), where [u][u] is the label of uu. It is proper if the children of each vertex have distinct labels. Two witness trees are the same if a bijection maps one to the other, keeps the root, the edges and the labels. Let TA\mathcal T_A be the set of proper witness trees whose root has label AA; it is countable.
  • The tree of step tt. Start with one root vertex with label C(t)C(t). Then for s=t−1,t−2,…,1s = t-1, t-2, \ldots, 1: if the tree has a vertex uu with C(s)∈Γ+([u])C(s) \in \Gamma^+([u]), take such a vertex uu of maximum depth (break ties in any fixed way) and attach to it a new child with label C(s)C(s); if no such vertex exists, skip ss. The result is τ(t)\tau(t). A witness tree τ\tau occurs in the log if τ=τ(t)\tau = \tau(t) for some tt. For a vertex vv of τ(t)\tau(t), let q(v)q(v) be the step that created it (q(root)=tq(\text{root}) = t) and d(v)d(v) its depth. The map qq is one to one.

The proof.

Step 1 (depth order). Let τ=τ(t)\tau = \tau(t) and let u,vu, v be vertices with q(u)<q(v)q(u) < q(v) and vbl([u])∩vbl([v])≠∅\mathrm{vbl}([u]) \cap \mathrm{vbl}([v]) \ne \emptyset. Then d(u)>d(v)d(u) > d(v). Indeed, the construction handles step q(v)q(v) before step q(u)q(u), so vv is in the tree when step q(u)q(u) is handled. The labels share a variable, so [v]∈Γ+([u])[v] \in \Gamma^+([u]), which is the same as [u]∈Γ+([v])[u] \in \Gamma^+([v]). So vv is a candidate, and the new vertex uu goes below a candidate of depth at least d(v)d(v). Hence d(u)≥d(v)+1d(u) \ge d(v) + 1.

Step 2 (consequences of Step 1). (a) Two distinct vertices of the same depth have labels with disjoint variable sets, because Step 1 gives different depths otherwise. (b) Each tree τ(t)\tau(t) is proper. Each label is an event that the run resampled, so it held at some moment. An event with no variables is constant, so it would hold always, and then Pr⁡[A]=1>x(A)\Pr[A] = 1 > x(A) contradicts (LLL). So each label has at least one variable, and two equal labels share it. Two children of one vertex have the same depth, so by (a) their labels share no variable, and hence they differ.

Step 3 (no step is lost). Let vv be a vertex of τ(t)\tau(t) and P∈vbl([v])P \in \mathrm{vbl}([v]). Each step s<q(v)s < q(v) with P∈vbl(C(s))P \in \mathrm{vbl}(C(s)) creates a vertex of τ(t)\tau(t). Indeed, when step ss is handled, vv is already in the tree, and C(s)C(s) and [v][v] share PP, so C(s)∈Γ+([v])C(s) \in \Gamma^+([v]) and the step is not skipped.

Step 4 (the τ\tau-check). Fix a witness tree τ\tau and an order of its vertices by decreasing depth (ties in a fixed way). The τ\tau-check visits the vertices in this order. At vertex vv it gives each P∈vbl([v])P \in \mathrm{vbl}([v]) the value P(iv(P))P^{(i_v(P))}, where iv(P)i_v(P) is the number of vertices ww visited before vv with P∈vbl([w])P \in \mathrm{vbl}([w]), and it tests whether [v][v] holds under these values. The check passes if [v][v] holds at each vertex. If vv is visited before v′v' and both use PP, then iv′(P)≥iv(P)+1i_{v'}(P) \ge i_v(P) + 1. So distinct vertices read distinct entries of the table. The values read at vv are independent samples of the variables in vbl([v])\mathrm{vbl}([v]), which are mutually independent in the original space, so [v][v] holds with probability exactly \Prv. The tests read disjoint sets of independent entries, so they are independent events. Hence $$ \Pr[\tau\text{-check passes}] = \prod_{v \in V(\tau)} \Prv. $$

Step 5 (coupling). Assume τ=τ(t)\tau = \tau(t) for some tt. We show that the τ\tau-check passes on the same table. Let vv be a vertex and P∈vbl([v])P \in \mathrm{vbl}([v]). By the setup, the value of PP just before step q(v)q(v) is P(j)P^{(j)}, where jj is the number of steps s<q(v)s < q(v) with P∈vbl(C(s))P \in \mathrm{vbl}(C(s)). By Step 3, these steps are exactly the q(w)q(w) of the vertices ww with q(w)<q(v)q(w) < q(v) and P∈vbl([w])P \in \mathrm{vbl}([w]), and qq is one to one, so jj is the number of such vertices. By Step 1, a vertex w≠vw \ne v with P∈vbl([w])P \in \mathrm{vbl}([w]) has d(w)>d(v)d(w) > d(v) if q(w)<q(v)q(w) < q(v) and d(w)<d(v)d(w) < d(v) if q(w)>q(v)q(w) > q(v). So jj is the number of vertices ww with P∈vbl([w])P \in \mathrm{vbl}([w]) and d(w)>d(v)d(w) > d(v). By Step 2(a) no vertex of depth d(v)d(v) other than vv uses PP, so the decreasing-depth order visits exactly these ww before vv, and j=iv(P)j = i_v(P). The algorithm resampled [v][v] at step q(v)q(v), and line L3 picks only an event that holds, so [v][v] holds under the values P(iv(P))P^{(i_v(P))}. This is the test of the τ\tau-check at vv. With Step 4, $$ \Pr[\tau \text{ occurs in the log}] \le \prod_{v \in V(\tau)} \Prv. $$

Step 6 (counting resamplings by trees). Let C(t)=AC(t) = A. Each step s<ts < t with C(s)=AC(s) = A creates a vertex of τ(t)\tau(t), because the root has label A∈Γ+(A)A \in \Gamma^+(A). Only such steps create vertices labelled AA. So τ(t)\tau(t) has exactly #{s≤t:C(s)=A}\#\{s \le t : C(s) = A\} vertices labelled AA, and two steps t<t′t < t' with C(t)=C(t′)=AC(t) = C(t') = A give different trees. By Step 2(b) these trees are in TA\mathcal T_A. So NA≤∑τ∈TA1[τ occurs]N_A \le \sum_{\tau \in \mathcal T_A} \mathbf 1[\tau \text{ occurs}]. Taking expectations (linearity of expectation, which holds for a countable sum of nonnegative terms) and using Step 5 and then (LLL): $$ \mathbb E[N_A] \le \sum_{\tau \in \mathcal T_A} \prod_{v \in V(\tau)} \Prv \le \sum_{\tau \in \mathcal T_A} \prod_{v \in V(\tau)} x'([v]), \qquad x'(B) = x(B) \prod_{C \in \Gamma(B)} \bigl(1 - x(C)\bigr). $$

Step 7 (a branching process). Consider this random process. Round 0 makes a root with label AA. In each later round, each vertex uu made in the previous round gets, for each C∈Γ+([u])C \in \Gamma^+([u]) independently, a child with label CC with probability x(C)x(C). The process makes a proper witness tree with root AA, or it never stops. Fix τ∈TA\tau \in \mathcal T_A. For a vertex vv of τ\tau let WvW_v be the set of labels in Γ+([v])\Gamma^+([v]) that no child of vv carries. The process yields exactly τ\tau when each vertex vv of τ\tau gets children with exactly the labels of its children in τ\tau. These choices use disjoint independent coins, so $$ p_\tau = \prod_{v \in V(\tau)} \Bigl( \prod_{\substack{u \text{ child of } v}} x([u]) \prod_{C \in W_v} (1 - x(C)) \Bigr). $$ Each vertex other than the root is the child of exactly one vertex. So the product of the factors x([u])x([u]) is ∏v≠rootx([v])=1x(A)∏vx([v])\prod_{v \ne \text{root}} x([v]) = \frac{1}{x(A)} \prod_{v} x([v]). Since τ\tau is proper, ∏C∈Wv(1−x(C))=∏C∈Γ+([v])(1−x(C))/∏u child of v(1−x([u]))\prod_{C \in W_v}(1-x(C)) = \prod_{C \in \Gamma^+([v])} (1 - x(C)) \big/ \prod_{u \text{ child of } v} (1 - x([u])), and the denominators multiply to ∏v≠root(1−x([v]))=11−x(A)∏v(1−x([v]))\prod_{v \ne \text{root}} (1 - x([v])) = \frac{1}{1 - x(A)} \prod_v (1 - x([v])). So $$ p_\tau = \frac{1 - x(A)}{x(A)} \prod_{v} \frac{x([v]) \prod_{C \in \Gamma^+([v])} (1 - x(C))}{1 - x([v])} = \frac{1 - x(A)}{x(A)} \prod_{v \in V(\tau)} x'([v]), $$ because Γ+([v])\Gamma^+([v]) holds [v][v] itself, whose factor cancels the denominator.

Step 8 (the sum). Distinct trees τ∈TA\tau \in \mathcal T_A are disjoint outcomes of one run of the process, so ∑τ∈TApτ≤1\sum_{\tau \in \mathcal T_A} p_\tau \le 1. With Steps 6 and 7, $$ \mathbb E[N_A] \le \frac{x(A)}{1 - x(A)} \sum_{\tau \in \mathcal T_A} p_\tau \le \frac{x(A)}{1 - x(A)}. $$

End. Summing over the finitely many events, the expected total number of resampling steps is at most ∑Ax(A)/(1−x(A))<∞\sum_A x(A)/(1 - x(A)) < \infty. A random variable with finite expectation is finite with probability 1, so the run stops with probability 1. It stops only when the loop test of line L2 fails, that is, when no event of A\mathcal A holds. In particular such an assignment exists. ∎

Back to Lovász local lemma