Computational Complexity Theory

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

Computational Complexity

Computability and Complexity CISC462, Fall 2018, Space complexity 1

6-1 Computational Complexity

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

conp, Oracles, Space Complexity

Technische Universität München Summer term 2010 Theoretische Informatik August 2, 2010 Dr. J. Kreiker / Dr. M. Luttenberger, J. Kretinsky SOLUTION

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

Lecture 24: Randomized Complexity, Course Summary

Complexity Theory VU , SS The Polynomial Hierarchy. Reinhard Pichler

Outline. Complexity Theory EXACT TSP. The Class DP. Definition. Problem EXACT TSP. Complexity of EXACT TSP. Proposition VU 181.

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

Lecture 20: conp and Friends, Oracles in Complexity Theory

INAPPROX APPROX PTAS. FPTAS Knapsack P

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

Lecture 23: More PSPACE-Complete, Randomized Complexity

Lecture 3: Reductions and Completeness

Essential facts about NP-completeness:

Lecture 2 (Notes) 1. The book Computational Complexity: A Modern Approach by Sanjeev Arora and Boaz Barak;

Lecture 6: Oracle TMs, Diagonalization Limits, Space Complexity

NP Complete Problems. COMP 215 Lecture 20

Umans Complexity Theory Lectures

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

Lecture 22: PSPACE

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

CS151 Complexity Theory. Lecture 1 April 3, 2017

Time and space classes

Notes on Complexity Theory Last updated: November, Lecture 10

Introduction to Advanced Results

CSE 105 THEORY OF COMPUTATION

Review of Basic Computational Complexity

Intro to Theory of Computation

DRAFT. Diagonalization. Chapter 4

Lecture 16: Time Complexity and P vs NP

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

Complexity Theory Final Exam

Intro to Theory of Computation

Review of Complexity Theory

The Cook-Levin Theorem

Umans Complexity Theory Lectures

Notes for Lecture 3... x 4

6.840 Language Membership

: Computational Complexity Lecture 3 ITCS, Tsinghua Univesity, Fall October 2007

Lecture 22: Counting

A An Overview of Complexity Theory for the Algorithm Designer

CSCI 1590 Intro to Computational Complexity

Computational complexity

6.045 Final Exam Solutions

CSC 5170: Theory of Computational Complexity Lecture 5 The Chinese University of Hong Kong 8 February 2010

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

Intractable Problems [HMU06,Chp.10a]

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}

Finish K-Complexity, Start Time Complexity

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

Lecture 3: Nondeterminism, NP, and NP-completeness

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?

6.045: Automata, Computability, and Complexity (GITCS) Class 17 Nancy Lynch

Lecture 12: Randomness Continued

-bit integers are all in ThC. Th The following problems are complete for PSPACE NPSPACE ATIME QSAT, GEOGRAPHY, SUCCINCT REACH.

Randomized Computation

Chapter 2 : Time complexity

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

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

Lecture 19: Interactive Proofs and the PCP Theorem

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

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

Computer Sciences Department

2 Natural Proofs: a barrier for proving circuit lower bounds

1 PSPACE-Completeness

A.Antonopoulos 18/1/2010

Lecture 12: Interactive Proofs

CSE 135: Introduction to Theory of Computation NP-completeness

Non-Deterministic Time

Non-Approximability Results (2 nd part) 1/19

20.1 2SAT. CS125 Lecture 20 Fall 2016

CISC 4090 Theory of Computation

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

Lecture 19: Finish NP-Completeness, conp and Friends

Lecture 26: Arthur-Merlin Games

6.841/18.405J: Advanced Complexity Wednesday, February 12, Lecture Lecture 3

Lecture 11: Proofs, Games, and Alternation

NP-Completeness. Subhash Suri. May 15, 2018

The Polynomial Hierarchy

Chapter 5 : Randomized computation

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

Complexity Theory. Jörg Kreiker. Summer term Chair for Theoretical Computer Science Prof. Esparza TU München

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

Computational Models Lecture 11, Spring 2009

CS154, Lecture 13: P vs NP

Q = Set of states, IE661: Scheduling Theory (Fall 2003) Primer to Complexity Theory Satyaki Ghosh Dastidar

Complexity (Pre Lecture)

