One round of PPSZ on the randomized word RAM #
Cslib.Algorithms.WordRAM.PPSZ.roundProgram is one round of the PPSZ algorithm
Paturi, Pudlák, Saks, Zane with w-implication
Hertli, as a program of the randomized word RAM (Cslib.WordRAM.runRand). On the
input s :: encode φ, the bound s on the number of clauses of an implication followed by the
number n of variables and the clauses of φ : CNF (Fin n), it
- stores the empty partial assignment, the array
P = [0, 1, …, n - 1]and the boundsjust after the input; the2 swords aftersare the scratch memory of the oracle and start out zero; - for
i = 0, …, n - 1: drawsjuniformly from[i, n), swapsP[i]andP[j], and sets the variablex = P[i]to its w-implied value (Cslib.Complexity.PPSZ.implied φ s, computed byCslib.Algorithms.WordRAM.PPSZ.impliedCode), or to a uniform bit if it has none; - halts with output
1if the assignment it built satisfiesφ, and0otherwise.
Steps 2 and 3 are the round of PPZ (Cslib.Algorithms.WordRAM.PPZ.roundCoreWith,
Cslib.Algorithms.WordRAM.PPZ.roundCheck) with impliedCode as its oracle code
(Cslib.Algorithms.WordRAM.PPSZ.impliedCode_isOracleCode). Since
Cslib.Complexity.PPSZ.round φ s is by definition the round of PPZ with the oracle
implied φ s, the law of the loop is a round of PPSZ.
Cslib.Algorithms.WordRAM.PPSZ.roundProgram_spec proves that the program halts on every path
within roundTime s n L = n (impliedTime s L + 25) + 12 L + 23 instructions, where L is the input
length, makes at most 2 n rand calls, reports correctly whether the assignment it leaves
satisfies φ, and that the law of that assignment is exactly Cslib.Complexity.PPSZ.round φ s.
The PPSZ success bounds, such as Cslib.Complexity.PPSZ.round_success_of_satisfiable, therefore
apply to the program. By Cslib.Algorithms.WordRAM.PPSZ.impliedTime_le, the time is
O(n (s + 1)² (L + 1) ^ (2 s) + L). Time is the instruction count of the word RAM with unit-cost
rand (Cslib.WordRAM.stepRand).
Main definitions #
Cslib.Algorithms.WordRAM.PPSZ.roundSetup,Cslib.Algorithms.WordRAM.PPSZ.roundCode,Cslib.Algorithms.WordRAM.PPSZ.roundProgram: a round on the inputs :: encode φ, structured and compiled.Cslib.Algorithms.WordRAM.PPSZ.roundTime: its instruction bound.
Main results #
Cslib.Algorithms.WordRAM.PPSZ.impliedTime_mono: the oracle's bound is monotone in the length of the clauses.Cslib.Algorithms.WordRAM.PPSZ.impliedCode_isOracleCode:impliedCodeis an oracle code forimplied φ son rounds whose memory after the order array holdssand2 szero words.Cslib.Algorithms.WordRAM.PPSZ.roundCore_law: the round body has the law ofCslib.Complexity.PPSZ.round φ s.Cslib.Algorithms.WordRAM.PPSZ.roundProgram_spec: halting, time andrandbounds, a correct output, and the exact law of a round for the compiled program.
References #
The oracle code #
The oracle's bound is monotone in the length of the clauses.
w-implication is an oracle code for Cslib.Complexity.PPSZ.implied φ s, within
impliedTime s E instructions, on rounds whose memory after the order array, from Tb + 2 n,
holds s followed by 2 s zero words (Cslib.Algorithms.WordRAM.PPSZ.impliedCode_spec).
The body of a round of PPSZ (Cslib.Algorithms.WordRAM.PPZ.roundCoreWith impliedCode) has
the law of Cslib.Complexity.PPSZ.round φ s, keeps the frame, and leaves every variable set.
The program #
Set up the registers of a round on the input s :: encode φ: the clauses start at address
3, the partial assignment is stored just after the input, the order array just after it, and
the bound s is copied to the word after the order array.
One round of PPSZ on the input s :: encode φ, as a structured program.
One round of PPSZ on the input s :: encode φ, halting with out.
The instruction bound of a round with the bound s, on n variables and an input of length
L.
The data after the setup of a round on the input s :: encode φ.
The memory after the setup: the input, then s at L + 1 + 2 n, and zero after it.
The setup establishes the frame of a round on the input s :: encode φ, with s stored after
the order array and zero memory after it.
One round of PPSZ on the randomized word RAM. On the input s :: encode φ of length L,
at any word size w with L + 2 n + 2 s + 3 < 2 ^ w, the program
- halts on every path within
roundTime s n L = n (impliedTime s L + 25) + 12 L + 23instructions; - makes at most
2 nrandcalls; - outputs
1exactly when the assignment it leaves at addressL + 1satisfiesφ, and that assignment is total: every word is0or1; - leaves a partial assignment whose law is exactly
Cslib.Complexity.PPSZ.round φ s.