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

Similar documents
Computability and Complexity CISC462, Fall 2018, Space complexity 1

Space Complexity. Huan Long. Shanghai Jiao Tong University

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

Introduction to Computational Complexity

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

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

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

Lecture 23: More PSPACE-Complete, Randomized Complexity

CSE 555 HW 5 SAMPLE SOLUTION. Question 1.

Complexity Theory 112. Space Complexity

PSPACE COMPLETENESS TBQF. THURSDAY April 17

Computational Complexity IV: PSPACE

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

Notes on Complexity Theory Last updated: October, Lecture 6

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

SOLUTION: SOLUTION: SOLUTION:

Lecture 22: PSPACE

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

1 PSPACE-Completeness

CSCI 1590 Intro to Computational Complexity

Space and Nondeterminism

Answers to the CSCE 551 Final Exam, April 30, 2008

Time and space classes

CSE200: Computability and complexity Space Complexity

Umans Complexity Theory Lectures

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

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

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

Lecture 7: Polynomial time hierarchy

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

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

UNIT-IV SPACE COMPLEXITY

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

POLYNOMIAL SPACE QSAT. Games. Polynomial space cont d

6.840 Language Membership

Lecture 12: Interactive Proofs

Lecture 24 : Even more reductions

CS151 Complexity Theory. Lecture 4 April 12, 2017

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

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

Announcements. Friday Four Square! Problem Set 8 due right now. Problem Set 9 out, due next Friday at 2:15PM. Did you lose a phone in my office?

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

INAPPROX APPROX PTAS. FPTAS Knapsack P

CS 580: Algorithm Design and Analysis. Jeremiah Blocki Purdue University Spring 2018

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

NP-Completeness Part II

Advanced Topics in Theoretical Computer Science

NP-Completeness Part II

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

Lecture 8: Complete Problems for Other Complexity Classes

Intro to Theory of Computation

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

Advanced topic: Space complexity

Complexity. Complexity Theory Lecture 3. Decidability and Complexity. Complexity Classes

NP Completeness. CS 374: Algorithms & Models of Computation, Spring Lecture 23. November 19, 2015

6.045 Final Exam Solutions

CS21 Decidability and Tractability

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

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

De Morgan s a Laws. De Morgan s laws say that. (φ 1 φ 2 ) = φ 1 φ 2, (φ 1 φ 2 ) = φ 1 φ 2.

Interactive Proofs 1

The Polynomial Hierarchy

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

2 Evidence that Graph Isomorphism is not NP-complete

CSCI 1590 Intro to Computational Complexity

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

Lecture 19: Interactive Proofs and the PCP Theorem

NP Complete Problems. COMP 215 Lecture 20

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

20.1 2SAT. CS125 Lecture 20 Fall 2016

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

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

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

Polynomial Space. The classes PS and NPS Relationship to Other Classes Equivalence PS = NPS A PS-Complete Problem

198:538 Complexity of Computation Lecture 16 Rutgers University, Spring March 2007

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

Lecture 4 : Quest for Structure in Counting Problems

COL 352 Introduction to Automata and Theory of Computation Major Exam, Sem II , Max 80, Time 2 hr. Name Entry No. Group

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

CSCI 1590 Intro to Computational Complexity

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

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

Complexity (Pre Lecture)

Chapter 2. Reductions and NP. 2.1 Reductions Continued The Satisfiability Problem (SAT) SAT 3SAT. CS 573: Algorithms, Fall 2013 August 29, 2013

NP-Completeness. Sections 28.5, 28.6

The Cook-Levin Theorem

Lecture 15 - NP Completeness 1

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

CSE 135: Introduction to Theory of Computation NP-completeness

NP-Hardness reductions

Welcome to... Problem Analysis and Complexity Theory , 3 VU

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

CS151 Complexity Theory. Lecture 13 May 15, 2017

Computability and Complexity Theory: An Introduction

Notes on Space-Bounded Complexity

Show that the following problems are NP-complete

Introduction to Complexity Theory

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

CS311 Computational Structures. NP-completeness. Lecture 18. Andrew P. Black Andrew Tolmach. Thursday, 2 December 2010

