Slide 1

Valiant-Vazirani theorem

Posov Ilya Faculty of Mathematics and Mechanics Chair of software engineering (system programming)

JASS’06 4/5 April 2006 Slide 2 Original paper

• L.G. Valiant and V.V. Vazirani, NP is as Easy as Detecting Unique Solutions. Theoretical Computer Science, 47(1986), 85-94.

JASS’06 4/5 April 2006 Slide 3 Contents

• Statement of the theorem • Words before the proof •The 1st proof •The 2nd proof • Open questions

JASS’06 4/5 April 2006 Slide 4 & Vijay Vazirani • Leslie G. Valiant http://people.deas.harvard.edu/~valiant/ – Ph.D., Warwick university in CS,1974 – T.Jefferson Coolidge Professor of Computer no image Science and Applied Mathematics in the Division of Engeneering and Applied Sciences, • Vijay V. Vazirani http://www-static.cc.gatech.edu/~vazirani/ – Ph.D., University of California, Berkley, 1983 – Professor of CS at and McKey Visiting Professor at the University of California, Berkley

JASS’06 4/5 April 2006 Slide 5 Theorem statement

F in CNF

can be constructed in polynomial time (probabilistic construction)

F1 , F2 ,… , Fm in CNF

• If F is unsatisfiable, then all Fi are unsatisfiable • If F is satisfiable, then with probability greater than

½ at least one of Fi is uniquely-satisfiable

JASS’06 4/5 April 2006 Slide 6 Solving SAT • Consider u-solver, an : – u-solver(F) = yes, if F has exactly one solution – u-solver(F) = no, if F has no solutions – u-solver(F) = yes/no (unpredictable), otherwise • Meaning of u-solver: tests for satisfiability assuming that given formula has at most one solution • u-solver solves “promise problem” UNIQUE-SAT

JASS’06 4/5 April 2006 Slide 7 Solving SAT (continue) a F is unsatisfiable b F is satisfiable

V-V construction V-V construction

F1,F2,…,Fm F1,F2,…,Fm 00 0 01 >1 u - solver u - solver

no no … no no yes … yes/no

•So, if F is unsatisfiable, u-solver will say no for all Fi • If F is satisfiable, with probability more than ½ u-solver will say yes for some Fi JASS’06 4/5 April 2006 Slide 8 Result

• SATsdf∈RPUNIQUE−SAT • NP ⊂ RP UNIQUE−SAT • NP ⊂ вапBPPUNIQUE−SAT

JASS’06 4/5 April 2006 Slide 9 Thoughts

• To solve SAT u-solver can be replaced by – Solver that tests whether the formula has exactly one satisfying assignment – Solver that tests whether the formula has odd number of satisfying assignments

JASS’06 4/5 April 2006 Slide 10

Proof of the Theorem

JASS’06 4/5 April 2006 Slide 11

Hyperplanes ηS

• Let S ⊆ {x1, x2 ,K, xn} • Hyperplane ηS is a boolean formula in CNF, stating that an even number of xi in S is true

•Example: n = 4, S = {x1,x2,x4}

• y0 x1 y1 x2 y2 x3 y3 x4 y4 tt

JASS’06 4/5 April 2006 Slide 12 Notation

• F is a formula in CNF with variables x1, x2, …, xn • T is a set of its satisfying assignments • D = |T| – number of its satisfying assignments

• Si are randomly selected subsets of {x1, x2, …, xn} (i = 1…n+1)

• F0 = F • F = F ∧η 1 S1 • F = F ∧η ∧η 2 S1 S2 • ... • F = F ∧η ∧η ∧η n+1 S1 S2 K Sn+1

JASS’06 4/5 April 2006 Slide 13 Proof continue • F0 = F • F = F ∧η 1 S1 • F = F ∧η ∧η 2 S1 S2 • ... • F = F ∧η ∧η ∧η n+1 S1 S2 K Sn+1 • Obviously, if F is unsatisfiable, all Fi are unsatisfiable • We proof that if F is satisfiable, if 2k ≤ D ≤ 2k +1 then Fk+2 is uniquely-satisfiable with probability at least ⅛

JASS’06 4/5 April 2006 Slide 14 1/8 vs. 1/2

• F1(1), F2(1), F3(1), …, Fn+1(1) •…

• F1(6), F2(6), F3(6), …, Fn+1(6) • Each set has no uniquely-satisfiable formula with probability at most ⅞ • Sets constructed independently, so probability that there are no uniquely-satisfiable formulas at all is at most (⅞)6 < ½ • Probability, that there is at least one uniquely- satisfiable formula is at least ½

JASS’06 4/5 April 2006 Slide 15 Evaluations (1/3)

F = F ∧η ∧η ∧η • k +2 SD S1 S2 K Sk+2 P{Fk+2 is uniquely-satisfiable} = ? • take t ∈ T some truth assignment of F • P{t is the only satisfying assignment of Fk +2} = Si P{∀iη (t) = true & ∀t'∈T \{t} ∃iη (t') ≠η (t)} = Si Si Si Si P{∀iη (t) = true}⋅ P{∀t'∈T \{t} ∃iη (t') ≠η (t)} = Si Si Si Si Si

