Complexity of Counting
Lecture 21 #P: Toda’ s Theorem
1
Complexity of Counting Lecture 21 #P: Toda s Theorem 1 Last Time - - PowerPoint PPT Presentation
Complexity of Counting Lecture 21 #P: Toda s Theorem 1 Last Time 2 Last Time #P: counting problems of the form #R(x) = |{w: R(x,w)=1}|, where R is a polynomial time relation 2 Last Time #P: counting problems of the form #R(x) = |{w:
1
2
#P: counting problems of the form #R(x) = |{w: R(x,w)=1}|, where R is a polynomial time relation
2
#P: counting problems of the form #R(x) = |{w: R(x,w)=1}|, where R is a polynomial time relation Can be hard: even #CYCLE is not in FP (unless P = NP)
2
#P: counting problems of the form #R(x) = |{w: R(x,w)=1}|, where R is a polynomial time relation Can be hard: even #CYCLE is not in FP (unless P = NP) #P ⊆ FPPP (and PP ⊆ P#P)
2
#P: counting problems of the form #R(x) = |{w: R(x,w)=1}|, where R is a polynomial time relation Can be hard: even #CYCLE is not in FP (unless P = NP) #P ⊆ FPPP (and PP ⊆ P#P) #P complete problems
2
#P: counting problems of the form #R(x) = |{w: R(x,w)=1}|, where R is a polynomial time relation Can be hard: even #CYCLE is not in FP (unless P = NP) #P ⊆ FPPP (and PP ⊆ P#P) #P complete problems #SAT
2
#P: counting problems of the form #R(x) = |{w: R(x,w)=1}|, where R is a polynomial time relation Can be hard: even #CYCLE is not in FP (unless P = NP) #P ⊆ FPPP (and PP ⊆ P#P) #P complete problems #SAT Permanent
2
#P: counting problems of the form #R(x) = |{w: R(x,w)=1}|, where R is a polynomial time relation Can be hard: even #CYCLE is not in FP (unless P = NP) #P ⊆ FPPP (and PP ⊆ P#P) #P complete problems #SAT Permanent Next: Toda’ s Theorem: PH ⊆ P#P = PPP
2
3
⊕P: parity of the number of witnesses
3
⊕P: parity of the number of witnesses e.g. ⊕SAT. Least significant bit of #SAT.
3
⊕P: parity of the number of witnesses e.g. ⊕SAT. Least significant bit of #SAT. May not be as powerful as PP (or #P)
3
⊕P: parity of the number of witnesses e.g. ⊕SAT. Least significant bit of #SAT. May not be as powerful as PP (or #P) ⊕P ⊆ P may not imply NP = P
3
⊕P: parity of the number of witnesses e.g. ⊕SAT. Least significant bit of #SAT. May not be as powerful as PP (or #P) ⊕P ⊆ P may not imply NP = P But it does imply NP ⊆ RP (even if only ⊕P ⊆ RP)
3
⊕P: parity of the number of witnesses e.g. ⊕SAT. Least significant bit of #SAT. May not be as powerful as PP (or #P) ⊕P ⊆ P may not imply NP = P But it does imply NP ⊆ RP (even if only ⊕P ⊆ RP) Randomized reduction of NP to ⊕P
3
⊕P: parity of the number of witnesses e.g. ⊕SAT. Least significant bit of #SAT. May not be as powerful as PP (or #P) ⊕P ⊆ P may not imply NP = P But it does imply NP ⊆ RP (even if only ⊕P ⊆ RP) Randomized reduction of NP to ⊕P i.e., ⊕P oracle is quite useful to randomized algorithms
3
⊕P: parity of the number of witnesses e.g. ⊕SAT. Least significant bit of #SAT. May not be as powerful as PP (or #P) ⊕P ⊆ P may not imply NP = P But it does imply NP ⊆ RP (even if only ⊕P ⊆ RP) Randomized reduction of NP to ⊕P i.e., ⊕P oracle is quite useful to randomized algorithms
3
4
Randomized reduction of NP to ⊕P
4
Randomized reduction of NP to ⊕P A probabilistic polynomial time algorithm A such that
4
Randomized reduction of NP to ⊕P A probabilistic polynomial time algorithm A such that φ ∉ SAT ⇒ Pr[A(φ) ∈ ⊕SAT] = 0
4
Randomized reduction of NP to ⊕P A probabilistic polynomial time algorithm A such that φ ∉ SAT ⇒ Pr[A(φ) ∈ ⊕SAT] = 0 In fact A(φ) will have no satisfying assignment
4
Randomized reduction of NP to ⊕P A probabilistic polynomial time algorithm A such that φ ∉ SAT ⇒ Pr[A(φ) ∈ ⊕SAT] = 0 In fact A(φ) will have no satisfying assignment φ ∈ SAT ⇒ Pr[A(φ) ∈ ⊕SAT] ≥ ε(n)
4
Randomized reduction of NP to ⊕P A probabilistic polynomial time algorithm A such that φ ∉ SAT ⇒ Pr[A(φ) ∈ ⊕SAT] = 0 In fact A(φ) will have no satisfying assignment φ ∈ SAT ⇒ Pr[A(φ) ∈ ⊕SAT] ≥ ε(n) With prob. ≥ ε(n), A(φ) will have exactly one satisfying assignment
4
Randomized reduction of NP to ⊕P A probabilistic polynomial time algorithm A such that φ ∉ SAT ⇒ Pr[A(φ) ∈ ⊕SAT] = 0 In fact A(φ) will have no satisfying assignment φ ∈ SAT ⇒ Pr[A(φ) ∈ ⊕SAT] ≥ ε(n) With prob. ≥ ε(n), A(φ) will have exactly one satisfying assignment If an RP algorithm for ⊕SAT, then an RP algorithm for SAT
4
5
Randomized reduction of SAT to Unique-SAT: A probabilistic polynomial time algorithm A such that
5
Randomized reduction of SAT to Unique-SAT: A probabilistic polynomial time algorithm A such that If φ ∈ SAT, with prob. ≥ ε(n), Aφ will have exactly one satisfying assignment. Else Aφ will have none.
5
Randomized reduction of SAT to Unique-SAT: A probabilistic polynomial time algorithm A such that If φ ∈ SAT, with prob. ≥ ε(n), Aφ will have exactly one satisfying assignment. Else Aφ will have none. Add a filter which will pass exactly one witness (if any): Aφ(w) = φ(w) and filter(w)
5
6
Let S⊆X be a set of size m. Consider a pair-wise independent hash-function family H, from X to R, such that |S|/|R| ∈ [1/4,1/2].
6
Let S⊆X be a set of size m. Consider a pair-wise independent hash-function family H, from X to R, such that |S|/|R| ∈ [1/4,1/2]. Prh[h(x)=0] = 1/|R| =: p, and Prh[h(x)=h(y)=0] = p2. |S|p ∈ [1/4,1/2].
6
Let S⊆X be a set of size m. Consider a pair-wise independent hash-function family H, from X to R, such that |S|/|R| ∈ [1/4,1/2]. Prh[h(x)=0] = 1/|R| =: p, and Prh[h(x)=h(y)=0] = p2. |S|p ∈ [1/4,1/2]. Let N := |{x ∈ S| h(x)=0}|. Prh[N=1] = Prh[N≥1] -Prh[N≥2]
6
Let S⊆X be a set of size m. Consider a pair-wise independent hash-function family H, from X to R, such that |S|/|R| ∈ [1/4,1/2]. Prh[h(x)=0] = 1/|R| =: p, and Prh[h(x)=h(y)=0] = p2. |S|p ∈ [1/4,1/2]. Let N := |{x ∈ S| h(x)=0}|. Prh[N=1] = Prh[N≥1] -Prh[N≥2] By inclusion-exclusion: Prh[N≥1] ≥ Σx Prh[h(x)=0] -Σx>y Prh[h(x)=h(y)=0]
6
Let S⊆X be a set of size m. Consider a pair-wise independent hash-function family H, from X to R, such that |S|/|R| ∈ [1/4,1/2]. Prh[h(x)=0] = 1/|R| =: p, and Prh[h(x)=h(y)=0] = p2. |S|p ∈ [1/4,1/2]. Let N := |{x ∈ S| h(x)=0}|. Prh[N=1] = Prh[N≥1] -Prh[N≥2] By inclusion-exclusion: Prh[N≥1] ≥ Σx Prh[h(x)=0] -Σx>y Prh[h(x)=h(y)=0]
|S|p
6
Let S⊆X be a set of size m. Consider a pair-wise independent hash-function family H, from X to R, such that |S|/|R| ∈ [1/4,1/2]. Prh[h(x)=0] = 1/|R| =: p, and Prh[h(x)=h(y)=0] = p2. |S|p ∈ [1/4,1/2]. Let N := |{x ∈ S| h(x)=0}|. Prh[N=1] = Prh[N≥1] -Prh[N≥2] By inclusion-exclusion: Prh[N≥1] ≥ Σx Prh[h(x)=0] -Σx>y Prh[h(x)=h(y)=0]
|S|p (|S| choose 2)p
6
Let S⊆X be a set of size m. Consider a pair-wise independent hash-function family H, from X to R, such that |S|/|R| ∈ [1/4,1/2]. Prh[h(x)=0] = 1/|R| =: p, and Prh[h(x)=h(y)=0] = p2. |S|p ∈ [1/4,1/2]. Let N := |{x ∈ S| h(x)=0}|. Prh[N=1] = Prh[N≥1] -Prh[N≥2] By inclusion-exclusion: Prh[N≥1] ≥ Σx Prh[h(x)=0] -Σx>y Prh[h(x)=h(y)=0] By Union-bound: Prh[N≥2] ≤ Σx>y Prh[h(x)=h(y)=0]
|S|p (|S| choose 2)p
6
Let S⊆X be a set of size m. Consider a pair-wise independent hash-function family H, from X to R, such that |S|/|R| ∈ [1/4,1/2]. Prh[h(x)=0] = 1/|R| =: p, and Prh[h(x)=h(y)=0] = p2. |S|p ∈ [1/4,1/2]. Let N := |{x ∈ S| h(x)=0}|. Prh[N=1] = Prh[N≥1] -Prh[N≥2] By inclusion-exclusion: Prh[N≥1] ≥ Σx Prh[h(x)=0] -Σx>y Prh[h(x)=h(y)=0] By Union-bound: Prh[N≥2] ≤ Σx>y Prh[h(x)=h(y)=0]
|S|p (|S| choose 2)p
6
Let S⊆X be a set of size m. Consider a pair-wise independent hash-function family H, from X to R, such that |S|/|R| ∈ [1/4,1/2]. Prh[h(x)=0] = 1/|R| =: p, and Prh[h(x)=h(y)=0] = p2. |S|p ∈ [1/4,1/2]. Let N := |{x ∈ S| h(x)=0}|. Prh[N=1] = Prh[N≥1] -Prh[N≥2] By inclusion-exclusion: Prh[N≥1] ≥ Σx Prh[h(x)=0] -Σx>y Prh[h(x)=h(y)=0] By Union-bound: Prh[N≥2] ≤ Σx>y Prh[h(x)=h(y)=0] Prh[N=1] ≥ |S| p - 2 (|S| choose 2) p2 ≥ |S|p - (|S|p)2 ≥ 3/16
|S|p (|S| choose 2)p
6
Randomized reduction of SAT to Unique-SAT: A probabilistic polynomial time algorithm A such that If φ ∈ SAT, with prob. ≥ ε(n), Aφ will have exactly one satisfying assignment. Else Aφ will have none. Add a filter which will pass exactly one witness (if any): Aφ(w) = φ(w) and filter(w)
7
Randomized reduction of SAT to Unique-SAT: A probabilistic polynomial time algorithm A such that If φ ∈ SAT, with prob. ≥ ε(n), Aφ will have exactly one satisfying assignment. Else Aφ will have none. Add a filter which will pass exactly one witness (if any): Aφ(w) = φ(w) and filter(w) filter(w): a Boolean formula saying h(w)=0. (If using auxiliary variables, i.e., ∃z filter(w,z), use a parsimonious reduction.)
7
Randomized reduction of SAT to Unique-SAT: A probabilistic polynomial time algorithm A such that If φ ∈ SAT, with prob. ≥ ε(n), Aφ will have exactly one satisfying assignment. Else Aφ will have none. Add a filter which will pass exactly one witness (if any): Aφ(w) = φ(w) and filter(w) filter(w): a Boolean formula saying h(w)=0. (If using auxiliary variables, i.e., ∃z filter(w,z), use a parsimonious reduction.) If witness n-bit long (|X|={0,1}n), pick R={0,1}k, with k random in the range [1,n]
7
8
Two steps
8
Two steps Randomized reduction of PH to P⊕P
8
Two steps Randomized reduction of PH to P⊕P Converting the probabilistic guarantee to a deterministic #P statement
8
9
∃ For at least one
9
∃ For at least one ∀ For all
9
∃ For at least one ∀ For all ∃r For at least r fraction
9
∃ For at least one ∀ For all ∃r For at least r fraction ∃! For exactly one
9
∃ For at least one ∀ For all ∃r For at least r fraction ∃! For exactly one ⊕ For an odd number of
9
10
We have a randomized reduction: φ to Aφ such that
10
We have a randomized reduction: φ to Aφ such that ∃w φ(w) ⇒ ⊕w Aφ(w) with prob. ≥ ε(n)
10
We have a randomized reduction: φ to Aφ such that ∃w φ(w) ⇒ ⊕w Aφ(w) with prob. ≥ ε(n) ∀w not φ(w) ⇒ not ⊕w Aφ(w) (with prob. = 1)
10
We have a randomized reduction: φ to Aφ such that ∃w φ(w) ⇒ ⊕w Aφ(w) with prob. ≥ ε(n) ∀w not φ(w) ⇒ not ⊕w Aφ(w) (with prob. = 1) i.e., with prob ≥ ε(n), we have ∃w φ(w) ⇔ ⊕w Aφ(w) (and hence also ∀w not φ(w) ⇔ not ⊕w Aφ(w))
10
We have a randomized reduction: φ to Aφ such that ∃w φ(w) ⇒ ⊕w Aφ(w) with prob. ≥ ε(n) ∀w not φ(w) ⇒ not ⊕w Aφ(w) (with prob. = 1) i.e., with prob ≥ ε(n), we have ∃w φ(w) ⇔ ⊕w Aφ(w) (and hence also ∀w not φ(w) ⇔ not ⊕w Aφ(w)) Reduction works even if φ(w) is a partially quantified Boolean formula
10
We have a randomized reduction: φ to Aφ such that ∃w φ(w) ⇒ ⊕w Aφ(w) with prob. ≥ ε(n) ∀w not φ(w) ⇒ not ⊕w Aφ(w) (with prob. = 1) i.e., with prob ≥ ε(n), we have ∃w φ(w) ⇔ ⊕w Aφ(w) (and hence also ∀w not φ(w) ⇔ not ⊕w Aφ(w)) Reduction works even if φ(w) is a partially quantified Boolean formula Can all ∃/∀ be removed, by repeating, so that only ⊕ remain?
10
11
Given two boolean formulas φ(x) and ψ(y), define
11
Given two boolean formulas φ(x) and ψ(y), define Fφ.ψ(x,y): φ(x) and ψ(y)
11
Given two boolean formulas φ(x) and ψ(y), define Fφ.ψ(x,y): φ(x) and ψ(y) #Fφ.ψ = #φ . #ψ
11
Given two boolean formulas φ(x) and ψ(y), define Fφ.ψ(x,y): φ(x) and ψ(y) #Fφ.ψ = #φ . #ψ Fφ+ψ(x,y,z): (z=0,y=0 and φ(x)) or (z=1,x=0 and ψ(y))
11
Given two boolean formulas φ(x) and ψ(y), define Fφ.ψ(x,y): φ(x) and ψ(y) #Fφ.ψ = #φ . #ψ Fφ+ψ(x,y,z): (z=0,y=0 and φ(x)) or (z=1,x=0 and ψ(y)) #Fφ+ψ = #φ + #ψ
11
Given two boolean formulas φ(x) and ψ(y), define Fφ.ψ(x,y): φ(x) and ψ(y) #Fφ.ψ = #φ . #ψ Fφ+ψ(x,y,z): (z=0,y=0 and φ(x)) or (z=1,x=0 and ψ(y)) #Fφ+ψ = #φ + #ψ Fφ+1 := (z=0 and φ(x)) or (z=1 and x=0). #Fφ+1 = #φ + 1
11
Given two boolean formulas φ(x) and ψ(y), define Fφ.ψ(x,y): φ(x) and ψ(y) #Fφ.ψ = #φ . #ψ Fφ+ψ(x,y,z): (z=0,y=0 and φ(x)) or (z=1,x=0 and ψ(y)) #Fφ+ψ = #φ + #ψ Fφ+1 := (z=0 and φ(x)) or (z=1 and x=0). #Fφ+1 = #φ + 1 Works even if φ, ψ are partially quantified boolean formulas
11
12
Boolean combinations of QBFs with ⊕ quantifiers
12
Boolean combinations of QBFs with ⊕ quantifiers ⊕x φ(x) and ⊕y ψ(y) ⇔ ⊕x,y Fφ.ψ(x,y), i.e. ⊕x,y φ(x) and ψ(y)
12
Boolean combinations of QBFs with ⊕ quantifiers ⊕x φ(x) and ⊕y ψ(y) ⇔ ⊕x,y Fφ.ψ(x,y), i.e. ⊕x,y φ(x) and ψ(y) not ⊕x φ(x) ⇔ ⊕x,z Fφ+1(x,z). i.e. ⊕x,z (z=1,x=0) or (z=0,φ(x))
12
Boolean combinations of QBFs with ⊕ quantifiers ⊕x φ(x) and ⊕y ψ(y) ⇔ ⊕x,y Fφ.ψ(x,y), i.e. ⊕x,y φ(x) and ψ(y) not ⊕x φ(x) ⇔ ⊕x,z Fφ+1(x,z). i.e. ⊕x,z (z=1,x=0) or (z=0,φ(x)) ⊕x (⊕y φ(x,y)) ⇔ ⊕x,y φ(x,y)
12
Boolean combinations of QBFs with ⊕ quantifiers ⊕x φ(x) and ⊕y ψ(y) ⇔ ⊕x,y Fφ.ψ(x,y), i.e. ⊕x,y φ(x) and ψ(y) not ⊕x φ(x) ⇔ ⊕x,z Fφ+1(x,z). i.e. ⊕x,z (z=1,x=0) or (z=0,φ(x)) ⊕x (⊕y φ(x,y)) ⇔ ⊕x,y φ(x,y) (⊕,∃,∀)-QBF can be converted to the form ⊕z F(z), where F is a (∃,∀)-QBF , increasing the size by at most a constant factor, and not changing number of ∃,∀
12
13
Recall: with prob ≥ ε(n), we have ∃w φ(w) ⇔ ⊕w Aφ(w) (and ∀w not φ(w) ⇔ not ⊕w Aφ(w))
13
Recall: with prob ≥ ε(n), we have ∃w φ(w) ⇔ ⊕w Aφ(w) (and ∀w not φ(w) ⇔ not ⊕w Aφ(w)) Boosting the probability: ε(n) to 1-δ(n)
13
Recall: with prob ≥ ε(n), we have ∃w φ(w) ⇔ ⊕w Aφ(w) (and ∀w not φ(w) ⇔ not ⊕w Aφ(w)) Boosting the probability: ε(n) to 1-δ(n) ⊕w A1φ(w) or ⊕w A2φ(w) or ... or ⊕w Atφ(w)
13
Recall: with prob ≥ ε(n), we have ∃w φ(w) ⇔ ⊕w Aφ(w) (and ∀w not φ(w) ⇔ not ⊕w Aφ(w)) Boosting the probability: ε(n) to 1-δ(n) ⊕w A1φ(w) or ⊕w A2φ(w) or ... or ⊕w Atφ(w) Can rewrite in the form ⊕z Bφ(z) where Bφ has no ⊕
13
Recall: with prob ≥ ε(n), we have ∃w φ(w) ⇔ ⊕w Aφ(w) (and ∀w not φ(w) ⇔ not ⊕w Aφ(w)) Boosting the probability: ε(n) to 1-δ(n) ⊕w A1φ(w) or ⊕w A2φ(w) or ... or ⊕w Atφ(w) Can rewrite in the form ⊕z Bφ(z) where Bφ has no ⊕ In prenex form ⊕z Bφ(z) has one less ∃/∀ than ∃w φ(w)
13
Recall: with prob ≥ ε(n), we have ∃w φ(w) ⇔ ⊕w Aφ(w) (and ∀w not φ(w) ⇔ not ⊕w Aφ(w)) Boosting the probability: ε(n) to 1-δ(n) ⊕w A1φ(w) or ⊕w A2φ(w) or ... or ⊕w Atφ(w) Can rewrite in the form ⊕z Bφ(z) where Bφ has no ⊕ In prenex form ⊕z Bφ(z) has one less ∃/∀ than ∃w φ(w) If we start from ⊕x∃w φ(w,x) we get equivalent (with probability 1-δ(n)) ⊕x⊕z Bφ(z,x)
13
Recall: with prob ≥ ε(n), we have ∃w φ(w) ⇔ ⊕w Aφ(w) (and ∀w not φ(w) ⇔ not ⊕w Aφ(w)) Boosting the probability: ε(n) to 1-δ(n) ⊕w A1φ(w) or ⊕w A2φ(w) or ... or ⊕w Atφ(w) Can rewrite in the form ⊕z Bφ(z) where Bφ has no ⊕ In prenex form ⊕z Bφ(z) has one less ∃/∀ than ∃w φ(w) If we start from ⊕x∃w φ(w,x) we get equivalent (with probability 1-δ(n)) ⊕x⊕z Bφ(z,x) By repeating, QBF can be converted to the form ⊕z F(z) where F is unquantified, equivalent with prob. close to 1
13
14
Two steps
14
Two steps Randomized reduction of PH to P⊕P
14
Two steps Randomized reduction of PH to P⊕P TQBF instance ψ to ⊕SAT instance φψ
14
Two steps Randomized reduction of PH to P⊕P TQBF instance ψ to ⊕SAT instance φψ ψ ⇒ ⊕φψ w.p. > 2/3; ¬ψ ⇒ ¬⊕φψ (w.p. 1)
14
Two steps Randomized reduction of PH to P⊕P TQBF instance ψ to ⊕SAT instance φψ ψ ⇒ ⊕φψ w.p. > 2/3; ¬ψ ⇒ ¬⊕φψ (w.p. 1) Converting the probabilistic guarantee to a deterministic #P calculation
14
Two steps Randomized reduction of PH to P⊕P TQBF instance ψ to ⊕SAT instance φψ ψ ⇒ ⊕φψ w.p. > 2/3; ¬ψ ⇒ ¬⊕φψ (w.p. 1) Converting the probabilistic guarantee to a deterministic #P calculation ψ s.t. ¬⊕φψ ⇒ #θψ = 0 (mod N)
14
Two steps Randomized reduction of PH to P⊕P TQBF instance ψ to ⊕SAT instance φψ ψ ⇒ ⊕φψ w.p. > 2/3; ¬ψ ⇒ ¬⊕φψ (w.p. 1) Converting the probabilistic guarantee to a deterministic #P calculation ψ s.t. ¬⊕φψ ⇒ #θψ = 0 (mod N) ψ s.t. ⊕φψ w.p. > 2/3 ⇒ #θψ ≠ 0 (mod N)
14
15
Converting the probabilistic guarantee to a deterministic #P calculation
15
Converting the probabilistic guarantee to a deterministic #P calculation ψ s.t. ¬⊕φψ ⇒ #θψ = 0 (mod N)
15
Converting the probabilistic guarantee to a deterministic #P calculation ψ s.t. ¬⊕φψ ⇒ #θψ = 0 (mod N) ψ s.t. ⊕φψ w.p. > 2/3 ⇒ #θψ ≠ 0 (mod N)
15
Converting the probabilistic guarantee to a deterministic #P calculation ψ s.t. ¬⊕φψ ⇒ #θψ = 0 (mod N) ψ s.t. ⊕φψ w.p. > 2/3 ⇒ #θψ ≠ 0 (mod N) Attempt 1: let φψr be the formula generated using random tape r. To determine if ψ is such that number of random tapes r for which ⊕φψr holds is 0 or > (2/3)2m
15
Converting the probabilistic guarantee to a deterministic #P calculation ψ s.t. ¬⊕φψ ⇒ #θψ = 0 (mod N) ψ s.t. ⊕φψ w.p. > 2/3 ⇒ #θψ ≠ 0 (mod N) Attempt 1: let φψr be the formula generated using random tape r. To determine if ψ is such that number of random tapes r for which ⊕φψr holds is 0 or > (2/3)2m Enough to compute #r ⊕φψr
15
Converting the probabilistic guarantee to a deterministic #P calculation ψ s.t. ¬⊕φψ ⇒ #θψ = 0 (mod N) ψ s.t. ⊕φψ w.p. > 2/3 ⇒ #θψ ≠ 0 (mod N) Attempt 1: let φψr be the formula generated using random tape r. To determine if ψ is such that number of random tapes r for which ⊕φψr holds is 0 or > (2/3)2m Enough to compute #r ⊕φψr But ⊕φψr is not in P (though φψr(x) is in P)
15
16
Attempt 2: If ⊕xφψr = #xφψr then enough to compute the number of (x,r) such that φψr(x)
16
Attempt 2: If ⊕xφψr = #xφψr then enough to compute the number of (x,r) such that φψr(x) But ⊕φψ is #φψ mod 2
16
Attempt 2: If ⊕xφψr = #xφψr then enough to compute the number of (x,r) such that φψr(x) But ⊕φψ is #φψ mod 2 Plan: Create φ’= T(φ), such that
16
Attempt 2: If ⊕xφψr = #xφψr then enough to compute the number of (x,r) such that φψr(x) But ⊕φψ is #φψ mod 2 Plan: Create φ’= T(φ), such that ¬⊕φ ⇒ #φ’ = 0 mod N
16
Attempt 2: If ⊕xφψr = #xφψr then enough to compute the number of (x,r) such that φψr(x) But ⊕φψ is #φψ mod 2 Plan: Create φ’= T(φ), such that ¬⊕φ ⇒ #φ’ = 0 mod N ⊕φ ⇒ #φ’ = -1 mod N
16
Attempt 2: If ⊕xφψr = #xφψr then enough to compute the number of (x,r) such that φψr(x) But ⊕φψ is #φψ mod 2 Plan: Create φ’= T(φ), such that ¬⊕φ ⇒ #φ’ = 0 mod N ⊕φ ⇒ #φ’ = -1 mod N N > 2m so that for (2/3).2m < R ≤ 2m we have R.(-1) ≠ 0 mod N
16
Attempt 2: If ⊕xφψr = #xφψr then enough to compute the number of (x,r) such that φψr(x) But ⊕φψ is #φψ mod 2 Plan: Create φ’= T(φ), such that ¬⊕φ ⇒ #φ’ = 0 mod N ⊕φ ⇒ #φ’ = -1 mod N N > 2m so that for (2/3).2m < R ≤ 2m we have R.(-1) ≠ 0 mod N Let θψ(x,r) = T(φψr)(x). Use #θψ mod N to check if w.h.p. ⊕φ
16
17
Remains to do: Given φ, create φ’ such that for N=22^k, where k = O(log m)
17
Remains to do: Given φ, create φ’ such that for N=22^k, where k = O(log m) ¬⊕φ ⇒ #φ’ = 0 mod N
17
Remains to do: Given φ, create φ’ such that for N=22^k, where k = O(log m) ¬⊕φ ⇒ #φ’ = 0 mod N ⊕φ ⇒ #φ’ = -1 mod N
17
Remains to do: Given φ, create φ’ such that for N=22^k, where k = O(log m) ¬⊕φ ⇒ #φ’ = 0 mod N ⊕φ ⇒ #φ’ = -1 mod N Initially true for N = 2 (22^i, i=0)
17
Remains to do: Given φ, create φ’ such that for N=22^k, where k = O(log m) ¬⊕φ ⇒ #φ’ = 0 mod N ⊕φ ⇒ #φ’ = -1 mod N Initially true for N = 2 (22^i, i=0) φi+1 = F4(φi)^3 + 3(φi)^4 so that #φi+1 = 4(#φi)3 + 3(#φi)4
17
Remains to do: Given φ, create φ’ such that for N=22^k, where k = O(log m) ¬⊕φ ⇒ #φ’ = 0 mod N ⊕φ ⇒ #φ’ = -1 mod N Initially true for N = 2 (22^i, i=0) φi+1 = F4(φi)^3 + 3(φi)^4 so that #φi+1 = 4(#φi)3 + 3(#φi)4 #φi = -1 mod 22^i implies φi+1 = -1 mod 22^(i+1) (for i≥0)
17
Remains to do: Given φ, create φ’ such that for N=22^k, where k = O(log m) ¬⊕φ ⇒ #φ’ = 0 mod N ⊕φ ⇒ #φ’ = -1 mod N Initially true for N = 2 (22^i, i=0) φi+1 = F4(φi)^3 + 3(φi)^4 so that #φi+1 = 4(#φi)3 + 3(#φi)4 #φi = -1 mod 22^i implies φi+1 = -1 mod 22^(i+1) (for i≥0) Clearly #φi = 0 mod 22^i implies φi+1 = 0 mod 22^(i+1)
17
18
Summary:
18
Summary: First, randomized reduction of PH to P⊕P
18
Summary: First, randomized reduction of PH to P⊕P TQBF instance ψ to ⊕SAT instance φψ
18
Summary: First, randomized reduction of PH to P⊕P TQBF instance ψ to ⊕SAT instance φψ ψ ⇒ ⊕φψ w.p. > 2/3; ¬ψ ⇒ ¬⊕φψ (w.p. 1)
18
Summary: First, randomized reduction of PH to P⊕P TQBF instance ψ to ⊕SAT instance φψ ψ ⇒ ⊕φψ w.p. > 2/3; ¬ψ ⇒ ¬⊕φψ (w.p. 1) Converting the probabilistic guarantee to a deterministic #P calculation
18
Summary: First, randomized reduction of PH to P⊕P TQBF instance ψ to ⊕SAT instance φψ ψ ⇒ ⊕φψ w.p. > 2/3; ¬ψ ⇒ ¬⊕φψ (w.p. 1) Converting the probabilistic guarantee to a deterministic #P calculation ψ s.t. ¬⊕φψ ⇒ #θψ = 0 (mod N)
18
Summary: First, randomized reduction of PH to P⊕P TQBF instance ψ to ⊕SAT instance φψ ψ ⇒ ⊕φψ w.p. > 2/3; ¬ψ ⇒ ¬⊕φψ (w.p. 1) Converting the probabilistic guarantee to a deterministic #P calculation ψ s.t. ¬⊕φψ ⇒ #θψ = 0 (mod N) ψ s.t. ⊕φψ w.p. > 2/3 ⇒ #θψ ≠ 0 (mod N)
18
19
α-approximation of f: estimate f(x) within a factor α
19
α-approximation of f: estimate f(x) within a factor α Randomized approximation (“PAC”): answer is within a factor α with probability at least 1-δ
19
α-approximation of f: estimate f(x) within a factor α Randomized approximation (“PAC”): answer is within a factor α with probability at least 1-δ #CYCLE is hard to even approximate unless P=NP
19
α-approximation of f: estimate f(x) within a factor α Randomized approximation (“PAC”): answer is within a factor α with probability at least 1-δ #CYCLE is hard to even approximate unless P=NP If P=NP, every problem in #P can be “well approximated”
19
α-approximation of f: estimate f(x) within a factor α Randomized approximation (“PAC”): answer is within a factor α with probability at least 1-δ #CYCLE is hard to even approximate unless P=NP If P=NP, every problem in #P can be “well approximated” Permanent has an FPRAS
19
α-approximation of f: estimate f(x) within a factor α Randomized approximation (“PAC”): answer is within a factor α with probability at least 1-δ #CYCLE is hard to even approximate unless P=NP If P=NP, every problem in #P can be “well approximated” Permanent has an FPRAS For any ε, δ > 0, α-approximation for α = 1-ε in time poly(n, log 1/ε, log 1/δ)
19
α-approximation of f: estimate f(x) within a factor α Randomized approximation (“PAC”): answer is within a factor α with probability at least 1-δ #CYCLE is hard to even approximate unless P=NP If P=NP, every problem in #P can be “well approximated” Permanent has an FPRAS For any ε, δ > 0, α-approximation for α = 1-ε in time poly(n, log 1/ε, log 1/δ) Technique: Monte Carlo Markov Chain (MCMC)
19
α-approximation of f: estimate f(x) within a factor α Randomized approximation (“PAC”): answer is within a factor α with probability at least 1-δ #CYCLE is hard to even approximate unless P=NP If P=NP, every problem in #P can be “well approximated” Permanent has an FPRAS For any ε, δ > 0, α-approximation for α = 1-ε in time poly(n, log 1/ε, log 1/δ) Technique: Monte Carlo Markov Chain (MCMC) Very useful for sampling. Turns out counting ≈ sampling!
19
α-approximation of f: estimate f(x) within a factor α Randomized approximation (“PAC”): answer is within a factor α with probability at least 1-δ #CYCLE is hard to even approximate unless P=NP If P=NP, every problem in #P can be “well approximated” Permanent has an FPRAS For any ε, δ > 0, α-approximation for α = 1-ε in time poly(n, log 1/ε, log 1/δ) Technique: Monte Carlo Markov Chain (MCMC) Very useful for sampling. Turns out counting ≈ sampling!
19