Transcription:

Lecture 20: PSPACE November 15, 2016 CS 1010 Theory of Computation Recall that PSPACE = k=1 SPACE(nk ). We will see that a relationship between time and space complexity is given by: P NP PSPACE = NPSPACE EXPTIME We know that P EXPTIME because there are languages that can be decided in exponential but not polynomial time. Thus, at least one of the containments in the above expression must be a strict containment. Many computer scientists believe that each of the containments is strict, but there is not yet proof either way. Topics Covered 1. Proof of Time and Space Containments 2. Languages in PSPACE 3. PSPACE-Completeness 1 Proof of Time and Space Containments Proof that NP PSPACE Let L be a language in NP. To decide L in polynomial space, use the following algorithm: On input w: 1. Compute φ such that φ SAT if and only if w L. 2. Try every possible truth assignment to the variables x 1,..., x n. Accept if one satisfies φ. 3. Reject if none of the assignments satisfy φ. Note that we can perform step (1) in polynomial space because L p SAT. That is, there is a polynomial-time mapping reduction from L to SAT, which also uses polynomial space. While trying every possible assignment in step (2), we only need to store one assignment at a time, as well as φ. Thus, each step requires only a polynomial amount of space. Lecture 20: PSPACE Page 1 / 5

Proof that PSPACE = NPSPACE In the last class, we proved Savitch s Theorem, which states that NSPACE(f(n)) SPACE(f(n) 2 ) for f(n) n. If f(n) is a polynomial, then f(n) 2 is also a polynomial. It follows that NPSPACE PSPACE. Moreover, PSPACE NPSPACE because any language deterministically decided in polynomial space is also nondeterministically decided in polynomial space. Lemma If M is an f(n)-space TM, then M runs in 2 O(f(n)) time. Proof of Lemma Let M be an f(n)-space TM. Then M has 2 O(f(n)) configurations, each of which is specified by: 1. A state, using constant space A 2. A location of the tape head, using f(n) space 3. The contents of the tape, using Γ f(n) space The amount of space needed for c configurations is thus c (A + f(n) + Γ f(n) ), which is in the family 2 O(f(n)). Since M is a decider, it never enters the same configuration twice. Thus, it runs in 2 O(f(n)) time. Proof that PSPACE EXPTIME Recall that EXPTIME = k=1 TIME(2O(nk) ). It follows from the previous lemma that a p(n)-space TM for a polynomial p runs in 2 O(p(n)) time, which is in EXPTIME. Thus, any polynomial-space TM has at most an exponential runtime. 2 Languages in PSPACE One language in PSPACE is based on the Geography game, in which players take turns naming cities such that the starting letter of the current city is the last letter of the previous city. A collection of possible moves between cities can be represented as a directed graph whose vertices represent cities, and whose edges connect a city to its potential successors in the game. For example, a set of edges might be: {(Providence, Edinburgh), (Providence, Edmonton), (Edinburgh, Hilton Head), (Hilton Head, Denver), (Edmonton, Newport)}. More formally, we define the language: GeneralizedGeography = { G, b G = (V, E) is a directed graph; the game begins at b V ; Player 1 starts; and no matter how Player 2 plays, Player 1 can always win} We also say that Player 1 has a winning strategy, meaning that there exists a way for Player 1 to win regardless of Player 2 s moves. Lecture 20: PSPACE Page 2 / 5

