Algorithmic Complexity Space Complexity

Algorithmic Complexity Space Complexity

Université Paris 5 – René Descartes LIPADE Algorithmic Complexity Space Complexity Jean-Guy Mailly ([email protected]) 2017 Outline 1 Basics on Space Complexity Main Space Complexity Classes Deterministic and Non-Deterministic Space Space-Time Relations Determining Space Complexity Hardness and Completeness Well-Known Problems J.-G. Mailly | Complexity – Space Space Used by a Turing Machine 2 I If M is a Turing Machine and x an input word, the space used by M on x is the number of different squares visited by M during the computation. I For f : N ! N, we say that a Turing Machine M works with space O(f (n)) if I M stops for every input x I on every input x, M uses on x a space s(n) with s(n) 2 O(f (n)) J.-G. Mailly | Complexity – Space Space Complexity Classes 3 I For f : N ! N, DSPACE(f (n)) is the set of languages which are decided by a deterministic Turing Machine M working with space O(f (n)). I For f : N ! N, NSPACE(f (n)) is the set of languages which are decided by a non-deterministic Turing Machine M working with space O(f (n)). J.-G. Mailly | Complexity – Space Deterministic vs Non-Deterministic Space 4 Intuition: Non-determinism is not “so important” for space complexity::: Theorem [Savitch 1970] For all function f space-constructible, DSPACE(f (n)) ⊆ NSPACE(f (n)) ⊆ DSPACE(f (n)2) J.-G. Mailly | Complexity – Space Complement Classes 5 Proposition For all function f (n) space-constructible, DSPACE(f (n)) = CODSPACE(f (n)) Theorem [Immerman 1988, Szelepcsényi 1988] For all function f (n) ≥ log(n) space-constructible, NSPACE(f (n)) = CONSPACE(f (n)) J.-G. Mailly | Complexity – Space Outline 6 Basics on Space Complexity Main Space Complexity Classes Deterministic and Non-Deterministic Space Space-Time Relations Determining Space Complexity Hardness and Completeness Well-Known Problems J.-G. Mailly | Complexity – Space L ⊆ PSPACE Deterministic Space Complexity 7 I L = DSPACE(log(n)) is the class of decision problems that can be solved by a DTM using logarithmic space S k I PSPACE = k>0 DSPACE(n ) is the class of decision problems that can be solved by a DTM using polynomial space J.-G. Mailly | Complexity – Space Deterministic Space Complexity 7 I L = DSPACE(log(n)) is the class of decision problems that can be solved by a DTM using logarithmic space S k I PSPACE = k>0 DSPACE(n ) is the class of decision problems that can be solved by a DTM using polynomial space L ⊆ PSPACE J.-G. Mailly | Complexity – Space NL ⊆ NPSPACE Non-Deterministic Space Complexity 8 I NL = NSPACE(log(n)) is the class of decision problems that can be solved by a NDTM using logarithmic space S k I NPSPACE = k>0 NSPACE(n ) is the class of decision problems that can be solved by a NDTM using polynomial space J.-G. Mailly | Complexity – Space Non-Deterministic Space Complexity 8 I NL = NSPACE(log(n)) is the class of decision problems that can be solved by a NDTM using logarithmic space S k I NPSPACE = k>0 NSPACE(n ) is the class of decision problems that can be solved by a NDTM using polynomial space NL ⊆ NPSPACE J.-G. Mailly | Complexity – Space Proof: I For any k > 0, NSPACE(nk ) ⊆ DSPACE((nk )2) = DSPACE((n2k ) ⊆ PSPACE, so NPSPACE ⊆ PSPACE k k I For any k > 0, DSPACE(n ) ⊆ NSPACE(n ) ⊆ NPSPACE, so PSPACE ⊆ NPSPACE PSPACE vs NPSPACE 9 Proposition PSPACE = NPSPACE J.-G. Mailly | Complexity – Space PSPACE vs NPSPACE 9 Proposition PSPACE = NPSPACE Proof: I For any k > 0, NSPACE(nk ) ⊆ DSPACE((nk )2) = DSPACE((n2k ) ⊆ PSPACE, so NPSPACE ⊆ PSPACE k k I For any k > 0, DSPACE(n ) ⊆ NSPACE(n ) ⊆ NPSPACE, so PSPACE ⊆ NPSPACE J.-G. Mailly | Complexity – Space Corollary NP ⊆ PSPACE Relations Between Time and Space (1/3) 10 Proposition For any mapping f : N ! N, NTIME(f (n)) ⊆ DSPACE(f (n)) J.-G. Mailly | Complexity – Space Relations Between Time and Space (1/3) 10 Proposition For any mapping f : N ! N, NTIME(f (n)) ⊆ DSPACE(f (n)) Corollary NP ⊆ PSPACE J.-G. Mailly | Complexity – Space Relations Between Time and Space (2/3) 11 Polynomial Hierarchy vs Polynomial Space PH ⊆ PSPACE Intuition For each class of the polynomial hierharchy, there is a complete problem 8i QBF or 9i QBF. All these problems are special instances of TQBF, so they are in PSPACE. J.-G. Mailly | Complexity – Space Relations Between Time and Space (3/3) 12 P NP P Σ2 L ⊆ NL ⊆ P ⊆ coNP ⊆ ∆2 ⊆ P ⊆ · · · ⊆ PH ⊆ PSPACE ⊆ EXP ⊆ NEXP Π2 We also know that some inclusions are strict: I NL ⊂ PSPACE I P ⊂ EXP J.-G. Mailly | Complexity – Space Outline 13 Basics on Space Complexity Main Space Complexity Classes Deterministic and Non-Deterministic Space Space-Time Relations Determining Space Complexity Hardness and Completeness Well-Known Problems J.-G. Mailly | Complexity – Space 0 P I A problem P is C-hard if for every problem P’ in C, P ≤f P, i.e. there is a polynomial reduction from any problem in C to P I A problem is C-complete if it is in C and it is C-hard I This definition works for PSPACE-hardness and PSPACE-completeness I It does not work for L and NL Completeness for Space Complexity Classes 14 The notions of hardness and completeness exist for space complexity classes. I For most of the complexity classes, the definition is exactly the same as hardness and completeness for time complexity J.-G. Mailly | Complexity – Space I A problem is C-complete if it is in C and it is C-hard I This definition works for PSPACE-hardness and PSPACE-completeness I It does not work for L and NL Completeness for Space Complexity Classes 14 The notions of hardness and completeness exist for space complexity classes. I For most of the complexity classes, the definition is exactly the same as hardness and completeness for time complexity 0 P I A problem P is C-hard if for every problem P’ in C, P ≤f P, i.e. there is a polynomial reduction from any problem in C to P J.-G. Mailly | Complexity – Space I This definition works for PSPACE-hardness and PSPACE-completeness I It does not work for L and NL Completeness for Space Complexity Classes 14 The notions of hardness and completeness exist for space complexity classes. I For most of the complexity classes, the definition is exactly the same as hardness and completeness for time complexity 0 P I A problem P is C-hard if for every problem P’ in C, P ≤f P, i.e. there is a polynomial reduction from any problem in C to P I A problem is C-complete if it is in C and it is C-hard J.-G. Mailly | Complexity – Space I It does not work for L and NL Completeness for Space Complexity Classes 14 The notions of hardness and completeness exist for space complexity classes. I For most of the complexity classes, the definition is exactly the same as hardness and completeness for time complexity 0 P I A problem P is C-hard if for every problem P’ in C, P ≤f P, i.e. there is a polynomial reduction from any problem in C to P I A problem is C-complete if it is in C and it is C-hard I This definition works for PSPACE-hardness and PSPACE-completeness J.-G. Mailly | Complexity – Space Completeness for Space Complexity Classes 14 The notions of hardness and completeness exist for space complexity classes. I For most of the complexity classes, the definition is exactly the same as hardness and completeness for time complexity 0 P I A problem P is C-hard if for every problem P’ in C, P ≤f P, i.e. there is a polynomial reduction from any problem in C to P I A problem is C-complete if it is in C and it is C-hard I This definition works for PSPACE-hardness and PSPACE-completeness I It does not work for L and NL J.-G. Mailly | Complexity – Space L P Observation: If P1 ≤f P2, then P1 ≤f P2 NL-Hardness and NL-Completeness 0 0 L I A problem P is NL-hard iff 8P 2 NL, P ≤f P I A problem P is NL-complete iff P is NL-hard and P 2 L Logarithmic Space and Completeness 15 Logarithmic-Space Functional Reduction A logarithmic-space functional reduction f is a total computable function from a problem P1 to a problem P2 such that, for any instance i of P1, I f (i) can be computed in logarithmic-space in the size of i I i is a positive instance of P1 iff f (i) is a positive instance of P2 L Notation: P1 ≤f P2 J.-G. Mailly | Complexity – Space NL-Hardness and NL-Completeness 0 0 L I A problem P is NL-hard iff 8P 2 NL, P ≤f P I A problem P is NL-complete iff P is NL-hard and P 2 L Logarithmic Space and Completeness 15 Logarithmic-Space Functional Reduction A logarithmic-space functional reduction f is a total computable function from a problem P1 to a problem P2 such that, for any instance i of P1, I f (i) can be computed in logarithmic-space in the size of i I i is a positive instance of P1 iff f (i) is a positive instance of P2 L Notation: P1 ≤f P2 L P Observation: If P1 ≤f P2, then P1 ≤f P2 J.-G.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    40 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us