Computability and Complexity CISC462, Fall 2018, Space complexity 1

Similar documents
Space Complexity. Huan Long. Shanghai Jiao Tong University

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

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

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

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

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

Complexity Theory 112. Space Complexity

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

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

Introduction to Computational Complexity

Lecture 22: PSPACE

CSE 555 HW 5 SAMPLE SOLUTION. Question 1.

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

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

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

Introduction to Complexity Classes. Marcin Sydow

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

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

Lecture 23: More PSPACE-Complete, Randomized Complexity

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

Notes on Complexity Theory Last updated: October, Lecture 6

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

UNIT-IV SPACE COMPLEXITY

CSCI 1590 Intro to Computational Complexity

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

Computability and Complexity

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

PSPACE COMPLETENESS TBQF. THURSDAY April 17

DRAFT. Diagonalization. Chapter 4

6.045 Final Exam Solutions

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

Advanced Topics in Theoretical Computer Science

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

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

Computational Complexity

Announcements. Problem Set 7 graded; will be returned at end of lecture. Unclaimed problem sets and midterms moved!

More Complexity. Klaus Sutner Carnegie Mellon University. Fall 2017

CSE 135: Introduction to Theory of Computation NP-completeness

conp, Oracles, Space Complexity

Review of Basic Computational Complexity

1 PSPACE-Completeness

Resource-Bounded Computation

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

SOLUTION: SOLUTION: SOLUTION:

POLYNOMIAL SPACE QSAT. Games. Polynomial space cont d

Computational Complexity Theory

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

CSCI 1590 Intro to Computational Complexity

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}

Student#: CISC-462 Exam, December XY, 2017 Page 1 of 12

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

Intro to Theory of Computation

Notes on Complexity Theory Last updated: December, Lecture 2

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

Time and space classes

Outline. Complexity Theory. Example. Sketch of a log-space TM for palindromes. Log-space computations. Example VU , SS 2018

CMPT 710/407 - Complexity Theory Lecture 4: Complexity Classes, Completeness, Linear Speedup, and Hierarchy Theorems

Hierarchy theorems. Evgenij Thorstensen V18. Evgenij Thorstensen Hierarchy theorems V18 1 / 18

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

The Polynomial Hierarchy

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

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

Exam Computability and Complexity

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

Chapter 7: Time Complexity

Computational Complexity IV: PSPACE

Lecture 16: Time Complexity and P vs NP

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?

Planning and Optimization

CSCI 1590 Intro to Computational Complexity

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

Computability Theory

CS5371 Theory of Computation. Lecture 24: Complexity IX (PSPACE-complete, L, NL, NL-complete)

Complexity (Pre Lecture)

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

Friday Four Square! Today at 4:15PM, Outside Gates

Polynomial time reduction and NP-completeness. Exploring some time complexity limits of polynomial time algorithmic solutions

Bounded rationality of restricted Turing machines

CISC 4090 Theory of Computation

Undirected ST-Connectivity in Log-Space. Omer Reingold. Presented by: Thang N. Dinh CISE, University of Florida, Fall, 2010

The Complexity of Optimization Problems

Computational Complexity: A Modern Approach. Draft of a book: Dated January 2007 Comments welcome!

Randomized Complexity Classes; RP

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

CS154, Lecture 13: P vs NP

On Straight Forward Approaches to P vs NP

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

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

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

Logarithmic space. Evgenij Thorstensen V18. Evgenij Thorstensen Logarithmic space V18 1 / 18

B6.1 (Bounded-Cost) Plan Existence

Finish K-Complexity, Start Time Complexity

Lecture 3: Reductions and Completeness

Complexity Theory Part II

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

Artificial Intelligence. 3 Problem Complexity. Prof. Dr. Jana Koehler Fall 2016 HSLU - JK

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

CSC 1700 Analysis of Algorithms: P and NP Problems

Time Complexity. CS60001: Foundations of Computing Science

Transcription:

Computability and Complexity CISC462, Fall 2018, Space complexity 1 SPACE COMPLEXITY This material is covered in Chapter 8 of the textbook. For simplicity, we define the space used by a Turing machine computation only for machines that halt on all inputs. Definition. (Def. 8.1) 1. Let M be a deterministic Turing machine (DTM) that halts on all inputs. The space used by M (space complexity of M) is the function f : IN IN where f(n) is the maximum number of tape cells that M scans on any input of length n. 2. Let M be a nondeterministic Turing machine (NTM) where all computation branches halt on all inputs. The space used by M is the function f : IN IN where f(n) is the maximum number of tape cells that M scans on any branch of its computation on any input of length n. As with time complexity, when defining space complexity we ignore constant factors: SPACE(f(n)) = {L L is decided by some DTM in space O(f(n))} NSPACE(f(n)) = {L L is decided by some NTM in space O(f(n))} The following observations are immediate (why?): Let f : IN IN be any function. Then TIME(f(n)) SPACE(f(n)) NTIME(f(n)) NSPACE(f(n)) TIME(f(n)) NTIME(f(n)) SPACE(f(n)) NSPACE(f(n))

Computability and Complexity CISC462, Fall 2018, Space complexity 2 An important fact concerning space bounded computations (and difference with time bounded computations) is that space can be re-used whereas time obviously cannot be re-used. This means that already a linear space bound is quite powerful. Turing machines with a linear space bound were considered earlier under the name linear bounded automaton (LBA). Example. SAT SPACE(n) Recall that comparing deterministic and nondeterministic time complexity classes was very difficult. For space complexity classes we have the following remarkable result: Theorem. (Savitch s theorem) For any function f where f(n) n we have: NSPACE(f(n)) SPACE(f 2 (n)) Note. The above formulation of Savitch s theorem relies on the assumption that all computations of the Turing machines are guaranteed to halt. Recall that we defined the space complexity classes only for decider TM s. If the TM s are not guaranteed to halt, Savitch s theorem needs to impose some restrictions on the function f(n) (that is, f(n) has to be space constructible, as defined in Chapter 9). Given an arbitrary Turing machine M, it is undecidable for example whether M operates in time/space p(n) where p is a given polynomial. On the other hand, for any well behaving function 1 f and an arbitrary Turing machine M we can construct a Turing machine M f with the following properties: 1. L(M f ) consists of exactly all strings w such that M accepts w in time (or space) f( w ). 1 well behaving means here time constructible or space constructible. These notions will be defined in Chapter 9 of the textbook. For our present purposes it is sufficient to know that all naturally defined functions like the polynomial, exponential, logarithmic functions are well behaved.

Computability and Complexity CISC462, Fall 2018, Space complexity 3 2. M f operates in time f(n) (or space f(n)). 3. All computations of M f halt. The above facts explain why it is reasonable that we can assume that all computations of a time-bounded (or space-bounded) Turing machine halt. This assumption does not change the class of recognized languages as long as we are dealing with well behaved time and space bounds. The language families defined by deterministic/nondeterministic polynomial space Turing machines are: PSPACE = k NPSPACE = k SPACE(n k ) NSPACE(n k ) By Savitch s theorem we have: PSPACE = NPSPACE. The deterministic exponential time class is EXPTIME = k TIME(2 nk ). Lemma. PSPACE EXPTIME. Proof: will be done in class. The inclusions of the time/space complexity classes studied up to now are: P NP PSPACE EXPTIME Note that NP PSPACE follows from the equality PSPACE = NPSPACE.

Computability and Complexity CISC462, Fall 2018, Space complexity 4 We will later prove that P EXPTIME (strict inclusion). However, it is not known whether any of the other inclusions in the above chain are strict. It is conjectured that all inclusion in the chain are likely to be strict. Next we will consider complete problems for the class PSPACE. Definition. A language B is PSPACE-complete if 1. B PSPACE, and 2. A P B for every A PSPACE. A quantified Boolean formula allows (in addition to the Boolean operations) the use of universal (, for all ) and existential (, exists ) quantifiers. A fully quantified formula where each variable is in the scope of a quantifier has a value true or false. The quantified Boolean formulas problem is encoded as the language: TQBF = {< ϕ > ϕ is a true fully quantified Boolean formula } Theorem. TQBF is PSPACE-complete. A straightforward recursive algorithm decides TQBF in polynomial space (even in linear space). The proof showing that any problem in PSPACE is reducible to TQBF uses an extension of the construction from the proof of the Cook-Levin theorem. Other PSPACE-complete problems:

Computability and Complexity CISC462, Fall 2018, Space complexity 5 Evaluating a quantified Boolean formula resembles determining a winning strategy in a two-person game, see section 8.3. Many games ( Geography, as well as, chess and Go on n n boards) are PSPACE-complete. The following language is PSPACE-complete: B = { < M, w > M is a DTM and M accepts w without leaving the first w + 1 squares of the tape } Note that B can be accepted even in linear space.