Top Banner
Complexity ©D. Moshkovitz 1 And Randomized Computations The Polynomial Hierarchy
30

Complexity ©D. Moshkovitz 1 And Randomized Computations The Polynomial Hierarchy.

Dec 21, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Complexity ©D. Moshkovitz 1 And Randomized Computations The Polynomial Hierarchy.

Complexity©D. Moshkovitz

1

And Randomized Computations

The Polynomial Hierarchy

Page 2: Complexity ©D. Moshkovitz 1 And Randomized Computations The Polynomial Hierarchy.

Complexity©D. Moshkovitz

2

Introduction

• Objectives:– To introduce the polynomial-time

hierarchy (PH)– To introduce BPP– To show the relationship between the two

• Overview:– satisfiability and PH– probabilistic TMs and BPP

– BPP2

Page 3: Complexity ©D. Moshkovitz 1 And Randomized Computations The Polynomial Hierarchy.

Complexity©D. Moshkovitz

3

Deciding Satifiability

We’ve already seen, that deciding whether a formula is satisfiable…

x1x2x3… [(x1x2x8)…(x6x3)]x1 …xn(x1x2x8)… (x6x3)

only existential quantifier existential & universal quantifiers

Page 4: Complexity ©D. Moshkovitz 1 And Randomized Computations The Polynomial Hierarchy.

Complexity©D. Moshkovitz

4

Technical Note

x1x2…xk is the same as x=<x1,x2,…,xk>

x1x2…xk is the same as x=<x1,x2,…,xk>

• Thus, allowing several adjacent quantifiers of the same type does not change the problem.

Page 5: Complexity ©D. Moshkovitz 1 And Randomized Computations The Polynomial Hierarchy.

Complexity©D. Moshkovitz

5

The Hierarchy

Definition (i): i is the class of all languages reducible to deciding the sat. of a formula of type:

x1x2 x3… R(x1,x2,x3,…)

i alternating quantifiers

Page 6: Complexity ©D. Moshkovitz 1 And Randomized Computations The Polynomial Hierarchy.

Complexity©D. Moshkovitz

6

The Hierarchy

Definition (i): i is the class of all languages reducible to deciding the sat. of a formula of type:

x1x2x3… R(x1,x2,x3,…)

i alternating quantifiers

Page 7: Complexity ©D. Moshkovitz 1 And Randomized Computations The Polynomial Hierarchy.

Complexity©D. Moshkovitz

7

PH (Polynomial-time Hierarchy)

Definition:

PH = i i

Page 8: Complexity ©D. Moshkovitz 1 And Randomized Computations The Polynomial Hierarchy.

Complexity©D. Moshkovitz

8

Simple Observations

• “base”: 1=NP

• “connection between and ”: i=coi

• “hierarchy”: ii+1 and ii+1

• “upper bound”: PHPSPACE

Page 9: Complexity ©D. Moshkovitz 1 And Randomized Computations The Polynomial Hierarchy.

Complexity©D. Moshkovitz

9

Can the Hierarchy Collapse?

Proposition: If NP=coNP, then PH=NP.

Proof Idea: By induction on i, i=NP.

Page 10: Complexity ©D. Moshkovitz 1 And Randomized Computations The Polynomial Hierarchy.

Complexity©D. Moshkovitz

10

Probabilistic Turing Machines

• Probabilistic TMs have an “extra” tape: the random tape

M(x) Prr[M(x,r)]content of input

tape

“standard” TMs probabilistic TMs

content of random

tape

Page 11: Complexity ©D. Moshkovitz 1 And Randomized Computations The Polynomial Hierarchy.

Complexity©D. Moshkovitz

11

Does It Really Capture The Notion of Randomized Algorithms?

It doesn’t matter if you toss all your coins in

advance or throughout the computation…

Page 12: Complexity ©D. Moshkovitz 1 And Randomized Computations The Polynomial Hierarchy.

Complexity©D. Moshkovitz

12

BPP (Bounded-Probability Polynomial-Time)

Definition: BPP is the class of all languages L which have a probabilistic polynomial time TM M, s.t

x Prr[M(x,r) = L(x)] 2/3

L(x)=1 xL

such TMs are called ‘Atlantic City’

Page 13: Complexity ©D. Moshkovitz 1 And Randomized Computations The Polynomial Hierarchy.

Complexity©D. Moshkovitz

13

BPP Illustrated

For any input x,

all random strings

random strings for which M is

right

Note: TMs which are right for most x’s (e.g for PRIMES: always say

‘NO’) are NOT acceptable!

Page 14: Complexity ©D. Moshkovitz 1 And Randomized Computations The Polynomial Hierarchy.

Complexity©D. Moshkovitz

14

Amplification

Claim: If LBPP, then there exists a probabilistic polynomial TM M’, and a polynomial p(n) s.t

x{0,1}n Prr{0,1}p(n)[M’(x,r)L(x)] <

1/(3p(n))We can get better

amplifications, but this will suffice here...

Page 15: Complexity ©D. Moshkovitz 1 And Randomized Computations The Polynomial Hierarchy.

Complexity©D. Moshkovitz

15

Proof Idea

• Repeat– Pick r uniformly at

random– Simulate M(x,r)

• Output the majority answer

r M(x,r)

0111001 Yes

1011100 Yes

0001001 No

1100000 Yes

0010011 No

0110001 Yes

Page 16: Complexity ©D. Moshkovitz 1 And Randomized Computations The Polynomial Hierarchy.

Complexity©D. Moshkovitz

16

