Deterministic Time and Space Complexity Measures

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

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

Lecture 5: The Landscape of Complexity Classes

Lecture 3: Reductions and Completeness

Introduction to Complexity Classes. Marcin Sydow

Introduction to Computational Complexity

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

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

Complexity Theory 112. Space Complexity

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

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

Resource-Bounded Computation

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}

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

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

Introduction to Computational Complexity

Computability and Complexity CISC462, Fall 2018, Space complexity 1

CSCI 1590 Intro to Computational Complexity

Lecture 6: Oracle TMs, Diagonalization Limits, Space Complexity

Lecture 2: Tape reduction and Time Hierarchy

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

CSE 105 THEORY OF COMPUTATION

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

1 Computational Problems

Notes for Lecture Notes 2

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

Θεωρητική Πληροφορική Ι (ΣΗΜΜΥ) Υπολογιστική Πολυπλοκότητα Εργαστήριο Λογικής και Επιστήμης Υπολογισμών Εθνικό Μετσόβιο Πολυτεχνείο

: On the P vs. BPP problem. 30/12/2016 Lecture 12

Computational Complexity IV: PSPACE

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

Advanced Topics in Theoretical Computer Science

Theory of Computation

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

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

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

Notes on Space-Bounded Complexity

Time-Space Tradeoffs for SAT

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

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

CSE 105 THEORY OF COMPUTATION

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

DIMACS Technical Report May Complexity Classes. Eric Allender 1;2. Dept. of Computer Science. Rutgers University

Intro to Theory of Computation

Complexity of domain-independent planning. José Luis Ambite

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

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

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

Notes on Space-Bounded Complexity

Review of Basic Computational Complexity

Computational Complexity

Principles of Knowledge Representation and Reasoning

Theory of Computation

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

Lecture 3. 1 Terminology. 2 Non-Deterministic Space Complexity. Notes on Complexity Theory: Fall 2005 Last updated: September, 2005.

Lecture 12: Randomness Continued

CS294: Pseudorandomness and Combinatorial Constructions September 13, Notes for Lecture 5

Turing Machines A Turing Machine is a 7-tuple, (Q, Σ, Γ, δ, q0, qaccept, qreject), where Q, Σ, Γ are all finite

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

Time Complexity. CS60001: Foundations of Computing Science

Intractable Problems [HMU06,Chp.10a]

Lecture 16: Time Complexity and P vs NP

ECE 695 Numerical Simulations Lecture 2: Computability and NPhardness. Prof. Peter Bermel January 11, 2017

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

Computational Complexity Theory. Markus Bläser, Holger Dell Universität des Saarlandes Draft November 14, 2016 and forever

Computational Complexity III: Limits of Computation

Time-bounded computations

Chapter 6: Turing Machines

U.C. Berkeley CS278: Computational Complexity Professor Luca Trevisan August 30, Notes for Lecture 1

Computational Complexity CSCI-GA Subhash Khot Transcribed by Patrick Lin

CSE 105 THEORY OF COMPUTATION

Computational Complexity Theory. Markus Bläser Universität des Saarlandes Draft January 23, 2014 and forever

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

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

CISC 4090 Theory of Computation

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

Beyond NP [HMU06,Chp.11a] Tautology Problem NP-Hardness and co-np Historical Comments Optimization Problems More Complexity Classes

CS Lecture 28 P, NP, and NP-Completeness. Fall 2008

Mm7 Intro to distributed computing (jmp) Mm8 Backtracking, 2-player games, genetic algorithms (hps) Mm9 Complex Problems in Network Planning (JMP)

1 Deterministic Turing Machines

Lecture 22: PSPACE

INAPPROX APPROX PTAS. FPTAS Knapsack P

CS5371 Theory of Computation. Lecture 10: Computability Theory I (Turing Machine)

Variations of the Turing Machine

The Polynomial Hierarchy

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

Review of unsolvability

Time Complexity (1) CSCI Spring Original Slides were written by Dr. Frederick W Maier. CSCI 2670 Time Complexity (1)

