Aaron Bloomfield CS 4102 Spring 2011

Slides:



Advertisements
Similar presentations
Resource-Bounded Computation
Advertisements

Complexity Classes: P and NP
CS 345: Chapter 9 Algorithmic Universality and Its Robustness
CS 461 – Nov. 9 Chomsky hierarchy of language classes –Review –Let’s find a language outside the TM world! –Hints: languages and TM are countable, but.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
Resource-Bounded Computation Previously: can it be done? Now: how efficiently can it be done? Goal: conserve computational resources: Time, space, other.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen.
Alternation Alternation: generalizes non-determinism, where each state is either “existential” or “universal”: Old: existential states New: universal states.
Recap CS605: The Mathematics and Theory of Computer Science.
Nathan Brunelle Department of Computer Science University of Virginia Theory of Computation CS3102 – Spring 2014 A tale.
CS Department Fireside Chat All are welcome! Wed Nov 18, 5-6pm, Ols 228e/236d Kim Hazelwood and Wes Weimer Meet and ask them questions in a non-academic.
Complexity 12-1 Complexity Andrei Bulatov Non-Deterministic Space.
Complexity 15-1 Complexity Andrei Bulatov Hierarchy Theorem.
Complexity 11-1 Complexity Andrei Bulatov Space Complexity.
Computability and Complexity 13-1 Computability and Complexity Andrei Bulatov The Class NP.
Computability and Complexity 19-1 Computability and Complexity Andrei Bulatov Non-Deterministic Space.
P, NP, PS, and NPS By Muhannad Harrim. Class P P is the complexity class containing decision problems which can be solved by a Deterministic Turing machine.
Complexity ©D.Moshkovitz 1 Turing Machines. Complexity ©D.Moshkovitz 2 Motivation Our main goal in this course is to analyze problems and categorize them.
CS151 Complexity Theory Lecture 12 May 6, CS151 Lecture 122 Outline The Polynomial-Time Hierarachy (PH) Complete problems for classes in PH, PSPACE.
Analysis of Algorithms CS 477/677
Computational Complexity, Physical Mapping III + Perl CIS 667 March 4, 2004.
February 20, 2015CS21 Lecture 191 CS21 Decidability and Tractability Lecture 19 February 20, 2015.
Robbie Hott Department of Computer Science University of Virginia Theory of Computation CS3102.
Final Exam Review Cummulative Chapters 0, 1, 2, 3, 4, 5 and 7.
Nathan Brunelle Department of Computer Science University of Virginia Theory of Computation CS3102 – Spring 2014 A tale.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
Definition: Let M be a deterministic Turing Machine that halts on all inputs. Space Complexity of M is the function f:N  N, where f(n) is the maximum.
Machines with Memory Chapter 3 (Part B). Turing Machines  Introduced by Alan Turing in 1936 in his famous paper “On Computable Numbers with an Application.
CMPS 3223 Theory of Computation Automata, Computability, & Complexity by Elaine Rich ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Slides provided.
Complexity of Classical Planning Megan Smith Lehigh University CSE 497, Spring 2007.
1 Chapter 9 PSPACE: A Class of Problems Beyond NP Slides by Kevin Wayne Pearson-Addison Wesley. All rights reserved.
Theory of Computing Lecture 15 MAS 714 Hartmut Klauck.
Review Byron Gao. Overview Theory of computation: central areas: Automata, Computability, Complexity Computability: Is the problem solvable? –solvable.
Lecture 30. P, NP and NP Complete Problems 1. Recap Data compression is a technique to compress the data represented either in text, audio or image form.
Tonga Institute of Higher Education Design and Analysis of Algorithms IT 254 Lecture 8: Complexity Theory.
February 18, 2015CS21 Lecture 181 CS21 Decidability and Tractability Lecture 18 February 18, 2015.
The Complexity of Optimization Problems. Summary -Complexity of algorithms and problems -Complexity classes: P and NP -Reducibility -Karp reducibility.
Space Complexity. Reminder: P, NP classes P NP is the class of problems for which: –Guessing phase: A polynomial time algorithm generates a plausible.
CSC 413/513: Intro to Algorithms NP Completeness.
Complexity Non-determinism. NP complete problems. Does P=NP? Origami. Homework: continue on postings.
CSE 105 Theory of Computation Alexander Tsiatas Spring 2012 Theory of Computation Lecture Slides by Alexander Tsiatas is licensed under a Creative Commons.
P, NP, and Exponential Problems Should have had all this in CS 252 – Quick review Many problems have an exponential number of possibilities and we can.
CS848: Topics in Databases: Foundations of Query Optimization Topics covered  Review of complexity.
NP-Complete Problems. Running Time v.s. Input Size Concern with problems whose complexity may be described by exponential functions. Tractable problems.
Beauty and Joy of Computing Limits of Computing Ivona Bezáková CS10: UC Berkeley, April 14, 2014 (Slides inspired by Dan Garcia’s slides.)
A Problem That Is Complete for PSPACE (Polynomial Space) BY TEJA SUDHA GARIGANTI.
Strings Basic data type in computational biology A string is an ordered succession of characters or symbols from a finite set called an alphabet Sequence.
CS6045: Advanced Algorithms NP Completeness. NP-Completeness Some problems are intractable: as they grow large, we are unable to solve them in reasonable.
Computability NP complete problems. Space complexity. Homework: [Post proposal]. Find PSPACE- Complete problems. Work on presentations.
CS 3813: Introduction to Formal Languages and Automata Chapter 14 An Introduction to Computational Complexity These class notes are based on material from.
Chapter 15 P, NP, and Cook’s Theorem. 2 Computability Theory n Establishes whether decision problems are (only) theoretically decidable, i.e., decides.
Overview of the theory of computation Episode 3 0 Turing machines The traditional concepts of computability, decidability and recursive enumerability.
Homework 8 Solutions Problem 1. Draw a diagram showing the various classes of languages that we have discussed and alluded to in terms of which class.
Space Complexity. Reminder: P, NP classes P is the class of problems that can be solved with algorithms that runs in polynomial time NP is the class of.
CSE 421 Algorithms Richard Anderson Lecture 29 Complexity Theory NP-Complete P.
Theory of Computational Complexity Yuji Ishikawa Avis lab. M1.
Chapter 7 Introduction to Computational Complexity.
Week 14 - Friday.  What did we talk about last time?  Simplifying FSAs  Quotient automata.
Summary.
Geography Game Geography. Amy names capital city c of country she is in. Bob names a capital city c' that starts with the letter on which c ends. Amy.
Jaya Krishna, M.Tech, Assistant Professor
Richard Anderson Lecture 29 Complexity Theory
CS21 Decidability and Tractability
Section 14.3 Complexity Classes
CS21 Decidability and Tractability
CSE 105 theory of computation
Instructor: Aaron Roth
RAIK 283 Data Structures & Algorithms
The Extended Chomsky Hierarchy Reloaded
Intro to Theory of Computation
Presentation transcript:

Aaron Bloomfield CS 4102 Spring 2011 PSPACE and beyond Aaron Bloomfield CS 4102 Spring 2011

PSPACE

Complexity classes

An aside: L and NL L (a.k.a. LSPACE) is the set of algorithms that can be solved by a DTM in logarithmic space NL (a.k.a. NSPACE) is the set of algorithms that can be solved by a NTM in logarithmic space L  NL  P It is an open problem if L = NL And if NL = P We can’t do a polynomial-time reduction for these complexity classes We need log-space reductions instead…

“Exponential” complexity classes There are many complexity classes that take up an exponential amount of time And only one (that we are seeing) that takes up an exponential amount of space From http://en.wikipedia.org/wiki/List_of_NP-complete_problems#Games_and_puzzles

PSPACE PSPACE is the class of problems that take up a polynomial amount of space It may take polynomial time or exponential amount of time

P  PSPACE An algorithm in P takes a polynomial number of steps And each step writes (at most) one symbol to the TM So it can never take up more than a polynomial amount of space

Exponential algorithms & polynomial space An exponential algorithm can still take up a polynomial amount of space Consider a counter from 1 to 2n Just do bit-wise addition from 000000 to 100000, reusing the space Here, n = 5, space = 5, steps = 32 This algorithm uses n space and 2n steps That being said, an exponential algorithm can also take up an exponential amount of space…

