Complexity of Counting Lecture 21 #P: Toda s Theorem 1 Last Time - - PowerPoint PPT Presentation

complexity of counting
SMART_READER_LITE
LIVE PREVIEW

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:


slide-1
SLIDE 1

Complexity of Counting

Lecture 21 #P: Toda’ s Theorem

1

slide-2
SLIDE 2

Last Time

2

slide-3
SLIDE 3

Last Time

#P: counting problems of the form #R(x) = |{w: R(x,w)=1}|, where R is a polynomial time relation

2

slide-4
SLIDE 4

Last Time

#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

slide-5
SLIDE 5

Last Time

#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

slide-6
SLIDE 6

Last Time

#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

slide-7
SLIDE 7

Last Time

#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

slide-8
SLIDE 8

Last Time

#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

slide-9
SLIDE 9

Last Time

#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

slide-10
SLIDE 10

♁P

3

slide-11
SLIDE 11

♁P

⊕P: parity of the number of witnesses

3

slide-12
SLIDE 12

♁P

⊕P: parity of the number of witnesses e.g. ⊕SAT. Least significant bit of #SAT.

3

slide-13
SLIDE 13

♁P

⊕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

slide-14
SLIDE 14

♁P

⊕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

slide-15
SLIDE 15

♁P

⊕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

slide-16
SLIDE 16

♁P

⊕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

slide-17
SLIDE 17

♁P

⊕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

slide-18
SLIDE 18

♁P

⊕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

slide-19
SLIDE 19

♁P ⊆ RP ⇒ NP=RP

4

slide-20
SLIDE 20

♁P ⊆ RP ⇒ NP=RP

Randomized reduction of NP to ⊕P

4

slide-21
SLIDE 21

♁P ⊆ RP ⇒ NP=RP

Randomized reduction of NP to ⊕P A probabilistic polynomial time algorithm A such that

4

slide-22
SLIDE 22

♁P ⊆ RP ⇒ NP=RP

Randomized reduction of NP to ⊕P A probabilistic polynomial time algorithm A such that φ ∉ SAT ⇒ Pr[A(φ) ∈ ⊕SAT] = 0

4

slide-23
SLIDE 23

♁P ⊆ RP ⇒ NP=RP

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

slide-24
SLIDE 24

♁P ⊆ RP ⇒ NP=RP

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

slide-25
SLIDE 25

♁P ⊆ RP ⇒ NP=RP

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

slide-26
SLIDE 26

♁P ⊆ RP ⇒ NP=RP

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

slide-27
SLIDE 27

♁P ⊆ RP ⇒ NP=RP

5

slide-28
SLIDE 28

♁P ⊆ RP ⇒ NP=RP

Randomized reduction of SAT to Unique-SAT: A probabilistic polynomial time algorithm A such that

5

slide-29
SLIDE 29

♁P ⊆ RP ⇒ NP=RP

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

slide-30
SLIDE 30

♁P ⊆ RP ⇒ NP=RP

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

slide-31
SLIDE 31

Hashing for unique preimage

6

slide-32
SLIDE 32

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].

Hashing for unique preimage

6

slide-33
SLIDE 33

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].

Hashing for unique preimage

6

slide-34
SLIDE 34

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]

Hashing for unique preimage

6

slide-35
SLIDE 35

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]

Hashing for unique preimage

6

slide-36
SLIDE 36

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]

Hashing for unique preimage

|S|p

6

slide-37
SLIDE 37

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]

Hashing for unique preimage

|S|p (|S| choose 2)p

6

slide-38
SLIDE 38

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]

Hashing for unique preimage

|S|p (|S| choose 2)p

6

slide-39
SLIDE 39

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]

Hashing for unique preimage

|S|p (|S| choose 2)p

6

slide-40
SLIDE 40

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

Hashing for unique preimage

|S|p (|S| choose 2)p

6

slide-41
SLIDE 41

♁P ⊆ RP ⇒ NP=RP

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

slide-42
SLIDE 42

♁P ⊆ RP ⇒ NP=RP

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

slide-43
SLIDE 43

♁P ⊆ RP ⇒ NP=RP

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

slide-44
SLIDE 44

Reducing PH to P#P

8

slide-45
SLIDE 45

Reducing PH to P#P

Two steps

8

slide-46
SLIDE 46

Reducing PH to P#P

Two steps Randomized reduction of PH to P⊕P

8

slide-47
SLIDE 47

