INAPPROX APPROX PTAS. FPTAS Knapsack P

Similar documents
Definition: Alternating time and space Game Semantics: State of machine determines who

Definition: Alternating time and space Game Semantics: State of machine determines who

-bit integers are all in ThC. Th The following problems are complete for PSPACE NPSPACE ATIME QSAT, GEOGRAPHY, SUCCINCT REACH.

Lecture 9: PSPACE. PSPACE = DSPACE[n O(1) ] = NSPACE[n O(1) ] = ATIME[n O(1) ]

Lecture 11: Proofs, Games, and Alternation

SOLUTION: SOLUTION: SOLUTION:

Ταουσάκος Θανάσης Αλγόριθμοι και Πολυπλοκότητα II 7 Φεβρουαρίου 2013

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

Lecture 8. MINDNF = {(φ, k) φ is a CNF expression and DNF expression ψ s.t. ψ k and ψ is equivalent to φ}

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

Algorithms & Complexity II Avarikioti Zeta

Lecture 20: PSPACE. November 15, 2016 CS 1010 Theory of Computation

1 PSPACE-Completeness

Lecture 22: PSPACE

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

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

Lecture 5: The Landscape of Complexity Classes

Introduction to Computational Complexity

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

Essential facts about NP-completeness:

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

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

Space and Nondeterminism

MTAT Complexity Theory October 20th-21st, Lecture 7

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

Interactive Proofs. Merlin-Arthur games (MA) [Babai] Decision problem: D;

Limits to Approximability: When Algorithms Won't Help You. Note: Contents of today s lecture won t be on the exam

Umans Complexity Theory Lectures

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

Complexity Classes IV

Computational Complexity IV: PSPACE

Lecture 7: Polynomial time hierarchy

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

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

Non-Approximability Results (2 nd part) 1/19

Computational Complexity Theory

Lecture 19: Interactive Proofs and the PCP Theorem

NP-Completeness. Sections 28.5, 28.6

CSCI 1590 Intro to Computational Complexity

Lecture 18: PCP Theorem and Hardness of Approximation I

Complexity Classes V. More PCPs. Eric Rachlin

Lecture 3: Nondeterminism, NP, and NP-completeness

6.045 Final Exam Solutions

Lecture 24: Randomized Complexity, Course Summary

CS154, Lecture 18: 1

Introduction to Complexity Theory

Lecture 7: The Polynomial-Time Hierarchy. 1 Nondeterministic Space is Closed under Complement

The Polynomial Hierarchy

Principles of Knowledge Representation and Reasoning

Theory of Computation Space Complexity. (NTU EE) Space Complexity Fall / 1

NP-Completeness and Boolean Satisfiability

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}

Notes for Lecture 3... x 4

CSE 555 HW 5 SAMPLE SOLUTION. Question 1.

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

CS601 DTIME and DSPACE Lecture 5. Time and Space functions: t,s : N N +

Lecture 23: More PSPACE-Complete, Randomized Complexity

CS Lecture 29 P, NP, and NP-Completeness. k ) for all k. Fall The class P. The class NP

COMPLEXITY THEORY. Lecture 17: The Polynomial Hierarchy. TU Dresden, 19th Dec Markus Krötzsch Knowledge-Based Systems

6.045: Automata, Computability, and Complexity (GITCS) Class 15 Nancy Lynch

conp, Oracles, Space Complexity

Theory of Computation. Ch.8 Space Complexity. wherein all branches of its computation halt on all

CSCI 1590 Intro to Computational Complexity

Notes for Lecture 3... x 4

Complexity Theory VU , SS The Polynomial Hierarchy. Reinhard Pichler

Space Complexity. Huan Long. Shanghai Jiao Tong University

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

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

CSC 5170: Theory of Computational Complexity Lecture 4 The Chinese University of Hong Kong 1 February 2010

CS21 Decidability and Tractability

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

Notes on Complexity Theory Last updated: October, Lecture 6

Lecture 25: Cook s Theorem (1997) Steven Skiena. skiena

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

A Complexity Theory for Parallel Computation

POLYNOMIAL SPACE QSAT. Games. Polynomial space cont d

Computational Complexity

6.840 Language Membership

NP Complete Problems. COMP 215 Lecture 20