NP  PSPACE To show this, consider the following statement: There is an algorithm that solves SAT in polynomial space Go through every possibility – takes n space, and 2n steps Reuse space, as described on the previous slide If any NP-complete problem is in PSPACE, then they all are

NPSPACE = PSPACE Adding non-determinism to the TM does not take up any more space Even though it may take up more time We can simulate a NTM on a DTM without needing more than a polynomial increase in space Even though there is a (potentially) exponential increase in the number of states

PSPACE-complete

PSPACE-complete What we are interested in is the set of problems that are in PSPACE, but are not believed to be in NP

PSPACE-complete vs. NP-complete PSPACE-complete problems take exponential time to deterministically compute the result Just like NP-complete problems Either the decision or functional problem versions But PSPACE-complete problems also take exponential time to deterministically verify the result NP-complete can verify a solution in polynomial time

Competitive facility location Consider a graph G, where two ‘players’ choose nodes in alternating order. No two nodes can be chosen (by either side) if a connecting node is already chosen. Choose the winning strategy for your player.

Competitive facility location To determine the solution, you need to consider all possible game paths i.e., enumerate the game paths in the game tree Given a solution, to see if it is the best solution, you have to do the same thing i.e., consider all possible game paths

Planning Given a scrambled 15- puzzle, how to you solve it? Given a solution, you can easily verify that it solves the puzzle But to determine if it’s the quickest solution, it takes exponential time You can use Dijkstra’s shortest path, but the graph size is exponential

QSAT A variant of SAT, but using quantifiers The original SAT problem: x1 x2 … xn-1 xn  (x1, …, xn)? Given a SAT formula: (x1,x2,x3) = (x1x2x3)(x1x2x3)(x1x2x3)(x1x2x3) We ask: x1 x2 x3 (x1,x2,x3)? We can see there is: we set x1 so that for both choices of x2, there is a value for x3 such that  is satisfied Specifically, we set x1 to 1; if x2 is 1, we set x3 to 0; if x2 is 0, we set x3 to 1

QSAT solver, part 1 (for ) If the first quantifier is xi, then Set xi=0, and recursively evaluate the rest of the expression Save the result, and delete all other intermediate work Set xi=1, and recursively evaluate the rest of the expression If either outcome yielded a 1, then return 1 Else return 0 Endif

QSAT solver, part 2 (for ) If the first quantifier is xi, then Set xi=0, and recursively evaluate the rest of the expression Save the result, and delete all other intermediate work Set xi=1, and recursively evaluate the rest of the expression If both outcomes yielded a 1, then return 1 Else return 0 Endif

Time usage Each recursive call takes p(n) time Each of the n steps (one for each xi) will yield two recursive calls, for a total of 2n invocations Total time is p(n)2n

Space usage The recursive calls for xi=0 and xi=1 use the same space (which we’ll claim is p(n)) So the space needed is p(n) plus the recursive call Recurrence relation: S(n) = S(n-1) + p(n) S(n) = np(n) Which is polynomial

Competitive facility location It reduces quite easily to/from QSAT!

Tic-tac-toe Is PSPACE-complete A simple upper bound on the number of boards is 39 = 19,683 (each cell can have an X, an O, or be blank) A better estimate (only legal boards, ignoring rotations) is 765 The game tree size is O(n!) = 9! = 362,880 A more reasonable estimate (only legal boards, ignoring rotations) is 26,830

m,n,k-game An m,n,k-game has a mn board, alternating players, and the first one to get k in a row wins Tic-tac-toe is a 3,3,3-game The entire game tree only needs mn space As we recursively look through the game tree, we use the same board This puts it in PSPACE With more work, it can be shown to be PSPACE- complete

EXPTIME

EXPTIME The set of all problems that are solvable in 2p(n) time by a DTM NEXPTIME is the set of all problems solvable in 2p(n) time by a NTM Where p(n) is a polynomial function of n Superset (strict?) of P and NP