CS 6505, Complexity and Algorithms Week 7: NP Completeness

Harvard CS 121 and CSCI E-121 Lecture 22: The P vs. NP Question and NP-completeness

CSCI 1590 Intro to Computational Complexity

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

Notes on Complexity Theory Last updated: December, Lecture 2

CS154, Lecture 13: P vs NP

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

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

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

Transcription:

Computational Complexity Theory Marcus Hutter Canberra, ACT, 0200, Australia http://www.hutter1.net/

Assumed Background Preliminaries Turing Machine (TM) Deterministic Turing Machine (DTM) NonDeterministic Turing Machine (NTM) Formal Languages (L) = Boolean Function (f ): A TM M decides language L {0, 1} if it computes function f : {0, 1} {0, 1}, where f (x) := 1 x L. Marcus Hutter (ANU) Computational Complexity Theory Australian National University 2 / 19

Polynomial Time Classes The class TIME: Let T : N N be some function and L {0, 1}. L TIME(T (n)) : TM that runs in time O(T (n)) on all inputs of length n and decides L. Write DTIME for DTM, and NTIME for NTM. The class P:= k=1 DTIME(nk ) = poly-time = tractable = problems that can be decided in polynomial time. Examples: is-sorted, is-shortest path, is-prime (AKS 2002),... The class NP:= k=1 NTIME(nk ) = solution can be verified in poly-time: Examples: SAT, Independent Set,... FTIME,FP,FNP: Same as TIME,P,NP but for fcts. f :{0, 1} {0, 1} Poly-time Reduction L p L : [ f FP: x L f (x) L ]. Marcus Hutter (ANU) Computational Complexity Theory Australian National University 3 / 19

NP-Completeness L is said to be NP-hard if L p L for all L NP. L is said to be NP-complete if L is NP-hard and L NP. There are literally thousands of NP-complete problems: SAT, 3SAT, IndSet, Knapsack, TSP, Clique, 3Col, MaxCut,... Elementary results: Transitivity: If L p L and L p L then L p L If L is NP-hard and L P, then P=NP If L is NP-complete, then L P iff P=NP Implication: If we could find a poly-time algorithm for a single NP-complete problem, we could solve them all in poly-time! Marcus Hutter (ANU) Computational Complexity Theory Australian National University 4 / 19

The InFamous P=NP Question Informally: Is it harder to find a solution than to verify a solution? The standard opinion is that P NP. Is the deepest open problem in all of mathematics. No one has any idea where to begin. We have a pretty sophisticated idea of why we have no idea: (keywords: oracles and natural proofs) P EXP =NP EXP with access to EXP-oracle. P rand NP rand with access to random oracle. No proof that relativizes, i.e. continues to hold with oracles, can decide P=NP. Most proofs in complexity theory relativize. P=NP cannot be decided by such proofs. Marcus Hutter (ANU) Computational Complexity Theory Australian National University 5 / 19

Polynomial Space Class The class SPACE: Let S : N N be some function and L {0, 1}. L SPACE(S(n)) : TM that uses at most O(S(n)) tape cells on all inputs of length n and decides L. The class PSPACE:= k=1 SPACE(nk ) = poly-space = problems that can be decided in polynomial space. Main result: PSPACE[for DTM] = PSPACE[for NTM] L is PSPACE-complete : [L NP and L PSPACE: L p L ] Many interesting problems are PSPACE-complete: Quantified Boolean Formulas (QBF), many zero-sum games,... Marcus Hutter (ANU) Computational Complexity Theory Australian National University 6 / 19

QuickSort: A Randomized Algorithm QuickSort: Pick pivot element a i from list (a 1,..., a n ) at random. Divide list in two lists, one containing all elements < a i, the other all elements > a i. Recursively sort both lists and join together result. Expected running time: O(n log n) Important: Holds for all inputs. Expectation is over internal algorithm randomization. But worst-case running time is still O(n 2 ). QuickSort falls outside complexity classes considered so far... Marcus Hutter (ANU) Computational Complexity Theory Australian National University 7 / 19