Intro to Theory of Computation

Advanced Topics in Theoretical Computer Science

Database Theory VU , SS Complexity of Query Evaluation. Reinhard Pichler

Advanced topic: Space complexity

CS20a: NP completeness. NP-complete definition. Related properties. Cook's Theorem

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

Space is a computation resource. Unlike time it can be reused. Computational Complexity, by Fu Yuxi Space Complexity 1 / 44

A An Overview of Complexity Theory for the Algorithm Designer

9. PSPACE 9. PSPACE. PSPACE complexity class quantified satisfiability planning problem PSPACE-complete

Lecture 2 (Notes) 1. The book Computational Complexity: A Modern Approach by Sanjeev Arora and Boaz Barak;

9. PSPACE. PSPACE complexity class quantified satisfiability planning problem PSPACE-complete

Computability and Complexity CISC462, Fall 2018, Space complexity 1

Non-Deterministic Time

CSCI 1590 Intro to Computational Complexity

Space Complexity. Master Informatique. Université Paris 5 René Descartes. Master Info. Complexity Space 1/26

Ma/CS 117c Handout # 5 P vs. NP

DRAFT. Diagonalization. Chapter 4

2 Evidence that Graph Isomorphism is not NP-complete

Lecture 6: Oracle TMs, Diagonalization Limits, Space Complexity

Technische Universität München Summer term 2010 Theoretische Informatik August 2, 2010 Dr. J. Kreiker / Dr. M. Luttenberger, J. Kretinsky SOLUTION

Chapter 9. PSPACE: A Class of Problems Beyond NP. Slides by Kevin Wayne Pearson-Addison Wesley. All rights reserved.

Transcription:

CMPSCI 61: Recall From Last Time Lecture 22 Clique TSP INAPPROX exists P approx alg for no ε < 1 VertexCover MAX SAT APPROX TSP some but not all ε< 1 PTAS all ε < 1 ETSP FPTAS Knapsack P poly in n, 1/ε 1

CMPSCI 61: Interactive Proofs Lecture 22 x: read-only input n finite σ: random bits control Π: Proof work tape Merlin-Arthur games (MA) [Babai] Decision problem: ; input string: Merlin Prover chooses the polynomial-length string that Maximizes the chances of convincing Arthur that is an element of. Arthur Verifier computes the Average value of his possible computations on. Arthur is a polynomialtime, probabilistic Turing machine. 2

+ Definition 22.1 We say that accepts iff the following conditions hold: 1. If, there exists a proof, such that accepts for every random string, 2. If, for every proof, rejects for most of the random strings,! " #$ %%&')( * 3

Any decision problem NP has a deterministic, polynomialtime verifier satisfying Definition 22.1. By adding randomness to the verifier, we can greatly restrict its computational power and the number of bits of that it needs to look at, while still enabling it to accept all of NP. We say that a verifier is -restricted iff for all inputs of size, and all proofs, uses at most # random bits and examines at most of its proof,. Let PCP accepted by # bits # be the set of boolean queries that are # -restricted verifiers. Fact 22.2 (PCP Theorem) NP PCP The proof of this theorem is pretty messy, certainly more than we can deal with here. But we can look at the applications of the PCP Theorem to approximation problems. 4