EXPTIME-complete example Does a DTM always halt in k (or fewer) steps? Determining if the DTM halts at all is intractable (the Halting Problem) But we can tell if it halts in k steps by simulating all possible executions of the DTM through k steps

EXPTIME-complete vs. NP-complete NP-complete problems can be solved on a DTM in p(n)2n time EXPTIME-complete problems can be solved on a DTM in p(n)2q(n) time While p(n) is polynomial, q(n) may be exponential But can greater than n p(n)2n^5 is a running time for a EXPTIME-complete problem; it’s outside a NP-complete problem As an worst-case NP-complete algorithm can iterate through all possible solutions in 2n time, and verify each one in p(n) time, for a running time of p(n)2n

EXPSPACE

EXPSPACE The set of all problems solvable in 2p(n) space Strict superset of PSPACE And thus of P and NP Believed to be a strict superset of EXPTIME

EXPSPACE-complete example Recognizing whether two regular expressions represent different languages Where the operators are limited to four: union, concatenation, Kleene star, and squaring Without Kleene star, it becomes NEXPTIME-complete

Game Complexity

Known to be NP-complete Battleship Master Mind Crossword construction FreeCell Sudoku Tetris From http://en.wikipedia.org/wiki/List_of_NP-complete_problems#Games_and_puzzles

Known to be in PSPACE… … but unknown if they are in a lower complexity class, or if they are PSPACE-complete Sim Pentominoes Connect Four Quoridor http://en.wikipedia.org/wiki/Game_complexity

Known to be PSPACE-complete Tic-tac-toe Qubic Reversi Hex (11x11) Gomoku Connect6 Amazons (10x10) http://en.wikipedia.org/wiki/Game_complexity

Known to be in EXPTIME… … but unknown if they are in a lower complexity class, or if they are EXPTIME-complete Fanorona Nine Men’s Morris Lines of Action Arimaa http://en.wikipedia.org/wiki/Game_complexity

Known to be EXPTIME-complete Checkers (both 8x8 & 10x10) Chinese checkers (both 2 sets and 6 sets) Chess Shogi Go (19x19) http://en.wikipedia.org/wiki/Game_complexity

Complexity Zoo (courtesy of Gabe Robins)

The Extended Chomsky Hierarchy Reloaded Decidable Presburger arithmetic … EXPSPACE ? … H H EXPTIME … Turing PSPACE BPP … PH … degrees … Context sensitive LBA … NP … … P anbncn … Not finitely describable EXPSPACE-complete =RE­ Context-free wwR PSPACE-complete QBF EXPTIME-complete Go Det. CF anbn NP-complete SAT Not Recognizable … Regular a* Recognizable … … Finite {a,b} … Dense infinite time & space complexity hierarchies … Other infinite complexity & descriptive hierarchies …

Class inclusion diagram The “Complexity Zoo” Class inclusion diagram Currently 494 named classes! Interactive, clickable map Shows class subset relations Legend: Scott Aaronson http://www.math.ucdavis.edu/~greg/zoology/diagram.xml

2S* Recognizable Decidable Exponential space Non-deterministic time Deterministic exponential time Polynomial space

Polynomial space Polynomial time hierarchy Interactive proofs Non-deterministic polynomial time Deterministic polynomial time Non-deterministic linear time Non-deterministic linear space

Deterministic polynomial time Poly-logarithmic time Non-deterministic linear time Deterministic linear time Context-sensitive Non-deterministic logarithmic space Context free Deterministic context-free Deterministic logarithmic space Regular Empty set

The Extended Chomsky Hierarchy Reloaded Decidable Presburger arithmetic … EXPSPACE ? … H H EXPTIME … Turing PSPACE BPP … PH … degrees … Context sensitive LBA … NP … … P anbncn … Not finitely describable EXPSPACE-complete =RE­ Context-free wwR PSPACE-complete QBF EXPTIME-complete Go Det. CF anbn NP-complete SAT Not Recognizable … Regular a* Recognizable … … Finite {a,b} … Dense infinite time & space complexity hierarchies … Other infinite complexity & descriptive hierarchies …