Reducing PH to P#P

Two steps Randomized reduction of PH to P⊕P Converting the probabilistic guarantee to a deterministic #P statement

8

slide-48
SLIDE 48

Quantifier Gallery!

9

slide-49
SLIDE 49

Quantifier Gallery!

∃ For at least one

9

slide-50
SLIDE 50

Quantifier Gallery!

∃ For at least one ∀ For all

9

slide-51
SLIDE 51

Quantifier Gallery!

∃ For at least one ∀ For all ∃r For at least r fraction

9

slide-52
SLIDE 52

Quantifier Gallery!

∃ For at least one ∀ For all ∃r For at least r fraction ∃! For exactly one

9

slide-53
SLIDE 53

Quantifier Gallery!

∃ For at least one ∀ For all ∃r For at least r fraction ∃! For exactly one ⊕ For an odd number of

9

slide-54
SLIDE 54

QBF to ♁BF

10

slide-55
SLIDE 55

QBF to ♁BF

We have a randomized reduction: φ to Aφ such that

10

slide-56
SLIDE 56

QBF to ♁BF

We have a randomized reduction: φ to Aφ such that ∃w φ(w) ⇒ ⊕w Aφ(w) with prob. ≥ ε(n)

10

slide-57
SLIDE 57

QBF to ♁BF

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

slide-58
SLIDE 58

QBF to ♁BF

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

slide-59
SLIDE 59

QBF to ♁BF

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

slide-60
SLIDE 60

QBF to ♁BF

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

slide-61
SLIDE 61

Some # arithmetic

11

slide-62
SLIDE 62

Some # arithmetic

Given two boolean formulas φ(x) and ψ(y), define

11

slide-63
SLIDE 63

Some # arithmetic

Given two boolean formulas φ(x) and ψ(y), define Fφ.ψ(x,y): φ(x) and ψ(y)

11

slide-64
SLIDE 64

Some # arithmetic

Given two boolean formulas φ(x) and ψ(y), define Fφ.ψ(x,y): φ(x) and ψ(y) #Fφ.ψ = #φ . #ψ

11

slide-65
SLIDE 65

Some # arithmetic

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

slide-66
SLIDE 66

Some # arithmetic

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

slide-67
SLIDE 67

Some # arithmetic

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

slide-68
SLIDE 68

Some # arithmetic

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

slide-69
SLIDE 69

Some ⊕ arithmetic

12

slide-70
SLIDE 70

Some ⊕ arithmetic

Boolean combinations of QBFs with ⊕ quantifiers

12

slide-71
SLIDE 71

Some ⊕ arithmetic

Boolean combinations of QBFs with ⊕ quantifiers ⊕x φ(x) and ⊕y ψ(y) ⇔ ⊕x,y Fφ.ψ(x,y), i.e. ⊕x,y φ(x) and ψ(y)

12

slide-72
SLIDE 72

Some ⊕ arithmetic

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

slide-73
SLIDE 73

Some ⊕ arithmetic

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

slide-74
SLIDE 74

Some ⊕ arithmetic

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

slide-75
SLIDE 75

QBF to ♁BF

13

slide-76
SLIDE 76

QBF to ♁BF

Recall: with prob ≥ ε(n), we have ∃w φ(w) ⇔ ⊕w Aφ(w) (and ∀w not φ(w) ⇔ not ⊕w Aφ(w))

13

slide-77
SLIDE 77

QBF to ♁BF

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

slide-78
SLIDE 78

QBF to ♁BF

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

slide-79
SLIDE 79

QBF to ♁BF

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

slide-80
SLIDE 80

QBF to ♁BF

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

slide-81
SLIDE 81

QBF to ♁BF

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

slide-82
SLIDE 82

QBF to ♁BF

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

slide-83
SLIDE 83

Reducing PH to P#P

14

slide-84
SLIDE 84

Reducing PH to P#P

Two steps

14

slide-85
SLIDE 85

Reducing PH to P#P

Two steps Randomized reduction of PH to P⊕P

14

slide-86
SLIDE 86

Reducing PH to P#P

Two steps Randomized reduction of PH to P⊕P TQBF instance ψ to ⊕SAT instance φψ

14

slide-87
SLIDE 87

Reducing PH to P#P

Two steps Randomized reduction of PH to P⊕P TQBF instance ψ to ⊕SAT instance φψ ψ ⇒ ⊕φψ w.p. > 2/3; ¬ψ ⇒ ¬⊕φψ (w.p. 1)

