CS21 Decidability and Tractability

16
March 1, 2017 CS21 Lecture 22 1 CS21 Decidability and Tractability Lecture 22 March 1, 2017

description

CS21 Decidability and Tractability. Lecture 22 February 28, 2014. Outline. the class NP NP-complete problems: subset sum NP-complete problems: NAE-3-SAT, max-cut the class co-NP the class NP Å coNP. SUBSET-SUM is NP-complete. Theorem : the following language is NP-complete: - PowerPoint PPT Presentation

Transcript of CS21 Decidability and Tractability

Page 1: CS21  Decidability and Tractability

March 1, 2017 CS21 Lecture 22 1

CS21 Decidability and Tractability

Lecture 22March 1, 2017

Page 2: CS21  Decidability and Tractability

Outline

March 1, 2017 CS21 Lecture 22 2

Page 3: CS21  Decidability and Tractability

March 1, 2017 CS21 Lecture 22 3

Quantifier characterization of coNP

Page 4: CS21  Decidability and Tractability

March 1, 2017 CS21 Lecture 22 4

Proof interpretation of coNP

“proof” “proof verifier”“short” proof

Page 5: CS21  Decidability and Tractability

March 1, 2017 CS21 Lecture 22 5

coNP

• what complexity class do the following languages belong in?– COMPOSITES = {x : integer x is a composite}– PRIMES = {x : integer x is a prime number}– GRAPH-NONISOMORPHISM = {(G, H) : G

and H are graphs that are not isomorphic}– EXPANSION = {(G = (V,E), > 0): every

subset S V of size at most |V|/2 has at least |S| neighbors}

Page 6: CS21  Decidability and Tractability

March 1, 2017 CS21 Lecture 22 6

coNP

• Picture of the way we believe things are:

decidable languages

NPP

EXPcoNP

NP coNP

Page 7: CS21  Decidability and Tractability

March 1, 2017 CS21 Lecture 22 7

NP coNP

• Might guess NP coNP = P by analogy with RE (since RE coRE = DECIDABLE)

• Not believed to be true.• A problem in NP coNP not believed to

be in P:L = {(x, k): integer x has a prime factor p < k}

(decision version of factoring)

Page 8: CS21  Decidability and Tractability

March 1, 2017 CS21 Lecture 22 8

NP coNP

Page 9: CS21  Decidability and Tractability

March 1, 2017 CS21 Lecture 22 9

PRIMES in NP

Page 10: CS21  Decidability and Tractability

March 1, 2017 CS21 Lecture 22 10

Summary

• Picture of the way we believe things are:

decidable languages

NPP

EXP coNP

NP coNP

(decision version of ) FACTORING

Page 11: CS21  Decidability and Tractability

March 1, 2017 CS21 Lecture 22 11

Space complexity

Definition: the space complexity of a TM M is a function

f:NN → NNwhere f(n) is the maximum number of tape cells M scans on any input of length n.

• “M uses space f(n),” “M is a f(n) space TM”

Page 12: CS21  Decidability and Tractability

March 1, 2017 CS21 Lecture 22 12

Space complexity

Definition: SPACE(t(n)) = {L : there exists a TM M that decides L in space O(t(n))}

PSPACE = k ≥ 1 SPACE(nk)

Page 13: CS21  Decidability and Tractability

March 1, 2017 CS21 Lecture 22 13

PSPACE

• NP PSPACE, coNP PSPACE (proof?)• PSPACE EXP (proof?)• containments believed to be proper

PSPACE

NPP

EXP coNP

decidable languages

Page 14: CS21  Decidability and Tractability

March 1, 2017 CS21 Lecture 22 14

PSPACE

• A PSPACE-complete problem:• Quantified Satisfiability:

QSAT = {φ : φ is a 3-CNF, and x1x2x3x4x5…xn φ(x1, x2, x3, … xn) }

• example: φ = (x1x2x3)(x2x3)

x1x2x3φ? YES: x1=T; if x2=T, set x3=F; if x2=F, set x3=T

Page 15: CS21  Decidability and Tractability

March 1, 2017 CS21 Lecture 22 15

PSPACE

• A PSPACE-complete problem:• Quantified Satisfiability:

QSAT = {φ : φ is a 3-CNF, and x1x2x3x4x5…xn φ(x1, x2, x3, … xn) }

• example: φ = (x1x2x3)(x2)

x1x2x3φ? NO: x1=T; if x2=T…; x1=F; if x2=T…

Page 16: CS21  Decidability and Tractability

March 1, 2017 CS21 Lecture 22 16

QSAT is PSPACE-completeTheorem: QSAT is PSPACE-complete.• Proof:

– in PSPACE: x1x2x3 … Qxn φ(x1, x2, …, xn)?– “x1”: for both x1 = 0, x1 = 1, recursively solve

x2x3 … Qxn φ(x1, x2, …, xn)?• if at least one “yes”, return “yes”; else return “no”

– “x1”: for both x1 = 0, x1 = 1, recursively solve x2x3 … Qxn φ(x1, x2, …, xn)?

• if at least one “no”, return “no”; else return “yes”– base case: evaluating a 3-CNF expression– poly(n) recursion depth– poly(n) bits of state at each level