P1 ⋅ P2 JASS’06 4/5 April 2006 Slide 16 Evaluations (2/3)

F = F ∧η ∧η ∧η • k +2 SD S1 S2 K Sk+2 P{Fk+2 is uniquely-satisfiable} = ? • take t ∈ T some truth assignment of F • P = P{∀iη (t) = true} = 1 Si Si t = k +2 1 (P{η (t) = true}) Exactly one half S ≥ k +2 S 2 of all subsets of variables have even number of true-variables

JASS’06 4/5 April 2006 Slide 17 Evaluations (3/3)

P = P{∀t'∈T \{t} ∃iη (t') ≠η (t)} = 2 Si Si Si 1− P{∃t'∈T \{t}∀iη (t') =η (t)} = S i Si Si 1− P{(∀iη (t ) =η (t)) ∨ ∨ (∀iη (t ) =η (t))}≥ Si 1 Si K Si |T|−1 Si Si t = 1− (T −1) P{∀iη (t') =η (t)} > Si Si Si t’ = k +1 k +2 1− 2 (P{ηS (t') =ηS (t)}) = Exactly one half S of all subsets (S) 1 1 1− 2k +1 ⋅ = of variables are 2k +2 2 such that ηS(t) = ηS(t’) JASS’06 4/5 April 2006 Slide 18 Ending of the proof…

• If we take arbitrary t ∈ T truth assignment of F,

P{t is the only satisfying assignment of Fk +2} = P1 ⋅ P2 > 1 1 1 ⋅ = 2k +2 2 2k +3

• But T ≥ 2 k , so 2k 1 P{∃t ∈T :t is the only satisfying assignment of F } > = k +2 2k +3 8

JASS’06 4/5 April 2006 Slide 19

Second Proof

JASS’06 4/5 April 2006 Slide 20

Construction of Fi • i is a random number from [0…n] i 2 • bi = 4·2 n

• pi is a random number in [1…bi]

• ri is a random number in [1…bi]

• x is a bit sequence x1x2…xn (0 =false, 1=true)

• new random formula : F'= F ∧ (x mod pi = ri ) • Let’s show that F’ is one-satisfiable with 1 probability ≥ 32n4 + 32n3

JASS’06 4/5 April 2006 Slide 21 Preliminaries (1/2)

• i is a random number in [0…n]

1 • f2 i − 1 < T = D ≤ 2 i with probability . n +1 • We will assume that this happened

JASS’06 5 April 2006 Slide 22 Preliminaries (2/2)

i 2 • bi= 4·2 n

• Number of primes in the [1…bi] is at least: i 2 0.92129bi lnbi > bi log2 bi = 4⋅2 n (i + 2 + 2log2 n) > 4⋅2i n2 2n = 2i+1 n

JASS’06 5 April 2006 Slide 23 Proof t(j) p t(j) - t(1)

≤ n common p modules for t(1) common … modules common for t(2) modules for t(3)

i+1 ≥ 2 n primes in [1Kbi ] • inner circles: number of primes ≤ n(D −1) < n2i • rest of primes ≥ n2i+1 − n2i = n2i

JASS’06 5 April 2006 Slide 24 Proof • t(1): at least n2i pairs (p, r) that would make t(1) the only satisfying assignment • … • t(D): at least n2i pairs (p, r) that would make t(D) the only satisfying assignment • overall number of such “lucky” pairs ≥ n2i D > n2i2i−1 = n22i−1 2i 4 • overall number of pairs = bibi=16·2 n • P{to choose a “lucky” pair}= n22i-1/16·22in4=1/32n3

JASS’06 5 April 2006 Slide 25 Ending of the proof

•*P{F'= F ∧ (x mod pi = ri ) is uniquely -satisfiable} ≥ 1 1 1 = P{A} ≥ P{A& B} = P{A | B}⋅ P{B} 32n3 n +1 32n4 + 32n3 • Probability of the converse (bad) situation 1 ≤1− • 32n4 − 32n3 • Repeat generation of F’ O(n4) times, probability that one of the generated formulas

is uniquely-satisfiable: O(n4 ) ⎛ 1 ⎞ ≥1− ⎜1− ⎟ = const ⎝ 32n4 − 32n3 ⎠ JASS’06 4/5 April 2006 Slide 26

Open Questions

JASS’06 4/5 April 2006 Slide 27 3-CNF

• F → {Fi}

• F is in 3-CNF then Fi are not always in 3-CNF • Translation to 3-CNF can significantly

increase the number of variables in Fi • Is there such a reduction to the set of formulas in 3-CNF that number of variables would increase only by o(n)?

JASS’06 4/5 April 2006 Slide 28 Derandomization

• How to remove randomness from the algorithm? • Maybe, working time of the algorithm would be poly(|F|)·cn for some с<2

JASS’06 4/5 April 2006 Slide 29

Thank you for attention

Questions?

JASS’06 4/5 April 2006