Computational Complexity Theory. Markus Bläser, Holger Dell, Karteek Sreenivasaiah Universität des Saarlandes Draft June 15, 2015 and forever

Finish K-Complexity, Start Time Complexity

Computational complexity

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

CS151 Complexity Theory. Lecture 4 April 12, 2017

The P versus NP Problem. Dean Casalena University of Cape Town CSLDEA001

an efficient procedure for the decision problem. We illustrate this phenomenon for the Satisfiability problem.

Chapter 7: Time Complexity

COMP 382: Reasoning about algorithms

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

PSPACE, NPSPACE, L, NL, Savitch's Theorem. More new problems that are representa=ve of space bounded complexity classes

Transcription:

Deterministic Complexity Measures: Time and Space Deterministic Time and Space Complexity Measures Definition Let M be any DTM with L(M) Σ, and let x Σ be any input. For the computation M(x), define the time function and the space function, denoted respectively by Time M and Space M, both of which map from Σ to N, as follows: Time M (x) = Space M (x) = m undefined if M(x) has exactly m + 1 configurations otherwise; number of tape cells in a largest configuration of M(x) if M(x) terminates undefined otherwise. J. Rothe (HHU Düsseldorf) Kryptokomplexität I 1 / 22

Deterministic Complexity Measures: Time and Space Blum s Axioms Let ϕ 0,ϕ 1,ϕ 2,... be a fixed Gödelization (i.e., an effective enumeration) of all one-argument functions in IP, the class of all partial recursive (i.e., computable) functions. Let IR be the class of all total (i.e., everywhere defined) recursive functions. Let Φ IP be a function mapping from N Σ to N, and write Φ i (x) as a shorthand for Φ(i, x). We say that Φ is a Blum complexity measure if and only if the following two axioms are satisfied: Axiom 1: For each i N, D Φi = D ϕi. Axiom 2: The set {(i, x, m) Φi (x) = m} is decidable. J. Rothe (HHU Düsseldorf) Kryptokomplexität I 2 / 22

Deterministic Complexity Measures: Time and Space Deterministic Time and Space Complexity Measures Definition (continued) Define the functions time M : N N and space M : N N by: max Time M (x) if Time M (x) is defined for x: x =n time M (n) = each x with x = n undefined otherwise; space M (n) = max Space M (x) if Space M (x) is defined for x: x =n each x with x = n undefined otherwise. J. Rothe (HHU Düsseldorf) Kryptokomplexität I 3 / 22

Deterministic Complexity Measures: Time and Space Deterministic Time and Space Complexity Classes Definition Let t and s be functions in IR mapping from N to N. Define the following deterministic complexity classes with resource function t and s, respectively: DTIME(t) = A DSPACE(s) = A A = L(M) for some DTM M and, for each n N, time M (n) t(n) A = L(M) for some DTM M and, for each n N, space M (n) s(n) ;. J. Rothe (HHU Düsseldorf) Kryptokomplexität I 4 / 22

Deterministic Complexity Measures: Time and Space Deterministic Time and Space Complexity Classes Remark: Note that a deterministic Turing machine M decides its language. If A = L(M) then both time M (n) and space M (n) are defined for each n N. In contrast, a nondeterministic Turing machine accepts its language. Thus, the nondeterministic case is treated slightly differently. The resource functions t and s in are called the names of DTIME(t) and DSPACE(s), respectively. J. Rothe (HHU Düsseldorf) Kryptokomplexität I 5 / 22

Deterministic Complexity Measures: Time and Space Deterministic Time and Space Complexity Classes Remark: If M is a Turing machine with more than one tape, then Space M (x), the size of a largest configuration of M(x), is defined to be the maximum number of tape cells, where the maximum is taken both over all tapes and over all configurations in the computation. If there is a separate read-only input tape, then only the space used on the working tapes is to be taken into account (reasonable due to sublinear space functions such as logarithmic space). J. Rothe (HHU Düsseldorf) Kryptokomplexität I 6 / 22

