CS 537 Randomness In Computing - Boston University

Transcription

Randomness in ComputingLECTURE 25Last time Probabilistic method Lovasz Local LemmaToday Algorithmic Lovasz LocalLemma12/2/2021Sofya Raskhodnikova;Randomness in Computing

ExerciseConsider an algorithm ๐’œ for problem ๐“Ÿ that, on inputs of length ๐‘›,uses ๐‘…(๐‘›) random bits, runs in time ๐‘‡(๐‘›), and produces the correctYES/NO answer for the given input with probability 1/2.Give a deterministic algorithm for ๐“Ÿ and analyze its running time.The running time of your algorithm is big-O ofA. ๐‘‡(๐‘›)B. ๐‘… ๐‘› ๐‘‡(๐‘›)C.2๐‘…๐‘› ๐‘‡(๐‘›)D. ๐‘… ๐‘› 2๐‘‡E.F.12/2/2021๐‘›2๐‘… ๐‘› 2๐‘‡ ๐‘›Larger than all of the above.Sofya Raskhodnikova; Randomness in Computing

Lovasz Local Lemma (LLL) Event ๐ธ is mutually independent from the events ๐ธ1 , , ๐ธ๐‘›if, for any subset ๐ผ [๐‘›],Pr ๐ธ แˆฉ ๐ธ๐‘— ] Pr[๐ธ] .๐‘— ๐ผ A dependency graph for events ๐ต1 , , ๐ต๐‘› is a graph with vertexset [๐‘›] and edge set ๐ธ, s.t. ๐‘– ๐‘› , event ๐ต๐‘– is mutuallyindependent of all events ๐ต๐‘— ๐‘–, ๐‘— ๐ธ}.Lovasz Local LemmaLet ๐ต1 , , ๐ต๐‘› be events over a common sample space s.t.1. max degree of the dependency graph of ๐ต1 , , ๐ต๐‘› is at most ๐’…2. ๐‘– ๐‘› , Pr ๐ต๐‘– ๐’‘If ๐’†๐’‘ ๐’… ๐Ÿ ๐Ÿ then Pr ๐ต ๐‘› ๐‘–ฺ เดฅ๐‘– 012/2/2021Sofya Raskhodnikova; Randomness in Computing

Application of LLLTheoremIf ๐’†๐’Œ๐Ÿ๐’๐’Œ ๐Ÿ1 ๐’Œ๐Ÿ 1 2 1 then edges of ๐พ๐‘› can be coloredwith 2 colors so that there is no monochromatic ๐พ๐‘˜ .Proof:12/2/2021Sofya Raskhodnikova; Randomness in Computing

Canonical special case of LLL: kSAT Notation: ๐‘› number of variables, ๐‘š number of clausesObservation: If ๐‘š 2๐‘˜ , then the formula is satisfiable.Proof: Pick a uniformly random assignment. Let ๐ต๐‘– be the event that clause ๐‘– is violated.12/2/2021Sofya Raskhodnikova; Randomness in Computing; based on Tim Roughgardenโ€™s notes

Statement of LLL for ๐’ŒSAT Dependency graph: Vertices correspond to clausesedge (๐‘–, ๐‘—) iff clauses ๐‘– and ๐‘— share a variableIf clause ๐‘– contains ๐‘ฅ and clause ๐‘— contains ๐‘ฅ,าง it counts as sharing a variable.deg ๐‘– number of clauses sharing a variable with clause ๐‘– Let ๐‘‘ 1 max deg(๐‘–) max # of clauses one variable appears in.๐‘–Algorithmic Lovasz Local Lemma for ๐‘˜SAT๐’Œ ๐Ÿ‘If ๐’… ๐Ÿ ๐Ÿ๐’Œ๐Ÿ–for some ๐‘˜CNF formula ๐œ™, then ๐œ™ is satisfiable.Moreover, a satisfying assignment can be found in ๐‘‚(๐‘š2 log ๐‘š)time with probability at least 1 2 ๐‘š .12/2/2021Sofya Raskhodnikova; Randomness in Computing

Moser-Tardos Algorithm for LLLInput: a ๐‘˜CNF formula with clauses ๐ถ1 , , ๐ถ๐‘šon ๐‘› variables and with ๐‘‘ 2๐‘˜ 3Global variable1. Let ๐‘… be a random assignment where each variable isassigned 0 or 1 uniformly and independently.2. While some clause ๐ถ is violated by ๐‘…, run FIX(๐ถ)3. ๐‘๐ž๐ญ๐ฎ๐ซ๐ง ๐‘….FIX(๐ถ)1. Pick new values for ๐‘˜ variables in ๐ถ uniformly andindependently and update ๐‘….2. While some clause ๐ท that shares a variable with ๐ถ isviolated by ๐‘…, run FIX(๐ท)๐‘ซ could be ๐‘ช if we chose the same values as before12/2/2021Sofya Raskhodnikova; Randomness in Computing

Correctness of ObservationIf FIX(๐ถ) terminates, then it terminates with an assignmentin which ๐ถ and all clauses sharing a variable with ๐ถ are satisfied.12/2/2021Sofya Raskhodnikova; Randomness in Computing

