We bounded around factorial in corollary 1.5.5. We can derive a tighter lower bound from following lemmas.
For any integer , by concavity of ,
Since , and we have the following from lemma 1.6.1
which completes the proof by exponenting over on both sides. ∎
By lemma 1.5.4 and lemma 1.6.2, we have
By corollary 1.6.3, we have
Since , then we have
which completes the proof. ∎
For , .
∎
Immediate from lemma 1.6.5, for ,
Immediate from lemma 1.6.5, for ,
Let be independent random variables uniform over . Show that there exists a positive constant such that, for sufficiently large ,
Let , , and . Let be the event when .
Let be a positive constant. By conditional probability (similar to lemma 1.5.38),
where by Chernoff bound.
We continue by conditional probability, that
Event is equivalent to when . Therefore,
By ,
peaks at giving . On the other hand, by lemma 1.6.4, the following is immediate
By corollary 1.6.6, for , we have .
Choose sufficiently small such that for all , then
which completes the proof. ∎
Let be independent random variables uniform over , and let each be either or . Show that there exists a positive constant such that, for sufficiently large ,
We claim that either the are inbalanced, that ; or they are balanced. WLOG let .
For the inbalanced case, let . By linearity of expectation, . Since are independent, by Hoeffding’s bound
as . Since , then for ,
the inbalanced base is proved.
Now for the balanced case, we reuse the structure and notion in 1.6.8 (the same window argument) that
By ,
where peaks at .
On the other hand, by corollary 1.6.6 and corollary 1.6.7, the max of is still , completing the proof. ∎
A family of subsets of is called an antichain if there is no pair of sets and in satisfying .
Let be the number of sets in with size . Show that
Argue that for any antichain .
We start choosing a random permutation of . Let if the first numbers in the permutation yield a set in , and let . Then is at most 1 by antichain property, as no larger subset containing all prior elements, and can be 0 as no element in exists on the random enumeration starting from 0.
Therefore, for a , when we are iterating over all permutations, if a sized subset is in , we will encounter permutations containing such subset, and we derive
as a permutation can have at most 1 element in , and the first result is immediate.
Since for all , then
∎
For random variable with , and .
Let be 0-1 random variables, with for some integer and . Then for all , ; for all , .
Let be 0-1 random variables, with for some integer and . Then
Consider an SAT instance with clauses and each clause has exactly literals. Give a Las Vegas algorithm that finds an assignment satisfying at least clauses, and its expected runtime. Give a derandomization of the randomized algorithm using the method of conditional expectation.
For a -literal SAT clause, it is satisfied with probability . Let be the 0-1 random variable indicating if the clause is satisfied, and be the random number of satisfied clauses. By linearity of expectation, .
The Las Vegas algorithm searching for assignment satisfying at least clauses works by keep sampling assignments in time, and checks if the assignment satisfies sufficient number of clauses in time.
By lemma 1.6.14, .
The expected number of sampling is at most , and the expected runtime is .
Let there be variables for the SAT instance, be a random permutation of , and be the choice of the variable. The derandomized algorithm from conditional expectation wants to prove
the right hand side is the number of satisfied clauses after all are decided. We prove by induction as follows.
The base case is immediate by symmetry.
The intermediate step can be shown by conditional expectation, as
We can greedily choose the next that satisfies more clauses.
The step greedy algorithm suffices to find an assignment satisfying at least clauses by our analysis. ∎
Prove that for every integer , there exists a 2-coloring of the edges of so that the total number of monochromatic is at most , and show the following
A randomized algorithm to find a coloring with at most monochromatic in expected poly time in .
A deterministic polynomial time algorithm to find such a coloring by derandomization.
There are copies of in a , and a is 2-colored monochromatic with probability .
Let be the 0-1 random variable indicating the being monochromatic, and be the number of monochromatic in . By linearity of expectation, . Hence, the existence of 2-coloring with at most monochromatic is immediate by the expectation argument.
We can keep randomly sampling 2-coloring until we see at most copies of monochromatic .
By lemma 1.6.14, .
The expected sampling time is at most , and expected runtime is .
Let be the edge’s color choice among all edges. The derandomized algorithm wants to show
right hand side is the number of monochromatic after fixing all vertices’ colors. We prove by induction as follows.
The base case is immediate by symmetry.
The intermediate step can be shown by conditional expectation, as
We can greedily choose the next that bring less monochromatic .
The step greedy algorithm suffices to 2-color with at most monochromatic by our analysis. ∎
Given a -vertex undirected graph, consider the following method of generating an independent set. Given a permutation of , define as follows: for each vertex , if and only if no neighbor of precedes in the permutation .
Show , where denotes the degree of vertices.
Prove that has an independent set of size at least .
Given a random , the resulting has each vertex with no neighbors, which is an independent set.
Let be 0-1 random variables indicating if the vertex is the first among all its neighbors, and is the random variable for . The vertex is the first among all neighbors and itself with probability . Therefore, by linearity of expectation, .
The existence of an independent set at least large is immediate by the expectation argument. ∎
We have shown using the probabilistic method that, if a graph has nodes and edges, then there exists a partition of the nodes into 2 sets such that at least edges cross the partition. Improve this result slightly: show that there exists a partition such that at least edges cross the partition.
The result derive from 2-coloring the vertices each with probability , and same color vertices goes to the same set. In this way, edges with two ends colored differently are included in the cut, with a probability of . Existence of cut with at least edges is immediate by linearity of expectation and the expectation argument.
On the other hand, vertices can be partitioned into sets with and vertices each, and improve by the expectation argument. Let the event of choosing 2 vertices with different colors be , the probability is
When even, the probability is .
When odd, the probability is .
By linearity of expectation, the expected size of the cut is . Hence, the existence of a cut with at least is immediate by the expectation argument. ∎
A -cut is a partition of the vertices into disjoint sets, and the value of a cut is the weight of all edges crossing from one of the sets to another. Show that any graph with edges has a -cut with value at least . Show how to use derandomization to deterministically find such a cut.
We assign one out of the colors to each of the vertices with probability . The probability of 2 vertices having same color is , and therefore an edge being included into a -cut has probability .
By linearity of expectation, the expected -cut size is . Hence, the existence of -cut with size at least is immediate by the expectation argument.
When it comes to the derandomized deterministic algorithm for finding a -cut that is larger than , we let be the sets of partitioned vertices, and we write for size of the -cut. We pick an arbitrary emulation of all vertices , and write for each vertex’s color choice. We prove by induction for
where the right hand side is the -cut size determined by the derandomized algorithm, where the color choices are , hence the algorithm gives a cut whose size is at least .
The base case is immediate by symmetry.
The intermediate step
can be shown by conditional expectation, that
In fact, we greedily find the next without computing all conditional expectations on ’s choice. We choose the such that contribute most edges to the -cut. Equivalently, we put to the partition with the fewest ’s colored neighbors, such that introduces most -cut edges with colored neighbors.
This steps greedy searching algorithm suffices to determine a -cut at least large by our analysis. ∎
A tournament is a graph on vertices with exactly one directed edge between each pair of vertices. If vertices represent players, then each edge can be thought of as the result of a match between the two players: the edge points to the winner. A ranking is an ordering of the players from best to worst (ties are not allowed). Given the outcome of a tournament, one might wish to determine a ranking of the players. A ranking is said to disagree with a directed edge from to if is ahead of in the ranking.
Prove that, for every tournament, there exists a ranking that disagrees with at most of the edges.
Prove that, for sufficiently large , there exists a tournament such that every ranking disagrees with at least of the edges in the tournament.
Fix a tournament, and let be the 0-1 random variable indicating if a random ranking disagrees with the of all edges of the tournament, then is the total number of disagreement.
For any unordered pair , each ordering is equally likely in a random ranking. Therefore, . By linearity of expectation,
By the expectation argument, there exists a ranking disagreeing at most of the edges, proving the first part.
Fix a ranking. Let be the random variable for the number of disagreement with a random tournament, and be the 0-1 random variable indicating if the ranking disagrees with the edge of the random tournament.
Let the fixed ranking be the among all ranking, and let be the event that the fixed ranking has at most of disagreement against a random tournament, namely , where . Since are independent, we can use concentration inequality like Chernoff bound to upper bound the lower tail of as follows
Union bounding over all rankings yields
and the bound is less than 1 if is sufficiently large. Thus, for a tournament, the probability of existing a ranking permutation with at most disagreement is strictly less than 1. Hence,
∎
A Hypergraph , where is the set of vertices and is the set of hyperedges, and every hyperedge in is a subset of . In particular, -uniform hypergraph is one where the size of each hyperedge is . A standard graph is a 2-uniform hypergraph. A dominanting set in a hypergraph is a set of vertices such that for every , namely hits every hyperedge in .
Let and , show that there is a dominanting set with size at most for .
Given a hypergraph with and , we first sample across with each vertices to be chosen with probability , then check if any hyperedges are not covered, choose a vertex from each of the hyperedge. The sampling stage has expected chosen vertices , leaving expected unchosen hyperedges to be fixed. ∎
Prove that, for every integer , there is a way to 2-color the edges of such that there is no monochromatic cliques of size when
We start 2-coloring , keep removing vertices and attached edges until there is no monochromatic .
Let each edge in be 2-colored with probability , and let be the 0-1 random variable indicating the being monochromatic. There are ’s in a , hence is the number of monochromatic ’s in the .
For a , the probability of being monochromatic is as it can be one of 2 colors. By linearity of expectation,
By expectation argument, there exists a 2-coloring such that .
To modify up to no monochromatic , we can remove a vertex and the attached edges in each , therefore we need to remove at most vertices from . Since there exists a 2-coloring for containing at most ’s, then there exists a 2-coloring with no monochromatic for that .
“no monochromatic ” is a monotonely decreasing graph property, therefore any subgraph of such 2-colored has this property. Therefore, a in this has no monochromatic , which completes the proof. ∎
Let be a random variable, then
Since
which is immediate by Chebyshev’s inequality. ∎
For integer valued non-negative random variable , by Markov’s inequality.
For random variables and (that may not be independent),
Let , then the second moment of is
which holds for any . Minimizing over , and we have . ∎
For random variable with , , and if and only if , by theorem 1.6.26
For random variable ,
Let if and only if , then by theorem 1.6.26 and corollary 1.6.27,
and the last inequality holds by non-negativity of . ∎
A weaker version of theorem 1.6.28 is in 1.3.10. We can relax non-negative to .
For random variable with finite , and . Then
Let if and only if , and if and only if , then
and therefore . By theorem 1.6.26 and corollary 1.6.27, we have
Hence, the result is immediate by
∎
The theorem 1.6.30 can be relaxed from non-negative to .
Prove a threshold for the existence of triangles in the . Let each be the random value for the triangle appearing in the graph among the triplets of vertices, and let .
Show , and show if , then .
Show .
Show that for pairs of triangle triplets , otherwise .
Show .
Show if then .
By linearity of expectation, . If , then .
For variance, we have .
For covariance, when the triplets overlap up to 1 vertex, no edges are shared, and , hence . Otherwise, when 2 vertices are shared, , and there are in total csaes.
Let be the 0-1 random variable for the existence of the among all possible , and let . By 1.3.1,
We know , and among all possible , if ,
If there are no vertex overlap, then with probability .
If there is 1 vertex overlapped, then with probability .
If there are 2 vertices overlapped, then with probability .
If there are 3 vertices overlapped, then with probability .
If there are 4 vertices overlapped, then it has to be with probability 1.
By summation,
therefore,
hence
When , by lemma 1.6.25, that .
Let be 0-1 random variables, and . Then
Let when , and 0 otherwise. Then , and
where the first equality holds from 1.3.1, and the last inequality holds from theorem 1.2.5. ∎
Previous 1.6.33 case can be solved with theorem 1.6.34 by
When , both and are , while the others are , proving the second part of the proof.
Consider the problem of whether graphs in have of constant size . Suggest a threshold function and generalize the argument for using either theorem 1.6.24 or theorem 1.6.34, to prove that your threshold function is correct for .
We reuse notions in 1.6.33, let be the random variable for the existence of the in , and let . We guess the threshold , which balances both the dominanting numerator and denumerator terms in theorem 1.6.34, and convert into constant for lemma 1.6.25.
When , by linearity of expectation, . By lemma 1.6.25, .
When , we apply the theorem 1.6.34. Among all possible , conditioned that ,
If there are no vertex overlap, then with probability .
If there is 1 vertex overlapped, then with probability .
If there are 2 vertices overlapped, then with probability .
If there are 3 vertices overlapped, then with probability .
If there are 4 vertices overlapped, then with probability .
If there are 5 vertices overlapped, then it has to be the with probability 1.
By summation,
Since and are , while all other terms are , therefore by theorem 1.6.34, . ∎
Consider with . Use theorem 1.6.24 or theorem 1.6.34 to prove that if then, for any constant and for sufficiently large, the graph has isolated vertices with probability at least .
Let be random variable for the vertex being isolated in the graph, and .
By theorem 1.6.34, among vertices, conditioned that ,
If a vertex is not the vertex, it has probability to be isolated.
Otherwise, the vertex is isolated with probability 1 by conditioning.
By summing,
Since , which is as , therefore by theorem 1.6.34,
which approaches if . ∎
Consider a graph in where . Let be the number of triangles in the graph. Show that
and that
There are triangles in , while a triangle exists with probability . Let be the set of 0-1 random variables indicating if the triangle exists in the graph, then . By linearity of expectation,
On the other hand, by lemma 1.6.25
which completes the proof for the first part.
On the other hand, by theorem 1.6.34 we have
For all possible triangles,
If there are no vertex overlap, then triangles with probability .
If there are 1 vertex overlap, then triangles with probability .
If there are 2 vertex overlap, then triangles with probability .
If there are 3 vertex overlap, then 1 triangle with probability 1.
Summing, we have
When , and , which proves the second part. ∎
We attempted 1.6.8 from theorem 1.6.30, which is inspired by [AS16] to use the second/fourth moment method, just to avoid the bounding over binomial coefficients, but it did not bound as good.
Let be independent Bernoulli trials from even coins, each be , and . Since is symmetric over 0, then event is equivalent to .
For random variable , we want to prove for some constant , which fits theorem 1.6.30:
The second moment is .
The fourth moment is .
Therefore, even when by Paley-Zygmund theorem 1.6.30, which is too loose.
The symmetric Lovász Local Lemma requires that the bad events are all upper bounded by a probability , and each bad event depends on at most others.
By definition, an event is mutually independent of , if for any subset ,
Onwards, we denote for , and for .
A dependency graph for events is a graph , such that is independent of the events . The degree of the dependency graph is the maximum degree of any vertex in the graph.
Let be a set of events, and the following holds:
for all ,
The degree of the dependency graph given by is at most ,
,
then .
The proving strategy is proving by induction the following lemma for all possible .
For all with , we have both following being true
We prove by induction over all possible .
When , this is vacuously true.
When , let . Then . For :
If and mutually independent, namely , then
Otherwise , then
where the last inequality holds as , meaning .
WLOG let , , and . Supposing the lemma holds for with , then for ,
where the lower bound follows immediately from the induction hypothesis.
Alternatively, we have
where the last inequality holds from induction hypothesis.
Let such that , , and . If , then is mutually independent of ,
Otherwise, by Bayes’ rule,
For numerator, since is mutually independent of by the dependency graph, we have
For denumerator,
where the first inequality holds from union bound, the second inequality holds from the induction hypothesis, and by the degree of the dependency graph, and the last inequality holds from the lemma’s requirement. Hence, . ∎
Since lemma 1.6.42 holds for any , which finishes the proof immediately. ∎
Use lemma 1.6.41 to show that, if
then it is possible to 2-color the edges of so that it has no monochromatic subgraph.
Let be the bad event that the being monochromatic.
To upper bound the dependency degree , we can pick an edge from the , then uniformly randomly sample the rest of the vertices from all possible vertices. Hence
The probability of being monochromatic is . Therefore by lemma 1.6.41, if
then it is possible to 2-color edges such that there is no monochromatic . ∎
The symmetric Lovász Local Lemma lemma 1.6.41 works best when all events are upper bounded equally, and the dependency degrees are also upper bounded equally. The asymmetric Lovász Local Lemma has likely or rare events, where likely events have smaller dependency degrees, while rare events could depend on many other events.
Onwards we denote for all the neighbors of in the dependency graph.
Let be a set of events. If in has
then
The proving strategy is similar to lemma 1.6.41 by introducing following lemma for all possible .
For all with , we have both following being true
We prove by induction over all possible .
When , this is vacuously true.
When , let . Then
For ,
If and are mutually independent, namely , then
Otherwise , then
where the second inequality holds from .
WLOG let , , and . Supposing the lemma holds for any with , then for ,
which is immediate from induction hypothesis. Alternatively, the same procedure in remark 1.6.43 applies.
Let such that , , and . If , then is mutually independent of ,
Otherwise, by Bayes’ rule,
For numerator, since is mutually independent of by the dependency graph, we have
For denumerator, let , , and , then
where the first inequality holds from induction hypothesis, and the second inequality holds from . Hence . ∎
Since lemma 1.6.46 holds for any , we finish the proof. ∎
For integer ,
is monotone decreasing and lower bounded by .
Let , then the first order derivative
Let , then .
Since for all , then , is monotone decreasing. As , . ∎
Use the asymmetric LLL lemma 1.6.45 to show we can improve the symmetric LLL lemma 1.6.41 by replacing the condition to .
is directly applied in lemma 1.6.41, and the weakened condition is immediate. ∎
Spencer proved this strengthened result in [Spe77].
Let be an undirected graph and suppose each is associated with a set of colors, where . Suppose, in addition, that for each and , there are at most neighbors of with lies in . Prove that there exists a coloring of assigning to each vertex a color from such that, for any edge , the color assigned to and are different. Hint: use to be the event that and are both colored with , then consider the family of such events.
Let be the random number for vertex ’s color, and , then .
Let be a neighboring vertex of , since is also associated with a set of colors, then , as might not be in . Therefore,
For the dependency graph formed by events , fixing a color and an edge , the event is dependent on all where either or . Since has at most colors, and at most neighbors may share colors with , therefore the dependency graph degree by symmetry on side.
A -uniform hypergraph is an ordered pair , but edges consist of sets of (distinct) vertices, instead of just 2. (So a 2-uniform hypergraph is just what we normally call a graph.) A hypergraph is -regular if all vertices have degree ; that is, they are in hypergraph edges.
Show that for sufficiently large , the vertices of a -uniform, -regular hypergraph can be 2-colored so that no edge is monochromatic. What’s the smallest value of you can achieve?
We form a dependency graph for events of a hypergraph edge being monochromatic. Since the hypergraph is -regular, then each vertex is appearing in hypergraph edges. Excluding the hypergraph edge we are discussing, there are other hypergraph edges for the vertex, and therefore the dependency graph degree .
On the other hand, a -uniform hypergraph edge is monochromatic with probability .
We can try lemma 1.6.41 and by , then .
We can also try the Spencer result in 1.6.48 that , then .
∎
Consider a -SAT formula with clauses, where is an even constant, and each variable appears in up to clauses for a sufficiently small constant , then there is an algorithm finding a satisfying assignment for the formula in expected polynomial time in .
Let be the variables, and be the clauses.
The algorithm has 2 phases: some variables are fixed in the first phase, and the remaining variables are deferred to the second phase. During the first phase variable fixing, a clause is considered dangerous if is not yet satisfied, and variables in the clause have been fixed.
In the first phase, the algorithm iterates through all variables, if the variable is not in any dangerous clause, assign it independently and uniformly a value from .
After the first phase, a clause is surviving if it is not yet satisfied, and such surviving clause has no more than variables fixed. A deferred variable is a variable not yet fixed in the first phase. In phase 2, we use exhaustive search to assign values to the deferred variables and so to complete a satisfying assignment for the formula.
The algorithm assigns a subset of variables in the first phase, and the remaining variables are deferred to the second phase. The subset of variables with values assigned in the first phase are chosen such that
By the Local Lemma, the random partial solution fixed in phase 1 can be extended to a full satisfying assignment without modifying any phase 1 variable assignments.
The dependency graph defined by the deferred variables in phase 2 is with high probability containing small connected subcomponents.
When the dependency graph consists only of small connected subcomponents, a solution for the variables of one component can be found independently of the other components. Therefore, such 2 phase algorithm first breaks the problem into smaller subproblems, and each smaller subproblem can be solved independently with exhaustive search in the phase 2.
We introduce following 2 lemmas for the 2 points in the prior remark.
There is an assignment to the deferred variables such that all the surviving clauses are satisfied.
Let be the dependency graph on nodes, where , and if and only if . is the dependency graph for the original problem. Let be the dependency graph with , , with if and only if is a surviving clause, and if and only if and share deferred variables.
Since a surviving clause has at least deferred variables, then the satisfying probability is at most . On the other hand, a variable appears up to clauses, then the degree of the dependency graph is .
By symmetric Local Lemma lemma 1.6.41, given constant that is sufficiently small, if , there exists an assignment that all surviving clauses are satisfied. ∎
All connected components in are of size with probability .
We start by bounding the probability of a given clause surviving phase 1. For a given node, it is dangerous with probability at most , that exactly variables in phase 1 are fixed but the clause is not satisfying. A clause is surviving, either itself is dangerous, or it is sharing at least a deferred variable with a dangerous clause, namely it is neighboring a dangerous clause in . Union bounding over the clause and its neighbors in , which is at most the dependency graph degree , a given node surviving phase 1 with probability at most .
The survival of individual clauses are not independent of each other, as 2 neighboring surviving clauses share at least a deferred variable. We consider a connected component of vertices, then we identify a subset of vertices in such that the survival of the clauses represented by these vertices are independent events.
A 4-tree of a connected component in is defined as follows:
is a rooted tree.
Any 2 nodes in is at least distance in .
There can be an edge in only between 2 vertices of distance exactly 4 between them in .
Any node in is either in or in distance at most 3 from a node in .
The motivation of introducing 4-tree is that, for any 2 clauses on , the survival of the clauses are independent. Since any 2 neighboring clauses are of distance exactly 4 in , if both and are surviving, the clause causing to survive is at least distance 2 in from the clause causing to survive. If 2 clauses are at least distance 2 in , they are not sharing any variables, and their survival are surely independent. Supposing the survival of a large 4-tree is with low probability, this implies the survival of a large connected subcomponent with low probability.
For a 4-tree to survive, the probability is at most . For a clause in a 4-tree, there are at most
clauses in that are within distance 3. Immediate by the expectation argument, there exists a 4-tree in with such that .
The next step is to union bound over all possible sufficiently large 4-tree, such that we can derive an upper bound for the probability of existence of a sufficiently large 4-tree. A crude way to upper bound the number of 4-trees is, for each root, traverse the 4-tree in Euler cycle by visiting each path in 2 directions. There are at most number of traversals by picking a vertex every 4 vertices until vertices are picked, over roots.
The union bound is
when for a sufficiently large constant and a sufficiently small constant , the bound is . ∎
Therefore, the proof is immediate by lemma 1.6.54 and lemma 1.6.55, that phase 1 partitions the problem into subproblems with variables with probability , then we just need to run constant number of times of phase 1 before we obtain a good partition. ∎
We now discuss the constructive proof by Moser [Mos09]. A simpler version was presented in his STOC’09 talk, which was based on the entropy compression argument. The following analysis follows the “entropy compression” idea, which appears explicitly in his doctoral thesis [Mos12] (see the “Incompressibility” section), rather than being the primary framing in the STOC’09 paper.
At the core of the “entropy compression” argument, it is arguing that the algorithm’s expected runtime must be small, otherwise we are able to compress the random bits used by the algorithm significantly.
We begin with a useful fact on the incompressibility of random strings.
For injective , if , then for any integer ,
There are in total binary strings of length at most , while there are possible inputs in . Hence, if , then the probability of outputting at most bits is at most . ∎
There are binary strings of length at most , and the average length is
Therefore, the expected compression length over is lower bounded by .
For a -SAT formula with clauses, and each clause shares variables with at most other clauses. Then a satisfying assignment can be found in expected polynomial time in .
The “entropy compression” argument is rather clean in the specific setting of -SAT.
We let be the variables, be the clauses, be the set of indices of clauses sharing variables with the clause , be the inclusive neighborhood , and be the set of indices of variables in .
Informally, the algorithm picks a uniformly random assignment, then look for an unsatisfied . If such exists, we sample a new assignment for the variables in uniformly at random. Doing so may fix , but it may end up unsatisfying for some . The algorithm recursively fix the neighboring clauses, and by the end of the recursion, is satisfied with no neighboring clauses damaged. Therefore, the situation is improved by satisfying at least 1 previously unsatisfied clause. Iterating through all clauses, the algorithm finishes the fixing.
This leads to the question that when will the recursion stop, and is solved by the “entropy compression” argument. We describe the algorithm formally as follows, and bound the expected runtime.
The Moser’s algorithm has 2 functions: solve and local-fix.
solve
Sample a uniformly random variable assignment for .
While there is unsatisfied
Choose the unsatisfied with the smallest .
Enter into the execution log with bits.
Call local-fix on the clause .
local-fix
Sample a uniformly random variable assignment for .
While there is such that is unsatisfied
Choose the unsatisfied with the smallest .
Enter “0” together with in bits into the execution log.
Call local-fix on the clause .
Enter “1” into the execution log.
There are 2 distinct ways of describing how the algorithm works.
We can think of the algorithm as being described by the random string of bits it used. It takes bits for the initial variable assignment at random, then it takes bits to resample variables for a clause each time local-fix is called. We refer to each time local-fix is called as a round. Hence, a way to describe the algorithm’s action for rounds is with the random strings of bits used by the algorithm.
We can also think of the algorithm as being described as the history, the bits in its execution log. It includes the list of clauses called in the main routine and recursion of local-fix. For recursion, the log starts with a bit 0 and ends with a bit 1 to mark the start and the end of of recursion calls. For the index of the clause in the recursion call, we use bits instead of bits, as . The bits of final variable assignments are also included in the history, serving as an updatable state: each time a clause’s variables being resampled, the state is updated. Hence, the output execution log for the algorithm’s action for rounds takes at most , as a round of clause variable resampling outputs bits: 2 bits for start/end marking, and bits for clause index.
Given resampling bits used by the algorithm, and bits of output execution log, we can view the algorithm as a compression algorithm over random bits. We now show how to recover the resampling bits from the execution log. The execution log determines a sequence of clauses visited by the algorithm, and each visited clause must be unsatisfied before resampling. Only 1 setting of variables unsatisfy a clause. Hence, we work backwards from the final variable assignments. On each clause, we update with unsatisfying variable assignment, such that we know the resampling variables, and therefore we recover the bits of resampling bits.
After proving the compression is injective, now we use the compression argument to bound the expected runtime. Let be the random variable for the number of rounds in the algorithm. The algorithm takes uniformly random bits as inputs, outputting at most bits of history. By 1.6.57,
and when ,
Therefore, can be bounded as follows
Therefore, the expected runtime of the algorithm is . ∎
In the -Satisfiability Algorithm using the algorithmic Lovász Local Lemma, we used bits in history to represent each clause called in the main routine. Instead, we could record in the history which clauses are initially unsatisfied with an array of bits. Explain any other changes to the algorithm to properly record a history that one can “reverse” to obtain the initial assignment, and explain how this allows one to modify the proof of theorem 1.6.58 so that only rounds are needed in expectation.
Observing each run of local-fix, the subroutine visits an unsatisfied clause, resamples its variables, then fix neighboring unsatisfied clauses recursively. The invariant is, all of the visited clauses and their neighboring clauses are satisfied by the end of the recursion.
If we put bits for the initially unsatisfied clauses, then we know the first unsatisfied clause visited by local-fix. We maintain a list of satisfied clauses by the first call to the local-fix, update the bits for unsatisfied clauses, and move on to the remaining unsatisfied clause with smallest index. Repeating times, we have a full list of visited clauses from history.
Therefore, we use bits in history for visited unsatisfied clauses from the main routine rather than , and therefore replacing all appearances of in the argument, we have the expected runtime being . ∎
The Algorithmic Lovász Local Lemma by Moser and Tardos [MT10] states that: in the variable-based LLL setting, an LLL existence proof is automatically (Las Vegas) constructive via resampling, with expected polynomial runtime. We describe the asymmetric algorithmic LLL, and the symmetric algorithmic LLL follows from 1.6.48.
Let be a set of events in arbitrary probability space that are determined by mutually independent random variables , and let be the dependency graph for the events. Suppose there are in such that for ,
then there exists an assignment such that holds, and a resampling algorithm whose expected number of resampling in finding an assignment is at most . Hence, the expected runtime is at most .
Let be a set of events in arbitrary probability space that are determined by mutually independent random variables , and let be the dependency graph for the events. Supposing the degree of is at most , for , and , then there exists an assignment such that holds, and a resampling algorithm whose expected number of resampling in finding an assignment is at most . Hence, the expected runtime is at most .
The Moser-Tardos algorithmic LLL is even simpler than Moser’s -SAT algorithm, and the algorithm is described as follows. Onwards we say each event as bad events, and the algorithms avoids all the bad events, eventually.
Moser-Tardos
Sample a uniformly random variable assignments for .
While there is happening
Randomly pick an happening .
Resample all determines this .
We define as the execution log, where the algorithm has rounds of resampling over events , and each is an index for events . At the core of the argument is the construction and analysis of a witness tree from resampling each event in the execution log.
A witness tree is constructed from execution log as follows.
Let be the root.
Let be a witness tree from , and let goes backwards from to .
If for some , then add as the children of the deepest occurrence of such event.
If do not share variables with any event in , then drop and move on by .
Eventually, .
The following facts are immediate by the construction of the witness tree.
For any events and sharing variables, they are appearing in the same depth of a witness tree.
A variable is not appearing twice in the same depth of a witness tree.
Intuitively, a witness tree is a tree justifying how we end up selecting to resample all variables in .
We introduce an additional fact, that the witness trees from different prefixes of an execution log are different.
For execution logs of length and of length , the execution trees and are different.
Let the roots from and be and .
If , then by root. Otherwise, has at least one more occurrence of , resulting in . ∎
Hence, the next lemma for counting the occurrence of resampling in is immediate by 1.6.65.
Let be the random variable of occurrence of resampling in , and be the 0-1 random variable indicating the witness tree from , the prefix of , has root . Then
Moreover, let be the set of witness trees rooted by , then by linearity of expectation,
We want to bound . We say appears in , if for constructed from some prefix of . Hence, fixing a , since are all distinct by 1.6.65, are all independent, and
where the in the right hand side production is a multiset, such that we capture multiple occurrence of an event being resampled.
If we traverse the witness tree in reverse BFS method, namely layering by depth bottom up, then we observe earlier events resampling induces later events resampling, following the Moser-Tardos algorithm’s execution order.
For variables , each resampling creates a sequence of assignments, say . By 1.6.64, we know that and with should be on different depth.
Hence, fixing the randomness from Moser-Tardos algorithm, which is fixing the assignment sequences , we form a checking algorithm for as follows. The check algorithm traverses in described way, and checks if events in the current layer are happening: aborts if any event is not happening. Before traversing the next depth, the check algorithm resamples all the variables of the events in the current layer, by moving each to .
It becomes obvious that, on input the witness tree from a successful run of Moser-Tardos algorithm, by fixing the assignment sequences for , the tree checking algorithm always passes. Therefore
To bound the probability of a tree being valid in the checking algorithm, we use 1.6.63 and 1.6.64, that the events are not sharing variables in a same depth, such that events in a layer are independent, and each layer is independent of each other. Hence, a tree is valid in the checking algorithm with probability .
Thus, the inequality holds by the coupling arguments above. ∎
Now we have derived
by lemma 1.6.66 and lemma 1.6.67, the final step would be bounding the right hand side sum of product. We derive the upper bound by Galton-Watson process, that each children of in spawns with probability independently.
Deriving rooted with with Galton-Watson process has probability
Let each node has a set for the indices of children in , and the probability derivation follows
where the third equality holds from moving all the terms for from to all the children in . ∎
The proof for theorem 1.6.60 follows immediately:
By lemma 1.6.68, we have
and as we are summing over disjoint events. The rest is immediate by the linearity of expectation. ∎