CS154, Lecture 17: conp, Oracles again, Space Complexity

Similar documents
Definition: conp = { L L NP } What does a conp computation look like?

conp, Oracles, Space Complexity

Lecture 21: Space Complexity (The Final Exam Frontier?)

Lecture 20: conp and Friends, Oracles in Complexity Theory

Lecture 19: Finish NP-Completeness, conp and Friends

Lecture 22: PSPACE

CS154, Lecture 13: P vs NP

COMPLEXITY THEORY. PSPACE = SPACE(n k ) k N. NPSPACE = NSPACE(n k ) 10/30/2012. Space Complexity: Savitch's Theorem and PSPACE- Completeness

CS154, Lecture 13: P vs NP

CS154, Lecture 10: Rice s Theorem, Oracle Machines

: Computational Complexity Lecture 3 ITCS, Tsinghua Univesity, Fall October 2007

CS5371 Theory of Computation. Lecture 19: Complexity IV (More on NP, NP-Complete)

Lecture 24: Randomized Complexity, Course Summary

Computability Theory

Space Complexity. The space complexity of a program is how much memory it uses.

6.841/18.405J: Advanced Complexity Wednesday, February 12, Lecture Lecture 3

Complexity Theory. Knowledge Representation and Reasoning. November 2, 2005

1 Computational Problems

Lecture 16: Time Complexity and P vs NP

Notes for Lecture Notes 2

1 PSPACE-Completeness

P vs. NP Classes. Prof. (Dr.) K.R. Chowdhary.

Lecture 3: Reductions and Completeness

Principles of Knowledge Representation and Reasoning

Time Complexity. CS60001: Foundations of Computing Science

Time Complexity. Definition. Let t : n n be a function. NTIME(t(n)) = {L L is a language decidable by a O(t(n)) deterministic TM}

Lecture 9: Polynomial-Time Hierarchy, Time-Space Tradeoffs

Finish K-Complexity, Start Time Complexity

Chapter 7: Time Complexity

Lecture 6: Oracle TMs, Diagonalization Limits, Space Complexity

CSC 5170: Theory of Computational Complexity Lecture 9 The Chinese University of Hong Kong 15 March 2010

CS5371 Theory of Computation. Lecture 23: Complexity VIII (Space Complexity)

The purpose here is to classify computational problems according to their complexity. For that purpose we need first to agree on a computational

Lecture 8: Alternatation. 1 Alternate Characterizations of the Polynomial Hierarchy

CSE 555 HW 5 SAMPLE SOLUTION. Question 1.

Advanced topic: Space complexity

Could we potentially place A in a smaller complexity class if we consider other computational models?

Chapter 1 - Time and Space Complexity. deterministic and non-deterministic Turing machine time and space complexity classes P, NP, PSPACE, NPSPACE

Complexity Theory VU , SS The Polynomial Hierarchy. Reinhard Pichler

Outline. Complexity Theory EXACT TSP. The Class DP. Definition. Problem EXACT TSP. Complexity of EXACT TSP. Proposition VU 181.

Computability and Complexity CISC462, Fall 2018, Space complexity 1

Lecture 17: Cook-Levin Theorem, NP-Complete Problems

Complete problems for classes in PH, The Polynomial-Time Hierarchy (PH) oracle is like a subroutine, or function in

ITCS:CCT09 : Computational Complexity Theory Apr 8, Lecture 7

The Complexity of Optimization Problems

U.C. Berkeley CS278: Computational Complexity Professor Luca Trevisan August 30, Notes for Lecture 1

BBM402-Lecture 11: The Class NP

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

NP-Completeness. A language B is NP-complete iff B NP. This property means B is NP hard

Computational Complexity Theory

V Honors Theory of Computation

CS151 Complexity Theory. Lecture 1 April 3, 2017

Review of Basic Computational Complexity

Polynomial Time Computation. Topics in Logic and Complexity Handout 2. Nondeterministic Polynomial Time. Succinct Certificates.

6-1 Computational Complexity

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY. FLAC (15-453) Spring l. Blum TIME COMPLEXITY AND POLYNOMIAL TIME;

an efficient procedure for the decision problem. We illustrate this phenomenon for the Satisfiability problem.

CSE 105 Theory of Computation

15.1 Proof of the Cook-Levin Theorem: SAT is NP-complete

U.C. Berkeley CS278: Computational Complexity Professor Luca Trevisan 9/6/2004. Notes for Lecture 3

Algorithms and Theory of Computation. Lecture 19: Class P and NP, Reduction

The Polynomial Hierarchy

CISC 4090 Theory of Computation

Advanced Topics in Theoretical Computer Science

Turing Machines and Time Complexity

CSCI 1590 Intro to Computational Complexity

DRAFT. Diagonalization. Chapter 4

6.045 Final Exam Solutions

Theory of Computation CS3102 Spring 2015 A tale of computers, math, problem solving, life, love and tragic death

CSE 135: Introduction to Theory of Computation NP-completeness

satisfiability (sat) Satisfiability unsatisfiability (unsat or sat complement) and validity Any Expression φ Can Be Converted into CNFs and DNFs