Correctness of Moser-TardosLemma (Correctness)A call to FIX that terminates does not change anyclauses of the formula from satisfied to violated.Proof: Suppose for contradiction that some call FIX(๐ถ) terminated andchanged an assignment to clause ๐ท from satisfied to violated, and considerthe first such call. ๐ท canโ€™t share a variable with ๐ถ by Observation. Then randomly reassigning variables of ๐ถ does not affect variables of ๐ท All calls to FIX that the current call made terminated before this call didand, by assumption that this is the first bad call to terminate,could not have spoiled ๐ท.Theorem (Correctness)If Moser-Tardos terminates, it outputs a satisfying assignment.12/2/2021Sofya Raskhodnikova; Randomness in Computing

Run time of Moser-Tardos Assume: ๐‘š 2๐‘˜ (o.w. trivial by other means)Theorem (Run time)If ๐’… ๐Ÿ๐’Œ ๐Ÿ‘ then Moser-Tardos terminates after ๐‘‚(๐‘š log ๐‘š)resampling steps with probability at least 1 2 ๐‘š . Proof idea: Clever way to compressโ€™โ€™ random bitsif the algorithm runs for too long.Observation 2If a function ๐‘“: ๐ด ๐ต is injectiveSet A(i.e., invertible on its range ๐‘“(๐ด))then ๐ต ๐ด .12/2/2021Sofya Raskhodnikova; Randomness in ComputingSet B๐’‡

Function ๐’‡๐‘ป Suppose we stop Moser-Tardos after ๐‘‡ resampling steps.Randomness used:๐’ bits for initial assignment๐’Œ bits for each resampling stepTotal: ๐’ ๐‘ป๐’Œ bits Let ๐ด be the set of all choices for ๐‘› ๐‘‡๐‘˜ bits๐‘“๐‘‡ ๐‘ฅ0 , ๐‘ฆ0initialassignment12/2/2021๐‘ป๐’Œ bits forreassignment ๐‘ฅ ๐‘‡ , ๐‘ง๐‘‡assignmentafter ๐‘ปresamplingstepstranscriptafter ๐‘ปresamplingstepsSofya Raskhodnikova; Randomness in Computing

Transcript Each call to FIX gets recorded as follows:If FIX ๐ถ is called by the algorithm๐Ÿindex of the clause ๐ถ on which FIX is calledIf FIX ๐ท is a recursive call made by FIX ๐ถ๐Ÿ indexโ€™โ€™ of the clause ๐ท among all clauses that overlap with clause ๐ถ When a call to FIX returns,๐ŸŽ is written on the transcript12/2/2021Sofya Raskhodnikova; Randomness in Computing

Run time of Moser-TardosLemma 1Function ๐‘“๐‘‡ is invertible on all inputs (๐‘ฅ0 , ๐‘ฆ0 ) for which Moser-Tardosdoes not terminate within ๐‘‡ steps when run with randomness (๐‘ฅ0 , ๐‘ฆ0 ).Lemma 2Length of transcript ๐‘ง๐‘‡ is at most ๐’Ž(โŒˆ๐ฅ๐จ๐  ๐Ÿ ๐’ŽโŒ‰ ๐Ÿ) ๐‘ป (๐’Œ ๐Ÿ) .12/2/2021Sofya Raskhodnikova; Randomness in Computing

Proof of TheoremFirst, consider ๐‘‡ such that Moser-Tardos never terminates within ๐‘‡resampling steps. There is a valid transcript ๐‘ง๐‘‡ for every choice ofthe random ๐‘› ๐‘‡๐‘˜ bits needed to run Moser-Tardos12/2/2021Sofya Raskhodnikova; Randomness in Computing

Proof of Theorem (continued)Now, consider ๐‘‡ such that Moser-Tardos fails to terminate1w.p. ๐‘š within ๐‘‡ resampling steps.2 Then ๐‘“๐‘‡ is invertible on the set of size 2๐‘› ๐‘‡๐‘˜ ๐‘š12/2/2021Sofya Raskhodnikova; Randomness in Computing

Proof of Lemma 1Lemma 1Function ๐‘“๐‘‡ is invertible on all inputs (๐‘ฅ0 , ๐‘ฆ0 ) for which Moser-Tardosdoes not terminate within ๐‘‡ steps when run with randomness (๐‘ฅ0 , ๐‘ฆ0 ).Proof: The recursion tree is uniquely defined by ๐‘ง๐‘‡ FIX is only called on violated clauses, and each clause has aunique violating assignment.12/2/2021Sofya Raskhodnikova; Randomness in Computing

Algorithmic LLL for ๐’ŒSATAlgorithmic Lovasz Local Lemma for ๐‘˜SATIf ๐’… ๐Ÿ๐’Œ ๐Ÿ‘ ๐Ÿ๐’Œ๐Ÿ–for some ๐‘˜CNF formula ๐œ™, then ๐œ™ is satisfiable.Moreover, a satisfying assignment can be found in ๐‘‚(๐‘š2 log ๐‘š)time with probability at least 1 2 ๐‘š .12/2/2021Sofya Raskhodnikova; Randomness in Computing

4/23/2020 Randomness in Computing LECTURE 25 Last time Drunkardโ€™s walk Markov chains Randomize