Nondeterministic Complexity Measures: Time and Space Nondeterministic Time and Space Measures Definition Let M be any NTM with L(M) Σ, and let x Σ be any input. Let Time M (x,α) and Space M (x,α) denote the time and space functions for each path α in M(x). For the computation M(x), define the nondeterministic time and space function, denoted by NTime M and NSpace M, both of which map from Σ to N, as follows: min Time M(x,α) if x L(M) NTime M (x) = M(x) accepts on path α undefined otherwise; NSpace M (x) = min Space M (x,α) if x L(M) M(x) accepts on path α undefined otherwise. J. Rothe (HHU Düsseldorf) Kryptokomplexität I 7 / 22

Nondeterministic Complexity Measures: Time and Space Nondeterministic Time and Space Measures Definition (continued) Let t and s be functions in IR mapping from N to N. We say that M accepts a set A in time t if for each x A, we have NTime M (x) t( x ), and for each x A, M does not accept x. We say that M accepts a set A in space s if for each x A, we have NSpace M (x) s( x ), and for each x A, M does not accept x. J. Rothe (HHU Düsseldorf) Kryptokomplexität I 8 / 22

Nondeterministic Complexity Measures: Time and Space Nondeterministic Time and Space Complexity Classes Definition (continued) Define the following nondeterministic complexity classes with resource function t and s, respectively: NTIME(t) = A A = L(M) for some NTM M that accepts A in time t(n) ; NSPACE(s) = A A = L(M) for some NTM M that accepts A in space s(n). J. Rothe (HHU Düsseldorf) Kryptokomplexität I 9 / 22

Resource Functions Resource Functions Remark: It is reasonable to consider collections F of similar resource functions and to define the complexity class corresponding to F by DTIME(F) = DTIME(f) etc. f F Such a collection F contains all resource functions with a similar rate of growth. J. Rothe (HHU Düsseldorf) Kryptokomplexität I 10 / 22

Resource Functions Resource Functions Remark: Consider the collections of functions mapping from N to N each: ILin contains all linear functions, IPol contains all polynomials, 2 ILin contains all exponential functions whose exponent is linear in n, and 2 IPol contains all exponential functions whose exponent is polynomial in n. More generally, for any function t : N N, define the collection of all functions linear in t (respectively, polynomial in t) by: ILin(t) = {f f = l t and l ILin}; IPol(t) = {f f = p t and p IPol}. J. Rothe (HHU Düsseldorf) Kryptokomplexität I 11 / 22

Asymptotic Rate of Growth Asymptotic Rate-of-Growth Notation Definition For functions f and g mapping from N to N, define the following notation: f(n) ae g(n) to mean that f(n) g(n) is true for all but finitely many n N. Analogously, the notations < ae, ae, and > ae are defined. The subscript ae of ae, etc. stands for almost everywhere. Similarly, the notation f(n) io g(n) means that f(n) g(n) is true for infinitely many n N. Analogously, the notations < io, io, and > io are defined. The subscript io of io, etc. stands for infinitely often. J. Rothe (HHU Düsseldorf) Kryptokomplexität I 12 / 22

Asymptotic Rate of Growth Asymptotic Rate-of-Growth Notation Definition For functions f and g mapping from N to N, define the following notation: f O(g) there is a real constant c > 0 such that f(n)+1 ae c (g(n)+1). f o(g) for all real constants c > 0, f(n)+1 < ae c (g(n)+1). J. Rothe (HHU Düsseldorf) Kryptokomplexität I 13 / 22

Asymptotic Rate of Growth Asymptotic Rate-of-Growth Notation Definition f g lim sup n f(n)+1 g(n)+1 <. Note that f O(g) f g. Intuitively, f g means that, by order of magnitude, f does not grow faster than g, with at most finitely many exceptions allowed. f g lim sup n f(n)+1 g(n)+1 = 0. Note that f o(g) f g. Intuitively, f g means that, by order of magnitude, g does grow strictly faster than f, with at most finitely many exceptions allowed. J. Rothe (HHU Düsseldorf) Kryptokomplexität I 14 / 22