Probabilistic Turing Machines A Probabilistic TM (PTM) is like a standard deterministic TM, but with extra tape filled with random bits, i.e. independent fair coin tosses (head=1 and tail=0). A Polynomial PTM halts after a polynomial (in the length of the input) number of steps. A PTM can make mistakes: Randomized algorithms may fail to produce the desired output with some specified failure probability. Marcus Hutter (ANU) Computational Complexity Theory Australian National University 8 / 19

Random Polynomial Time Classes A Polytime PTM can recognize languages in different ways: RP (Randomized Polynomial time) 1-sided error: x L Pr[M(x) = 1] 1/2, x L M(x) = 0 corp (complement of RP) 1-sided error: x L M(x) = 1, x L Pr[M(x) = 0] 1/2 BPP (Bounded-error Probabilistic Polynomial time) 2-sided error: x L Pr[M(x) = 1] 2/3, x L Pr[M(x) = 1] 1/3 ZPP (Zero-error Probabilistic Polynomial time) 0 error: x L M(x) = 1 or don t know, x L M(x) = 0 or don t know and x : Pr[M(x) = don t know ] 1/2 Note: PP := similar BPP but with 1/3&2/3 1/2. PP is very different! Marcus Hutter (ANU) Computational Complexity Theory Australian National University 9 / 19

Relation Between the Random Classes One can boost probabilities from 1/2 or 2/3 to get exponentially close to 1 by poly-many repeated runs of algorithm. Combine results by reject if one exception -or- by majority vote By repeating ZPP, we always get the correct answer in expected polytime. BPP PSPACE P ZPP RP NP = RP corp None of the inclusions is known to be strict (or equality). Indeed, a proof of one of the hor. to be, would prove P NP. Many algorithms have been derandomized (with ingenuity). Conjecture: All can be derandomized, i.e. BPP=RP=ZPP=P. Marcus Hutter (ANU) Computational Complexity Theory Australian National University 10 / 19

Complexity of Primality Testing Prime factorization (504 = 2 3 3 2 7) obviously in NP. Several computer security techniques rely on the assumption that it is hard to factor numbers. Public-Key Cryptography: RSA uses public 128bit integer (used for encryption) that is a product of two private 64bit primes (used for decryption). Public-Key Signatures: I encode contract with two private 64bit primes. You decode it with public public 128bit integer. Only I have the factors, so only I could have sent the contract, so you know/can prove the letter (promise/signature/offer) is from me. Coding uses modular arithmetic and exploits Fermat s little theorem. Amazingly Primes P (AKS 2002, Goedel Prize) But finding the factors seems to be hard! RSA is safe for now. Marcus Hutter (ANU) Computational Complexity Theory Australian National University 11 / 19

Oracle Turing Machines An oracle Turing machine M O is a TM with a special oracle tape and three special states q query, q yes, q no. The oracle is a language O {0, 1}. If M enters the state q query, the machine moves into the state q yes if y O and q no if q O, where y denotes the contents of the special oracle tape. A membership query to O counts only as a single computational step. Nondeterministic oracle TMs are defined similarly. Example application: P EXP =NP EXP but P rand NP rand Halting oracle: O = L U = { M, w : M(w) halts} Marcus Hutter (ANU) Computational Complexity Theory Australian National University 12 / 19

