Computability and Complexity 19-1 Computability and Complexity Andrei Bulatov Non-Deterministic Space.

Slides:



Advertisements
Similar presentations
Part VI NP-Hardness. Lecture 23 Whats NP? Hard Problems.
Advertisements

Complexity Classes: P and NP
Variants of Turing machines
1 Savitch and Immerman- Szelepcsènyi Theorems. 2 Space Compression  For every k-tape S(n) space bounded offline (with a separate read-only input tape)
1 Nondeterministic Space is Closed Under Complement Presented by Jing Zhang and Yingbo Wang Theory of Computation II Professor: Geoffrey Smith.
Complexity Theory Lecture 3 Lecturer: Moni Naor. Recap Last week: Non deterministic communication complexity Probabilistic communication complexity Their.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
1 Space Complexity. 2 Def: 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)
NL equals coNL Section 8.6 Giorgi Japaridze Theory of Computability.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
Complexity 7-1 Complexity Andrei Bulatov Complexity of Problems.
Complexity 25-1 Complexity Andrei Bulatov #P-Completeness.
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 22-1 Computability and Complexity Andrei Bulatov Hierarchy Theorem.
Complexity 13-1 Complexity Andrei Bulatov Hierarchy Theorem.
Computability and Complexity 14-1 Computability and Complexity Andrei Bulatov Cook’s Theorem.
Complexity 18-1 Complexity Andrei Bulatov Probabilistic Algorithms.
Computability and Complexity 13-1 Computability and Complexity Andrei Bulatov The Class NP.
P and NP Sipser (pages ). CS 311 Fall Polynomial time P = ∪ k TIME(n k ) … P = ∪ k TIME(n k ) … TIME(n 3 ) TIME(n 2 ) TIME(n)
Complexity 5-1 Complexity Andrei Bulatov Complexity of Problems.
Randomized Computation Roni Parshani Orly Margalit Eran Mantzur Avi Mintz
Complexity ©D.Moshkovits 1 Space Complexity Complexity ©D.Moshkovits 2 Motivation Complexity classes correspond to bounds on resources One such resource.
Computability and Complexity 32-1 Computability and Complexity Andrei Bulatov Boolean Circuits.
The Theory of NP-Completeness
Submitted by : Estrella Eisenberg Yair Kaufman Ohad Lipsky Riva Gonen Shalom.
Computability and Complexity 20-1 Computability and Complexity Andrei Bulatov Class NL.
Fall 2004COMP 3351 Reducibility. Fall 2004COMP 3352 Problem is reduced to problem If we can solve problem then we can solve problem.
Non Deterministic Space Avi Ben Ari Lior Friedman Adapted from Dr. Eli Porat Lectures Bar-Ilan - University.
Computability and Complexity 3-1 Turing Machine Computability and Complexity Andrei Bulatov.
Chapter 11: Limitations of Algorithmic Power
Complexity 1 Mazes And Random Walks. Complexity 2 Can You Solve This Maze?
Fall 2004COMP 3351 Time Complexity We use a multitape Turing machine We count the number of steps until a string is accepted We use the O(k) notation.
1 Reducibility. 2 Problem is reduced to problem If we can solve problem then we can solve problem.
Non-Deterministic Space is Closed Under Complementation Neil Immerman Richard Szelepcsenyi Presented By: Subhajit Dasgupta.
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.
CSCI 2670 Introduction to Theory of Computing November 29, 2005.
Complexity 25-1 Complexity Andrei Bulatov Counting Problems.
CSCI 3160 Design and Analysis of Algorithms Tutorial 10 Chengyu Lin.
Theory of Computing Lecture 21 MAS 714 Hartmut Klauck.
Computability Heap exercise. The class P. The class NP. Verifiers. Homework: Review RELPRIME proof. Find examples of problems in NP.
NP-completeness Class of hard problems. Jaruloj ChongstitvatanaNP-complete Problems2 Outline  Introduction  Problems and Languages Turing machines and.
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.
Computability NP complete problems. Space complexity. Homework: [Post proposal]. Find PSPACE- Complete problems. Work on presentations.
Costas Busch - LSU1 Time Complexity. Costas Busch - LSU2 Consider a deterministic Turing Machine which decides a language.
NPC.
1 Time Complexity We use a multitape Turing machine We count the number of steps until a string is accepted We use the O(k) notation.
Complexity 24-1 Complexity Andrei Bulatov Interactive Proofs.
NP-complete Languages
CSCI 2670 Introduction to Theory of Computing December 2, 2004.
CSCI 2670 Introduction to Theory of Computing December 7, 2005.
Prof. Busch - LSU1 Time Complexity. Prof. Busch - LSU2 Consider a deterministic Turing Machine which decides a language.
Theory of Computational Complexity Yuji Ishikawa Avis lab. M1.
The NP class. NP-completeness Lecture2. The NP-class The NP class is a class that contains all the problems that can be decided by a Non-Deterministic.
Chapter 7 Introduction to Computational Complexity.
Space Complexity Guy Feigenblat Based on lecture by Dr. Ely Porat Complexity course Computer science department, Bar-Ilan university December 2008.
Complexity 27-1 Complexity Andrei Bulatov Interactive Proofs (continued)
Space Complexity Complexity ©D.Moshkovits.
Part VI NP-Hardness.
Theory of Computational Complexity
Space Complexity Costas Busch - LSU.
Time Complexity Classes
Instructor: Aaron Roth
CS151 Complexity Theory Lecture 4 April 12, 2019.
Intro to Theory of Computation
CS151 Complexity Theory Lecture 4 April 8, 2004.
Presentation transcript:

Computability and Complexity 19-1 Computability and Complexity Andrei Bulatov Non-Deterministic Space

Computability and Complexity 19-2 Non-deterministic Machines Recall that if NT is a non-deterministic Turing Machine, then NT(x) denotes the tree of configurations which can be entered with input x, and NT accepts x if there is some accepting path in NT(x) Definition The space complexity of a non-deterministic Turing Machine NT is the function such that is the minimal number of cells visited in an accepting path of NT(x) if there is one, otherwise it is the minimal number of cells in the rejecting paths Definition The space complexity of a non-deterministic Turing Machine NT is the function such that is the minimal number of cells visited in an accepting path of NT(x) if there is one, otherwise it is the minimal number of cells in the rejecting paths (If not all paths of NT(x) halt, then is undefined)

Computability and Complexity 19-3 Nondeterministic Space Complexity Definition For any function f, we say that the nondeterministic space complexity of a decidable language L is in O(f) if there exists a nondeterministic Turing Machine NT which decides L, and constants and c such that for all inputs x with Definition For any function f, we say that the nondeterministic space complexity of a decidable language L is in O(f) if there exists a nondeterministic Turing Machine NT which decides L, and constants and c such that for all inputs x with Definition The nondeterministic space complexity class NSPACE[f] is defined to be the class of all languages with nondeterministic space complexity in O(f) Definition The nondeterministic space complexity class NSPACE[f] is defined to be the class of all languages with nondeterministic space complexity in O(f)

Computability and Complexity 19-4 Definition of NPSPACE Definition

Computability and Complexity 19-5 Savitch’s Theorem Unlike time, it can easily be shown that non-determinism does not reduce the space requirements very much: Theorem (Savitch) If s(n)  log n, then Theorem (Savitch) If s(n)  log n, then Corollary PSPACE  NPSPACE Corollary PSPACE  NPSPACE

Computability and Complexity 19-6 Proof (for s(n)  n ) Let L be a language in NSPACE[s] Let NT be a non-deterministic Turing Machine that decides L with space complexity s Choose an encoding for the computation NT(x) that uses ks(|x|) symbols for each configuration Let be the initial configuration, and be the accepting configuration Define a Boolean function reach(C,C,j) which is true if and only if configuration C can be reached from configuration C in at most steps To decide whether or not x  L we must determine whether or not is true

Computability and Complexity 19-7 We can calculate in space, using a divide-and-conquer algorithm: 1. If j=0 then if C=C', or C' can be reached from C in one step, then return true, else return false. 2. For each configuration C'', if reach(C,C'',j –1) and reach(C'',C',j –1), then return true. 3. Return false 1. If j=0 then if C=C', or C' can be reached from C in one step, then return true, else return false. 2. For each configuration C'', if reach(C,C'',j –1) and reach(C'',C',j –1), then return true. 3. Return false The depth of recursion is O(s(|x|)) and each recursive call requires O(s(|x|)) space for the parameters

Computability and Complexity 19-8 Logarithmic Space Since polynomial space is so powerful, it is natural to consider more restricted space complexity classes Even linear space is enough to solve Satisfiability Definition

Computability and Complexity 19-9 Problems in L and NL What sort of problems are in L and NL ? In logarithmic space we can store: a fixed number of counters (up to length of input) a fixed number of pointers to positions in the input string Therefore in deterministic log-space we can solve problems that require a fixed number of counters and/or pointers for solving; in non-deterministic log-space we can solve problems that require a fixed number of counters/pointers for verifying a solution

Computability and Complexity Examples (L) Palindromes : We need to keep two counter First count the number of 0 s, then count 1 s, subtracting from the previous number one by one. If the result is 0, accept; otherwise, reject. Brackets (if brackets in an expression positioned correctly): We need only a counter of brackets currently open. If this counter gets negative, reject; otherwise accept if and only if the last value of the counter is zero

Computability and Complexity Examples (NL) The first problem defined on this course was Reachability ¹ This can be solved by the following non-deterministic algorithm: Define a counter and initialize it to the number of vertices in the graph Define a pointer to hold the ``current vertex’’ and initialize it to the start vertex While the counter is non-zero - If the current vertex equals the target vertex, return yes - Non-deterministically choose a vertex which is connected to the current vertex - Update the pointer to this vertex and decrement the counter Return no ¹Also known as Path