Proof that GeneralizedGeography is in PSPACE GG, which decides GeneralizedGeography: Consider the following algorithm GG, on input G, b : 1. If V = {b}, accept. 2. For every neighbor u of b: (a) Let G = G with b removed. (b) If GG accepts on input G, u, reject. 3. Accept. First, note that GG terminates because G is smaller than G. Each time we make a recursive call, the graph shrinks, so the depth of recursion is bounded by the number of vertices in G. We can prove correctness by induction. Without going into detail, we can say that GG is correct in the base case, in which G has only one vertex. In the inductive case, GG relies on its correctness when the input is a smaller graph G. The algorithm takes polynomial space. Let S(n) be the amount of space needed for GG to run on an input graph with n vertices. S(1) is constant and S(n) = O(n) + S(n 1). Expanding this recurrence relation yields a total of O(n 2 ) space. Thus, GG correctly runs in polynomial space. On the other hand, let T (n) be the time needed for GG to run on a graph with n vertices. Then T (1) is constant and T (n) = (deg G) T (n 1). When we expand this relation, the total time is of the form (deg G) n, which is exponential. TQBF and Friends The following related languages are in PSPACE: TQBF = { ψ ψ is a true quantified Boolean formula} TQBF-3CNF = { ψ ψ is of the form Q 1 x 1... Q n x n φ(x 1,..., x n ), where φ is in 3CNF, each Q i {, }, and ψ is a true quantified Boolean formula} FormulaGame = { ψ ψ is of the form Q 1 x 1... Q n x n φ(x 1,..., x n ), where φ is in 3CNF, each Q i {, }, Q 1 =, and the -player wins} Recall that a Boolean formula φ over the variables x 1,..., x n is a recipe or algorithm that evaluates to true or false, depending on the variable assignment. A quantified Lecture 20: PSPACE Page 3 / 5

Boolean formula also includes quantifiers for variables. For example, x 1 x 2 ((x 1 x 2 ) ( x 1 x 2 x 3 )) is a quantified Boolean formula. In this case, x 1 and x 2 are quantified variables, while x 3 is a free variable. A true quantified Boolean formula is a quantified Boolean formula which has no free variables and evaluates to true. For example, consider the formula: x 1 x 2 x 3 ((x 1 x 2 ) ( x 1 x 2 x 3 )). If x 1 is true, then we can make x 2 be false, and both clauses are satisfied. If x 1 is false, then we can set x 2 to true, and both clauses are satisfied. Note that φ SAT if and only if ψ of the form x 1... x n φ(x 1,..., x n ) is in TQBF. FormulaGame represents a game between two players, the -player and the -player. The players take turns assigning values to variables, based on the quantifiers in the quantified Boolean formula. The -player wins if they can make the formula true, while the -player wins if they can make the formula false. In fact, FormulaGame is the same language as TQBF-3CNF. Without loss of generality, we can set the first quantifier to be, and we can also add existential quantifiers so that universal and existential quantifiers alternate. 3 PSPACE-Completeness A language L is PSPACE-complete if (1) L is in PSPACE, and (2) for all A PSPACE, A p L. Note that A p L is still a polynomial-time reduction. If the reduction were instead polynomial-space, the reduction itself could decide any language in PSPACE. Theorem TQBF, TQBF-3CNF, and FormulaGame are PSPACE-complete. We will see proof of this in the next class. Theorem GeneralizedGeography is PSPACE-Complete Proof We have already seen that GeneralizedGeography is in PSPACE. It remains to show that it is PSPACE-hard. We will prove this via a reduction from TQBF-3CNF. Consider the following function, which takes as input ψ where ψ = Q 1 x 1... Q n x n φ(x 1,..., x n ) and φ = C 1 C 2 C m. Without loss of generality, assume Q 1 = and the quantifiers alternate. Output a graph of the following form: Lecture 20: PSPACE Page 4 / 5

b x 1 x 1 C 2...... C 1 C m x n x n φ Each variable x i has a trapezoidal gadget, and each clause C i has an edge to the negation of variables in the clause. For example, in the figure above, C 2 might be x 1 x 4 x n. To analyze this reduction, consider ψ as an instance of FormulaGame. The -player goes first, and must select the node b. Then the -player only has one subsequent node to choose. After this, the -player can choose whether to set x 1 to true or false by selecting the corresponding node. The -player again only has one choice. This continues for all x n variables, with the -player selecting a truth assignment. Finally, the -player must select the node φ. The -player selects a clause C i, and the -player must pick the negation of a variable in C i. At this step, there exists an unvisited node for the -player to visit only if some variable in the clause C i is satisfied by the selected truth assignment. If the -player can make a move, they win. In other words, the -player has a winning strategy if the formula is true. Lecture 20: PSPACE Page 5 / 5