Computability Theory

Notes on Space-Bounded Complexity

Lecture Notes Each circuit agrees with M on inputs of length equal to its index, i.e. n, x {0, 1} n, C n (x) = M(x).

CSE 105 THEORY OF COMPUTATION

NP Complete Problems. COMP 215 Lecture 20

P = k T IME(n k ) Now, do all decidable languages belong to P? Let s consider a couple of languages:

Lecture 3: Nondeterminism, NP, and NP-completeness

NP-completeness was introduced by Stephen Cook in 1971 in a foundational paper.

Computational Models Lecture 11, Spring 2009

Time Complexity (1) CSCI Spring Original Slides were written by Dr. Frederick W Maier. CSCI 2670 Time Complexity (1)

Final exam study sheet for CS3719 Turing machines and decidability.

P and NP. Or, how to make $1,000,000.

CS 6505, Complexity and Algorithms Week 7: NP Completeness

Umans Complexity Theory Lectures

Computability and Complexity

The space complexity of a standard Turing machine. The space complexity of a nondeterministic Turing machine

MTAT Complexity Theory October 13th-14th, Lecture 6

Theory of Computation Time Complexity

Computational Complexity CSCI-GA Subhash Khot Transcribed by Patrick Lin

NP, polynomial-time mapping reductions, and NP-completeness

Decidability and Undecidability

CS5371 Theory of Computation. Lecture 14: Computability V (Prove by Reduction)

The Class NP. NP is the problems that can be solved in polynomial time by a nondeterministic machine.

A.Antonopoulos 18/1/2010

Exam Computability and Complexity

COSE215: Theory of Computation. Lecture 20 P, NP, and NP-Complete Problems

CS154, Lecture 15: Cook-Levin Theorem SAT, 3SAT

Notes on Space-Bounded Complexity

Transcription:

CS154, Lecture 17: conp, Oracles again, Space Complexity

Definition: conp = { L L NP } What does a conp computation look like? In NP algorithms, we can use a guess instruction in pseudocode: Guess string y of x k length and the machine accepts if some y leads to an accept state In conp algorithms, we can use a try all instruction: Try all strings y of x k length and the machine accepts if every y leads to an accept state

TAUTOLOGY = { is a Boolean formula and every variable assignment satisfies } Theorem: TAUTOLOGY is in conp How would we write pseudocode for a conp machine that decides TAUTOLOGY? How would we write TAUTOLOGY as the complement of some NP language?

Is P conp? Yes! L P implies that L P (hence L NP) In general, deterministic complexity classes are closed under complement

It is believed that NP conp Is NP = conp?

conp P NP

Definition: A language B is conp-complete if 1. B conp 2. For every A in conp, there is a polynomial-time reduction from A to B (B is conp-hard)

UNSAT = { is a Boolean formula and no variable assignment satisfies } Theorem: UNSAT is conp-complete Proof: UNSAT conp because UNSAT = SAT (2) UNSAT is conp-hard: Let A conp. We show A P UNSAT On input w, transform w into a formula using the Cook- Levin Theorem and an NP machine N for A w A SAT w A UNSAT w A SAT w A UNSAT

UNSAT = { is a Boolean formula and no variable assignment satisfies } Theorem: UNSAT is conp-complete TAUTOLOGY = { is a Boolean formula and every variable assignment satisfies } = { UNSAT} Theorem: TAUTOLOGY is conp-complete 1. TAUTOLOGY conp (already shown) 2. TAUTOLOGY is conp-hard: UNSAT P TAUTOLOGY: Given formula, output

Every NP-complete problem has a conp-complete counterpart NP-complete problems: SAT, 3SAT, CLIQUE, VC, SUBSET-SUM, conp-complete problems: UNSAT, TAUTOLOGY, NOCLIQUE,

conp??? P NP

Is P = NP conp?

An Interesting Problem in NP conp FACTORING = { (m, n) m > n > 1 are integers, there is a prime factor p of m where n p < m } If FACTORING P, then we could break most public-key cryptography currently in use! Theorem: FACTORING NP conp

To show that FACTORING NP conp, we ll use PRIMES = {n n is a prime integer}

FACTORING = { (m, n) m, n > 1 are integers, there is a prime factor p of m where n p < m } Theorem: FACTORING NP conp Proof: The prime factorization p 1 e1 p k ek of m can be used to efficiently prove that either (m,n) is in FACTORING or (m,n) is not in FACTORING: First verify each p i is prime and p 1 e1 p k ek = m If there is a p i n then (m,n) is in FACTORING If for all i, p i < n then (m,n) is not in FACTORING

conp TAUTOLOGY FACTORING P SAT NP

NP-complete problems: SAT, 3SAT, CLIQUE, VC, SUBSET-SUM, conp-complete problems: UNSAT, TAUTOLOGY, NOHAMPATH, (NP conp)-complete problems: Nobody knows if they exist P, NP, conp can be defined in terms of specific machine models, and for every possible machine we can give an encoding of it. NP conp is not known to have a corresponding machine model

Polynomial Time With Oracles P NP conp NP NP NP