Hierarchies There are many different hierarchies in different disciplines: Second-order arithmetic: Analytical hierarchy Σ 1 n, Π 1 n, 1 n First-Order Logic: Arithmetical hierarchy Σ 0 n, Π 0 n, 0 n (#alt....) Computability Theory: Turing jumps=hierarchy of halting oracles (n) Complexity Theory: Polynomial hierarchy (PH): Σ P n, Π P n, P n =Hierarchy of NP-oracles. PH PSPACE The hierarchies themselves form a hierarchy: The smallest=base class in each item includes the entire hierarchy of the next item. Marcus Hutter (ANU) Computational Complexity Theory Australian National University 13 / 19

Time Hierarchy Time Hierarchy Theorem: If f and g are time-constructible functions satisfying f (n) log f (n) = o(g(n)), then TIME(f (n)) TIME(g(n)). In particular: TIME(log n) TIME(n) TIME(n 2 )... P EXP Space Hierarchy Theorem: If f and g are space-constructible functions satisfying f (n) = o(g(n)), then SPACE(f (n)) SPACE(g(n)). In particular: L SPACE(n) SPACE(n 2 )... PSPACE Finally we have some separation results! Existence of NP-Intermediate Problems: Suppose P NP. Then there exists a language L NP\P that is not NP-complete. Marcus Hutter (ANU) Computational Complexity Theory Australian National University 14 / 19

Function Classes Classical Classes (P,NP,PSPACE,RP,...) are language classes. Every language class has a corresponding function class (FP,FNP,FPSPACE,FRP,...): Time/space-bounded TM that computes function f : {0, 1} N = {0, 1}. Languages are special case of 0-1-valued functions: L = {f (x) = 1} = P FP, etc. FP can be reduced to polynomially many problems in P, each predicting one bit of the FP problem. Similarly for other classes. In this sense, P and FP are equally hard. Marcus Hutter (ANU) Computational Complexity Theory Australian National University 15 / 19

Finding Witnesses Witness := Sequence of non-deterministic choices in NTM computation. For many decision problems in NP, the witness is the solution of the underlying function problem. Example: NP-algorithm for SAT guesses a satisfying assignment w {0, 1} #vars. If P=NP, then w can also be found in polytime: Algorithm: Incrementally increase partial solution for w = w 1...w p(n) : Assume w 1...w k 1 is known. Let M k be NTM M but with first k choices fixed to w 1...w k 1 1. If M accepts x, choose w k = 1 else w k = 0. Cf. Primes P, but finding factors seems hard. Marcus Hutter (ANU) Computational Complexity Theory Australian National University 16 / 19

Universal Levin Search Levin Search (LS) is fastest algorithm within a (large) constant factor to invert a function g :Y X, if g can be evaluated quickly. LS Algorithm runs all programs p 1, p 2,..., p k on input x each for k time-steps, for k = 1, 2, 3,... Whenever a program p i halts with some output, say y, LS cmp. g(y) and if g(y) = x, LS halts with output y Application: Assume someone found a non-constructive proof of P=NP, then LS finds witnesses of any NP (complete) problem in polynomial time. Proof: Let g(ϕ, z) = (ϕ, ϕ(z)). ϕ(z) is evaluation of Boolean Formula ϕ for variable assignment z. Let p be any alleged polytime alg. p(ϕ) = T ϕ SAT. Convert to polytime alg. p (ϕ, T ) = (ϕ, z), which is inverse of g. Run LS for x = (ϕ, T ). Since LS executes p with constant slow-down, if ϕ SAT, LS finds (ϕ, z) in poly-time, where z is satisfying assignment of ϕ. Note: If ϕ SAT, LS does not terminate. Marcus Hutter (ANU) Computational Complexity Theory Australian National University 17 / 19

Why is PSPACE harder than NP True NP instances can (at least) be easily verified: Provide witness = accepting-id-path of NTM. Has polynomial length and can be verified in polynomial time. Example: Powerful Prover (in PSPACE) provides satisfying assignment for ϕ. Verifier can check correctness in polytime. Not possible for unsatisfiable ϕ. Example: Composite numbers: Prover provides factors. Verifier checks by multiplication. Remarkably also possible for Primes (Primes NP). No short proofs=certificates for PSPACE complete problems: Prover even of unlimited power cannot convince poly-time verifier that some Language is in some class. [if PSPACE NP] Examples: Prover cannot convince Verifier that white (or black) has winning strategy in many zero-sum games such as n n Chess or Go, or that QBF formula ϕ is true. Marcus Hutter (ANU) Computational Complexity Theory Australian National University 18 / 19

Interactive Proofs Interactive Proofs (IP): Sequential interaction between Prover PSPACE and Verifier BPP. Problem IP : Verifier BPP can ask Prover PSPACE sequence of nasty questions and get convinced. PSPACE=IP! = PSPACE can be efficiently verified by interactive proof. Simple example of protocol: Colorblind verifies that prover can distinguish shoe color. Verifier repeatedly chooses shoes (identical except for color) at random (but remembering choice) and asks Prover for color. If Prover provides consistent answers, then shoes must indeed have different color. Real examples: Graph NonIsomorphism is in IP and the Permanent is even IP-complete. Marcus Hutter (ANU) Computational Complexity Theory Australian National University 19 / 19