MAX- -SAT: given a 3CNF formula, find a truth assignment that maximizes the number of true clauses. & & Proposition 22.3 MAX- -SAT has a polynomial-time approximation algorithm. Proof: Be greedy, set each variable in turn to the better + value. You can do better a random assignment gets 7/8 of the clauses. Open for Years: Assuming NP P is there some, ( ( s.t. MAX- -SAT has no PTIME -approximation algorithm? 5

Theorem 22.4 The PCP theorem (NP is equivalent to the fact that If P NP, then For some,, PCP MAX- -SAT has no polynomial-time, -approximation algorithm. ) Fact 22.5 MAX- -SAT has a PTIME approximation algorithm with and no better ratio can be achieved unless P NP. References: Approximation Algorithms for NP Hard Problems, Dorit Hochbaum, ed., PWS, 1997. Juraj Hromkovic, Algorithmics for Hard Problems, Springer, 21. Sanjeev Arora, The Approximability of NP-hard Problems, STOC 98, www.cs.princeton.edu/ arora. 6

CMPSCI 61: Alternation Lecture 22 The concept of a nondeterministic acceptor of a boolean query has a long and rich history, going back to various kinds of nondeterministic automata. It is important to remember that these are fictitious machines: we suspect that they cannot be built. For STRUC fin a boolean query, define its complement STRUC fin. Given a complexity class,, define the complementary class, co- Example: SAT NP; SAT co-np Open question: NP co-np If one could really build an NP machine, then one could with a single gate to invert its answer also build a co- NP machine. From a very practical point of view, the complexity of a problem and its complement, are identical. 7

CMPSCI 61: Nondeterminism Lecture 22 s t(n) 1 t(n) 2 Value ID Value(LeftChild(ID)) Value(Right(Child(ID) weak communication pattern; wasteful use of all these processors 8

Definition 22.6 Define an alternating Turing machine to be a Turing machine whose states are divided into two groups: the existential states and the universal states. Recall that an instantaneous description (ID) consists of the machine s state, work-tape contents, and head positions. The notion of when such a machine accepts an input is defined by induction: The alternating Turing machine in ID accepts iff 1. ID is in a final accepting state, or 2. ID is in an existential state and there exists a next ID that accepts, or 3. ID is in a universal state, there is at least one next ID, and all next ID s accept. t s E A E t(n) 9

CMPSCI 61: The Game Semantics Lecture 22 What does it mean for a string to be in the language of an alternating TM? We sometimes misleadingly say the ATM accepts just as we might say the NDTM accepts. But this isn t really sensible, because we should not talk about what an NDTM or ATM will do, only what it might do. Language of an NDTM: iff might accept. Equivalently: if a smart player, who controls s choices and wants to accept, can make accept. Game Semantics of an ATM: There are two players, White who controls in the existential states and wants to accept, and Black who controls in the universal states and wants to reject. iff White can force to accept given optimal play by each player. This is equivalent to the definition of acceptance given on the last slide, but I find it much easier to understand. 1

CMPSCI 61: Index Tapes Lecture 22 From now on assume that our Turing machines have a random access read-only input. There is an index tape which can be written on and read like other tapes. Whenever the value, written in binary, appears on the index tape, the read head will automatically scan bit bit of the input. read-only input n w h indextape h q 1 2 worktape s(n) 11

We can now define alternating complexity classes as follows. ASPACE # is the set of boolean queries (languages) accepted by alternating Turing machines that use tape cells on any computation path when the input size is. Similarly ATIME # is the set of boolean queries (languages) accepted by alternating TM s that take % time steps on any computation path when the input size is. Theorem 22.7 For ATIME, and for % DSPACE, ASPACE # DTIME Corollary 22.8 In particular, ASPACE P ATIME PSPACE 12

The Alternation Theorem has four parts. We must simulate: 1. A time-bounded DTM with a space-bounded ATM, using the circuit game, 2. A space-bounded DTM with a time-bounded ATM, using the Savitch game, 3. A space-bounded ATM with a time-bounded DTM, using the marking algorithm, and 4. A time-bounded ATM with a space-bounded DTM, using exhaustive search of the game tree. First, though, let s see some examples of alternating machines. I ll include both classical and game-semantics descriptions of each machine. 13

+ Define the monotone, circuit value problem (MCVP) to be the subset of CVP in which no negation gates occur. It turns out that MCVP is still P-complete. Proposition 22.9 MCVP is recognizable in ASPACE. Proof: Let be a monotone boolean circuit. For, define EVAL( ), 1. if (InputOn ) then accept 2. if (InputOff ) then reject 3. if ( ) then universally choose child of 4. if ( ) then existentially choose child of 5. Return(EVAL( )) simply calls EVAL( ). EVAL( ) returns accept iff gate evaluates to one. Space used for naming vertices :. 14

Game Semantics for this Proof: In the Circuit Game, we start with a marker at the output gate of a monotone Boolean circuit. On each move, the marker moves from the current gate to one of its children (one of its inputs). For AND gates Black chooses which child to move to, and for OR gates White chooses. When we reach an input gate marked with a literal, White wins the game iff this literal evaluates to true. White wants to stay on gates that evaluate to true, Black on gates that evaluate to false. Whoever is happy with the output gate can always move the marker to stay happy, until an input is reached. 15

+ Definition 22.1 The quantified satisfiability problem (QSAT) is the set of true formulas of the following form: For any boolean formula on variables, SAT QSAT SAT QSAT Thus QSAT logically contains SAT and SAT. 16

+ Proposition 22.11 QSAT is recognizable in ATIME[n]. Proof: Construct an alternating machine To evaluate the sentence, as follows. in an existential state, writes down a boolean value for, in a universal state it writes a bit for, and so on. Next must evaluate the quantifier-free boolean formula on these chosen values. For each in, universally chooses which side to evaluate; for each, existentially chooses. Thus only has to read one of the chosen bits,, and accept iff it is true and occurs positively, or false and occurs negatively. runs in linear time. accepts iff is true. Game Semantics: White picks values for the variables, Black for the variables. White wins iff the quantifierfree part evaluates to true. 17

Theorem 22.12 For any # NSPACE # ATIME, Proof: NSPACE ATIME DSPACE Let be an NSPACE Turing machine. Let be an input to,. : CompGraph accepts iff there is a path in CompGraph of length at most * from to. REACH 1. Existentially: choose middle ID. 2. Universally: 3. Return( ) AND 18

Game Semantics for this version of Savitch s Theorem: White originally claims that the path from to, of length at most *, exists in CompGraph. White advances this claim by naming the alleged middle vertex of the alleged path. Black picks either the first half or the second half of the path to challenge. The path whose existence is disputed is then half the length. They continue, halving the length of the disputed path each time, until they dispute the existence of an edge. At this point the player with the correct claim about this edge wins. If White s path actually exists, White has a winning strategy that consists of always telling the truth. If White is wrong, however, either the first or second half of the alleged path must fail to exist, and Black has a winning move. 19

+ ATIME % DSPACE : Let be an ATIME % machine, input,. CompGraph has depth # and size *. A deterministic Turing machine can systematically search this entire and-or graph using space. This is done, by keeping a string of length : denoting that we are currently simulating step of s computation having made choices on all of the existential and universal branches up until now. The rest of the simulation will report an answer as to whether choices will lead to acceptance. This is done as follows: If one of the following conditions holds: 1., or 2. answer = yes and step was existential, or 3. answer = no and step was universal, then let and report answer back to the Otherwise, set step. and continue. Note, that we do not have to store intermediate IDs of the simulation because the sequence uniquely determines which ID of we go to next. 2

t s E A E t(n) c1 c2 c3 c 4 * * * * * * * ATIME DSPACE % We evaluate the computation graph of ATIME # machine using space to cycle through all possible computations of on input. The game tree for the machine represents all possible configurations and moves of the players. In effect our algorithm exhaustively searches every possible path through this tree, using space % to keep track of where in the search it might be. (One could do this with a very timeinefficient recursive algorithm.) 21

* * * * Theorem 22.13 ASPACE DTIME Proof: ASPACE DTIME : Let be an ASPACE machine. Let be an input,. CompGraph has size The marking algorithm evaluates this in DTIME. t s 2 O(s(n)) E A E 2 O(s(n)) We mark the winner at each point, starting from the end configurations and working backward. 22

* DTIME Let ASPACE : be a DTIME an input,. * TM. Define an alternating procedure which accepts iff the contents of cell at time in s computation on input is symbol. Inductively, % holds iff the three symbols in tape positions lead to a b in position in one step of s computation. Space needed is Note that accepts iff * =. * 23

+ Space 1 2 Time........ ' Game Semantics: At each point in the game the contents of a single cell of the tableau are in dispute. Originally this is the bottom-left cell, which White claims is accepting. At each move White names the three cells above the current one, which must imply the claimed contents of the current one. Black then picks one of these three to dispute. Note the similarity to the Circuit Game. This completes the proof of Theorem 22.7. 24

co-r.e. complete co-r.e. Arithmetic Hierarchy r.e. r.e. complete Recursive Primitive Recursive EXPTIME co-np complete PSPACE Polynomial-Time Hierarchy co-np NP NP U co-np NP complete P "truly feasible" NC NC 2 log(cfl) NSPACE[log n] DSPACE[log n] Regular Logarithmic-Time Hierarchy SAC 1 NC AC ThC 1 25