How to Think about Oracles? Think in terms of Turing Machine pseudocode or a subroutine An oracle Turing machine M with oracle B Γ* lets you include the following kind of branching instructions: if (z in B) then <do something> else <do something else> where z is some string defined earlier in pseudocode. By definition, the oracle TM can always check the condition (z in B) in one step

Some Complexity Classes With Oracles P B = { L L can be decided by some polynomial-time TM with an oracle for B } P SAT P NP = the class of languages decidable in polynomial time with an oracle for SAT = the class of languages decidable by some polynomialtime oracle TM with an oracle for some B in NP

Is P SAT P NP? Yes. By definition Is P NP P SAT? Yes: Every NP language can be reduced to SAT! For every poly-time TM M with oracle B NP, we can simulate every query z to oracle B by reducing z to a formula φ in poly-time, then asking an oracle for SAT instead

P B = { L L can be decided by a polynomial-time TM with an oracle for B } Suppose B is in P. Is P B P? Yes For every poly-time TM M with oracle B P, we can simulate every query z to oracle B by simply running a polynomial-time decider for B. The resulting machine runs in polynomial time

Is NP P NP? Yes Just ask the oracle for the answer! For every L NP define an oracle TM M L which asks the oracle if the input is in L.

Is conp P NP? Yes! Again, just ask the oracle for the answer! For every L conp we know L NP Define an oracle TM M L which asks the oracle if the input is in L accept if the answer is no, reject if the answer is yes More generaly, we have P NP = P conp

NP B = { L L can be decided by a polynomial-time nondeterministic TM with an oracle for B } conp B = { L L can be decided by a poly-time co-nondeterministic TM with an oracle for B } Is NP = NP NP? Is conp NP = NP NP? It is believed that the answers are NO

Two Boolean formulas and over the variables x 1,,x n are equivalent if they have the same value on every assignment to the variables Are x and x x equivalent? Logic Minimization is in conp NP Yes Are x and x x equivalent? No Are (x y) ( x y) and x y equivalent? Yes A Boolean formula is minimal if no smaller formula is equivalent to MIN-FORMULA = { is minimal}

Theorem: MIN-FORMULA conp NP Proof: Define NEQUIV = { (, ) and are not equivalent} Observation: NEQUIV NP (Why?) Here is a conp NEQUIV machine for MIN-FORMULA: Given a formula, Try all formulas smaller than : If (, ) NEQUIV then accept else reject MIN-FORMULA is not known to be in conp

conp NP MIN-FORMULA conp P NP TAUT P FACTORING SAT NP NP NP Undecidable Decidable

Space Complexity

Measuring Space Complexity We measure space complexity by looking at the largest tape index reached during the computation

Let M be a deterministic TM. Definition: The space complexity of M is the function S : N N, where S(n) is the largest tape index reached by M on any input of length n. Definition: SPACE(S(n)) = { L L is decided by a Turing machine with O(S(n)) space complexity}

Theorem: 3SAT SPACE(n) Proof : Try all possible assignments to the (at most n) variables in a formula of length n. This can be done in O(n) space. Theorem: NTIME(t(n)) is in SPACE(t(n)) Proof : Try all possible computation paths of t(n) steps for an NTM on length-n input. This can be done in O(t(n)) space.

The class SPACE(s(n)) formalizes the class of problems solvable by computers with bounded memory. Fundamental (Unanswered) Question: How does time relate to space, in computing? SPACE(n 2 ) problems could potentially take much longer than n 2 steps to solve Intuition: You can re-use space, but not time

Time Complexity of SPACE(S(n)) Let M be a halting TM that on input x, uses S space How many time steps can M(x) possibly take? Is there an upper bound? The number of time steps is at most the total number of possible configurations! (If a configuration repeats, the machine is looping.) A configuration of M specifies a head position, state, and S cells of tape content. The total number of configurations is at most: S Q Γ S = 2 O(S)

Corollary: Space S(n) computations can be decided in 2 O(S(n)) time: SPACE(s(n)) TIME(2 c s(n) ) c N Idea: After 2 O(s(n)) time steps, a s(n)-space bounded computation must have repeated a configuration, so then it will never halt

PSPACE = SPACE(n k ) k N n EXPTIME = TIME(2 k ) k N PSPACE EXPTIME

Is P PSPACE? YES

Is NP PSPACE? YES

Is NP NP PSPACE? YES

P NP PSPACE EXPTIME Theorem: P EXPTIME Why? The Time Hierarchy Theorem! TIME(2 n ) P Therefore P EXPTIME

Space Hierarchy Theorem Intuition: If you have more space to work with, then you can solve strictly more problems! Theorem: For functions s, S : N N where s(n)/s(n) 0 SPACE(s(n)) SPACE(S(n)) Proof IDEA: Diagonalization: Make a machine M that uses S(n) space and does the opposite of all s(n) space machines on at least one input So L(M) is in SPACE(S(n)) but not SPACE(s(n))

conp NP MIN-FORMULA conp P NP TAUT P FACTORING SAT NP NP NP EXPTIME PSPACE