14

slide-88
SLIDE 88

Reducing PH to P#P

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

slide-89
SLIDE 89

Reducing PH to P#P

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

slide-90
SLIDE 90

Reducing PH to P#P

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

slide-91
SLIDE 91

Reduction to #P

15

slide-92
SLIDE 92

Reduction to #P

Converting the probabilistic guarantee to a deterministic #P calculation

15

slide-93
SLIDE 93

Reduction to #P

Converting the probabilistic guarantee to a deterministic #P calculation ψ s.t. ¬⊕φψ ⇒ #θψ = 0 (mod N)

15

slide-94
SLIDE 94

Reduction to #P

Converting the probabilistic guarantee to a deterministic #P calculation ψ s.t. ¬⊕φψ ⇒ #θψ = 0 (mod N) ψ s.t. ⊕φψ w.p. > 2/3 ⇒ #θψ ≠ 0 (mod N)

15

slide-95
SLIDE 95

Reduction to #P

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

slide-96
SLIDE 96

Reduction to #P

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

slide-97
SLIDE 97

Reduction to #P

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

slide-98
SLIDE 98

Reduction to #P

16

slide-99
SLIDE 99

Reduction to #P

Attempt 2: If ⊕xφψr = #xφψr then enough to compute the number of (x,r) such that φψr(x)

16

slide-100
SLIDE 100

Reduction to #P

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

slide-101
SLIDE 101

Reduction to #P

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

slide-102
SLIDE 102

Reduction to #P

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

slide-103
SLIDE 103

Reduction to #P

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

slide-104
SLIDE 104

Reduction to #P

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

slide-105
SLIDE 105

Reduction to #P

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

slide-106
SLIDE 106

Reduction to #P

17

slide-107
SLIDE 107

Reduction to #P

Remains to do: Given φ, create φ’ such that for N=22^k, where k = O(log m)

17

slide-108
SLIDE 108

Reduction to #P

Remains to do: Given φ, create φ’ such that for N=22^k, where k = O(log m) ¬⊕φ ⇒ #φ’ = 0 mod N

17

slide-109
SLIDE 109

Reduction to #P

Remains to do: Given φ, create φ’ such that for N=22^k, where k = O(log m) ¬⊕φ ⇒ #φ’ = 0 mod N ⊕φ ⇒ #φ’ = -1 mod N

17

slide-110
SLIDE 110

Reduction to #P

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

slide-111
SLIDE 111

Reduction to #P

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

slide-112
SLIDE 112

Reduction to #P

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

slide-113
SLIDE 113

Reduction to #P

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

slide-114
SLIDE 114

PH ⊆ P#P

18

slide-115
SLIDE 115

PH ⊆ P#P

Summary:

18

slide-116
SLIDE 116

PH ⊆ P#P

Summary: First, randomized reduction of PH to P⊕P

18

slide-117
SLIDE 117

PH ⊆ P#P

Summary: First, randomized reduction of PH to P⊕P TQBF instance ψ to ⊕SAT instance φψ

18

slide-118
SLIDE 118

PH ⊆ P#P

Summary: First, randomized reduction of PH to P⊕P TQBF instance ψ to ⊕SAT instance φψ ψ ⇒ ⊕φψ w.p. > 2/3; ¬ψ ⇒ ¬⊕φψ (w.p. 1)

18

slide-119
SLIDE 119

PH ⊆ P#P

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

slide-120
SLIDE 120

PH ⊆ P#P

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

slide-121
SLIDE 121

PH ⊆ P#P

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

slide-122
SLIDE 122

Approximation for #P

19

slide-123
SLIDE 123

Approximation for #P

α-approximation of f: estimate f(x) within a factor α

19

slide-124
SLIDE 124

Approximation for #P

α-approximation of f: estimate f(x) within a factor α Randomized approximation (“PAC”): answer is within a factor α with probability at least 1-δ

19

slide-125
SLIDE 125

Approximation for #P

α-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

slide-126
SLIDE 126

Approximation for #P

α-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

slide-127
SLIDE 127

Approximation for #P

α-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

slide-128
SLIDE 128

Approximation for #P

α-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

slide-129
SLIDE 129

Approximation for #P

α-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

slide-130
SLIDE 130

Approximation for #P

α-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

slide-131
SLIDE 131

Approximation for #P

α-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