Asymptotic Rate of Growth Asymptotic Rate-of-Growth Notation Definition f io g lim inf n f(n)+1 g(n)+1 <. Intuitively, f io g means that, by order of magnitude, f does not grow faster than g, at least not for infinitely many arguments. f io g lim inf n f(n)+1 g(n)+1 = 0. Intuitively, f io g means that, by order of magnitude, g does grow strictly faster than f, at least for infinitely many arguments. J. Rothe (HHU Düsseldorf) Kryptokomplexität I 15 / 22

Asymptotic Rate of Growth Asymptotic Rate-of-Growth Notation Definition Write f g for g f, f g for g f, f io g for g io f, and f io g for g io f. J. Rothe (HHU Düsseldorf) Kryptokomplexität I 16 / 22

Some Central Worst-Case Complexity Classes Some Central Worst-Case Complexity Classes Space classes L = DSPACE(log) NL = NSPACE(log) LINSPACE = DSPACE(ILin) NLINSPACE = NSPACE(ILin) PSPACE = DSPACE(IPol) NPSPACE = NSPACE(IPol) EXPSPACE = DSPACE(2 IPol ) NEXPSPACE = NSPACE(2 IPol ) J. Rothe (HHU Düsseldorf) Kryptokomplexität I 17 / 22

Some Central Worst-Case Complexity Classes Some Central Worst-Case Complexity Classes Time classes REALTIME = DTIME(id) LINTIME = DTIME(ILin) P = DTIME(IPol) NP = NTIME(IPol) E = DTIME(2 ILin ) NE = NTIME(2 ILin ) EXP = DTIME(2 IPol ) NEXP = NTIME(2 IPol ) J. Rothe (HHU Düsseldorf) Kryptokomplexität I 18 / 22

Some Central Worst-Case Complexity Classes Polynomial versus Exponential Functions t(n) n = 10 n = 20 n = 30 n.00001 sec.00002 sec.00003 sec n 2.0001 sec.0004 sec.0009 sec n 3.001 sec.008 sec.027 sec n 5.1 sec 3.2 sec 24.3 sec 2 n.001 sec 1.0 sec 17.9 min 3 n.059 sec 58 min 6.5 years Table: Comparing some functions (Garey & Johnson 1979) J. Rothe (HHU Düsseldorf) Kryptokomplexität I 19 / 22

Some Central Worst-Case Complexity Classes Polynomial versus Exponential Functions t(n) n = 40 n = 50 n = 60 n.00004 sec.00005 sec.00006 sec n 2.0016 sec.0025 sec.0036 sec n 3.064 sec.125 sec.256 sec n 5 1.7 min 5.2 min 13.0 min 2 n 12.7 days 35.7 years 366 centuries 3 n 3855 centuries 2 10 8 centuries 1.3 10 13 centuries Table: Comparing some functions (Garey & Johnson 1979) J. Rothe (HHU Düsseldorf) Kryptokomplexität I 20 / 22

Some Central Worst-Case Complexity Classes What if the Computers Get Faster? t i (n) Computer 100 times 1000 times today faster faster t 1 (n) = n N 1 100 N 1 1000 N 1 t 2 (n) = n 2 N 2 10 N 2 31.6 N 2 t 3 (n) = n 3 N 3 4.64 N 3 10 N 3 t 4 (n) = n 5 N 4 2.5 N 4 3.98 N 4 t 5 (n) = 2 n N 5 N 5 + 6.64 N 5 + 9.97 t 6 (n) = 3 n N 6 N 6 + 4.19 N 6 + 6.29 Table: What if the computers get faster? (Garey & Johnson 1979) J. Rothe (HHU Düsseldorf) Kryptokomplexität I 21 / 22

Some Central Worst-Case Complexity Classes Time versus Space for Deterministic Classes Theorem 1 DTIME(t) DSPACE(t). 2 DSPACE(s) DTIME(2 ILin(s) ) if s log. Proof: See blackboard. J. Rothe (HHU Düsseldorf) Kryptokomplexität I 22 / 22