Relations to P and NP

P BPP NP

ignore the random input

?

Page 17: Complexity ©D. Moshkovitz 1 And Randomized Computations The Polynomial Hierarchy.

Complexity©D. Moshkovitz

17

Does BPPNP?

We may have considered saying:“Use the random string as a

witness”

Why is that wrong?Because non-members may be recognized as members

Page 18: Complexity ©D. Moshkovitz 1 And Randomized Computations The Polynomial Hierarchy.

Complexity©D. Moshkovitz

18

“Some Comfort”

Theorem (Sipser,Lautemann): BPP2

Underlying observation:LBPP there exists a poly. probabilistic TM M,

s.t for any n and x{0,1}n let m=p(n) s.t

xL s1,…,sm{0,1}m r{0,1}m 1imM(x,rsi)=1

Make sure you understand why the theorem follows

Page 19: Complexity ©D. Moshkovitz 1 And Randomized Computations The Polynomial Hierarchy.

Complexity©D. Moshkovitz

19

{0, 1}m

Yes-instance

Page 20: Complexity ©D. Moshkovitz 1 And Randomized Computations The Polynomial Hierarchy.

Complexity©D. Moshkovitz

20

No-instance

{0, 1}m

Page 21: Complexity ©D. Moshkovitz 1 And Randomized Computations The Polynomial Hierarchy.

Complexity©D. Moshkovitz

21

Our Starting Point

• LBPP• By amplification, there’s a

poly-time machine M which– uses m random coins – errs w.p < 1/3m

M

x r

xL?

n bits

m bits

false for less than 1/3m of the

r’s

Page 22: Complexity ©D. Moshkovitz 1 And Randomized Computations The Polynomial Hierarchy.

Complexity©D. Moshkovitz

22

Proving the Underlying Observation

We will follow the Probabilistic Method

Prr[r has property P] > 0 r with property P

Page 23: Complexity ©D. Moshkovitz 1 And Randomized Computations The Polynomial Hierarchy.

Complexity©D. Moshkovitz

23

Yes-Instances Accepted

• Let xL.

• We want s1,…,sm{0,1}m s.t

r{0,1}m 1imM(x,rsi)=1

• So we’ll bound the probability over si’s that it doesn’t hold.

Page 24: Complexity ©D. Moshkovitz 1 And Randomized Computations The Polynomial Hierarchy.

Complexity©D. Moshkovitz

24

Bounding The Probability Random si’s Do Not Satisfy This

m1 m R

mm

is ,...,s {0,1}i 1

Pr r 0,1 , M x,r s 0

m1 m R

mm

is ,...,s {0,1}i 1

Pr r 0,1 , M x,r s 0

union-bound m

1 m Rm

m

is ,...,s {0,1}i 1r {0,1}

Pr M x,r s 0

m

1 m Rm

m

is ,...,s {0,1}i 1r {0,1}

Pr M x,r s 0

m1 m Rm

m

is ,...,s {0,1}i 1r {0,1}

Pr M(x,r s ) 0

m1 m Rm

m

is ,...,s {0,1}i 1r {0,1}

Pr M(x,r s ) 0

si’s

independent

mR

mm

s {0,1}i 1

2 Pr M x,s 0

mR

mm

s {0,1}i 1

2 Pr M x,s 0

r: s is random rs is random

mm 1

2 13m

mm 1

2 13m

xL

Page 25: Complexity ©D. Moshkovitz 1 And Randomized Computations The Polynomial Hierarchy.

Complexity©D. Moshkovitz

25

No-Instances Rejected

• Let xL.

• Let s1,…,sm{0,1}m .

• We want r{0,1}m s.t

1imM(x,rsi)=0

• So we’ll bound the probability over r that it doesn’t hold.

Page 26: Complexity ©D. Moshkovitz 1 And Randomized Computations The Polynomial Hierarchy.

Complexity©D. Moshkovitz

26

Bounding The Probability Random r Does Not Satisfy This

mR

m

ir {0,1}i 1

Pr M x,r s 1

mR

m

ir {0,1}i 1

Pr M x,r s 1

union-bound m

m

ir {0,1}i 1

Pr M x,r s 1

m

m

ir {0,1}i 1

Pr M x,r s 1

1

m 13m

1

m 13m

xL

Page 27: Complexity ©D. Moshkovitz 1 And Randomized Computations The Polynomial Hierarchy.

Complexity©D. Moshkovitz

27

Q.E.D!

It follows that:LBPP there’s a poly. prob. TM M,

s.t for any x there is m s.t

xL s1,…,sm r

1imM(x,rsi)=1

Thus, L2

BPP2

Page 28: Complexity ©D. Moshkovitz 1 And Randomized Computations The Polynomial Hierarchy.

Complexity©D. Moshkovitz

28

Summary

• We defined the polynomial-time hierarchy – Saw NP PH PSPACE– NP=coNP PH=NP (“the

hierarchy collapses”)

Page 29: Complexity ©D. Moshkovitz 1 And Randomized Computations The Polynomial Hierarchy.

Complexity©D. Moshkovitz

29

Summary

• We presented probabilistic TMs– We defined the complexity class BPP– We saw how to amplify randomized

computations

– We proved P BPP 2

Page 30: Complexity ©D. Moshkovitz 1 And Randomized Computations The Polynomial Hierarchy.

Complexity©D. Moshkovitz

30

Summary

• We also presented a new paradigm for proving existence utilizing the algebraic tools of probability theory

Prr[r has property P] > 0 r with property P

The probabilistic method