Time to learn about NP-completeness!

Similar documents
Time to learn about NP-completeness!

SOLUTION: SOLUTION: SOLUTION:

Lecture 24: Randomized Complexity, Course Summary

TIME COMPLEXITY AND POLYNOMIAL TIME; NON DETERMINISTIC TURING MACHINES AND NP. THURSDAY Mar 20

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

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

Notes for Lecture 3... x 4

The Cook-Levin Theorem

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

Lecture 25: Cook s Theorem (1997) Steven Skiena. skiena

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

CS154, Lecture 15: Cook-Levin Theorem SAT, 3SAT

Advanced topic: Space complexity

CSE 135: Introduction to Theory of Computation NP-completeness

1 Computational Problems

BBM402-Lecture 11: The Class NP

Notes for Lecture Notes 2

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

Lecture 19: Finish NP-Completeness, conp and Friends

CSC 373: Algorithm Design and Analysis Lecture 18

Chapter 7: Time Complexity

Polynomial time reduction and NP-completeness. Exploring some time complexity limits of polynomial time algorithmic solutions

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?

Lecture 22: PSPACE

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.

Chapter 3: The Church-Turing Thesis

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

Complexity (Pre Lecture)

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

Lecture 4 : Quest for Structure in Counting Problems

Lecture 7: Polynomial time hierarchy

Computability Theory

Week 3: Reductions and Completeness

Computational complexity

On the Computational Hardness of Graph Coloring

Computability Theory

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

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

Variations of the Turing Machine

Space Complexity. Huan Long. Shanghai Jiao Tong University

Theory of Computation Lecture 1. Dr. Nahla Belal

Umans Complexity Theory Lectures

POLYNOMIAL SPACE QSAT. Games. Polynomial space cont d

Intro to Theory of Computation

CSCI3390-Lecture 16: NP-completeness

Time Complexity. CS60001: Foundations of Computing Science

Automata Theory CS S-18 Complexity Theory II: Class NP

CSE 105 THEORY OF COMPUTATION

CS154, Lecture 13: P vs NP

Lecture 20: conp and Friends, Oracles in Complexity Theory

Complexity. Complexity Theory Lecture 3. Decidability and Complexity. Complexity Classes

1 Circuit Complexity. CS 6743 Lecture 15 1 Fall Definitions

CMPT 710/407 - Complexity Theory Lecture 4: Complexity Classes, Completeness, Linear Speedup, and Hierarchy Theorems

CS151 Complexity Theory. Lecture 1 April 3, 2017

NP-Completeness. A language B is NP-complete iff B NP. This property means B is NP hard

Computability and Complexity

Turing Machines and Time Complexity

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

Week 2: Defining Computation

Complexity Theory 112. Space Complexity

Turing machines COMS Ashley Montanaro 21 March Department of Computer Science, University of Bristol Bristol, UK

CS154, Lecture 13: P vs NP

NP-Completeness I. Lecture Overview Introduction: Reduction and Expressiveness

1 Non-deterministic Turing Machine

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY. FLAC (15-453) Spring l. Blum TIME COMPLEXITY AND POLYNOMIAL TIME;

Computer Sciences Department

Umans Complexity Theory Lectures

A Lower Bound for Boolean Satisfiability on Turing Machines

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

Computational Complexity

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

Lecture 16: Time Complexity and P vs NP

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

Review of Complexity Theory

6.045J/18.400J: Automata, Computability and Complexity. Quiz 2. March 30, Please write your name in the upper corner of each page.

Asymptotic notation : big-o and small-o

Introduction to Complexity Theory

CS 154 Introduction to Automata and Complexity Theory

CSCE 551 Final Exam, Spring 2004 Answer Key

Complexity Classes V. More PCPs. Eric Rachlin

6.045 Final Exam Solutions

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

COL 352 Introduction to Automata and Theory of Computation Major Exam, Sem II , Max 80, Time 2 hr. Name Entry No. Group

CSCI3390-Lecture 14: The class NP

Undecidable Problems. Z. Sawa (TU Ostrava) Introd. to Theoretical Computer Science May 12, / 65

Computability Theory

Mapping Reducibility. Human-aware Robotics. 2017/11/16 Chapter 5.3 in Sipser Ø Announcement:

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

Boolean circuits. Lecture Definitions

Automata Theory CS Complexity Theory I: Polynomial Time

CS 154, Lecture 2: Finite Automata, Closure Properties Nondeterminism,

Lecture 6: Oracle TMs, Diagonalization Limits, Space Complexity

CS256 Applied Theory of Computation

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

Theory of Computation Time Complexity

Lecture 8: Complete Problems for Other Complexity Classes

Algorithmic Model Theory SS 2016

Quantum Computing Lecture 8. Quantum Automata and Complexity

Complexity Theory Part I

Transcription:

Time to learn about NP-completeness! Harvey Mudd College March 19, 2007

Languages A language is a set of strings Examples The language of strings of all zeros with odd length The language of strings with the same number of zeros and ones

Languages A language is a set of strings Examples The language of strings of all zeros with odd length The language of strings with the same number of zeros and ones If we can figure out whether to accept or reject any particular string as part of a language, we say that that language is decidable.

Turing Machines One convenient computation model: The Turing Machine Tape containing symbols from an alphabet States Transition rules Example: a Turing Machine that decides the language of strings of zeros with odd length. # 0 0 0 0 0 #...

Non-Deterministic Turing Machines Instead of a having just one transition rule per state per symbol read on the tape, it may have many Allows branching (like running many machines in parallel) If any branch reaches the accepting state, then the machine accepts the string

Time Complexity Big-Oh notation Counting your toes takes O(number of toes) time. Adding two n bit numbers takes O(n) time. Multiplying two n n matrices takes O(n 3 ) time. Language is polynomial time decidable if any string is either accepted or rejected in time proportional to some polynomial in the size of the string

Polynomial Time Reducibility Language A is reducible to language B if there is some mapping from strings to strings such the first string is in language A iff the mapping of that string is in language B. Silly Example: the language of strings of all zeros of odd length can be reduced to the language of strings of all zeros of even length Complicated Example: From the last talk, 3-SAT can be reduced to Graph 3-Colorability

Polynomial Time Reducibility Language A is reducible to language B if there is some mapping from strings to strings such the first string is in language A iff the mapping of that string is in language B. Silly Example: the language of strings of all zeros of odd length can be reduced to the language of strings of all zeros of even length Complicated Example: From the last talk, 3-SAT can be reduced to Graph 3-Colorability If you can perform this reduction in polynomial time, A is polynomial reducible to B.

P vs N P P is the class of languages which can be decided in polynomial time by a deterministic Turing Machine N P is the class of languages which can be decided in polynomial time by a non-deterministic Turing Machine Equivalently, N P is the class of languages which can be verified in polynomial time P N P

P vs N P P is the class of languages which can be decided in polynomial time by a deterministic Turing Machine N P is the class of languages which can be decided in polynomial time by a non-deterministic Turing Machine Equivalently, N P is the class of languages which can be verified in polynomial time P N P P = N P?

Two requirements for a language to be N P-complete The language must be in N P Any other language in N P is polynomial time reducible to that language

Two requirements for a language to be N P-complete The language must be in N P Any other language in N P is polynomial time reducible to that language Implications of N P-completeness Polynomial time algorithm for any N P-complete language yields a polynomial time algorithm for all languages in N P and means that P = N P. Worth $1,000,000

- SAT is N P-complete Variables may either be true or false. Variables may be NOTed (with ), ORed (with ), or ANDed (with ). Example formula: (a b c d) ( a c d) SAT is the language which is a collection of formulas such that there is some assignment of variables that makes the formula true.

SAT is N P-complete SAT N P: easy to verify given a correct assignment of variables Need to show that any language B in NP can be reduced in polynomial time to SAT Language B can be decided by a non-deterministic Turing Machine in n k time for some constant k. We can build a huge formula to simulate a Turing Machine running on a string to decide whether it s in language B.

Tableau # q start w 1 w 2... w l... # starting config. # # second config. # # n k th config. Essentially a record of the tape and state of the Turing Machine Doesn t need to be more than n k wide φ = φ cell φ start φ accept φ transition

Proof Sketch SAT is in N P Any language in N P is polynomial time reducible to SAT Languages in N P are decidable by a non-deterministic Turing Machine in polynomial time Can reduce this machine s running into a formula Formula φ = φ start φ cell φ transition φ accept is satisfiable iff Turing Machine can run to acceptance Reduction in polynomial time

Proof Sketch SAT is in N P Any language in N P is polynomial time reducible to SAT Languages in N P are decidable by a non-deterministic Turing Machine in polynomial time Can reduce this machine s running into a formula Formula φ = φ start φ cell φ transition φ accept is satisfiable iff Turing Machine can run to acceptance Reduction in polynomial time So, SAT is N P-complete!

3-SAT N P-Complete Now that we know SAT is N P-complete, to show that another is N P-complete, we only have to show that it s in N P and that we can reduce SAT to it in polynomial time 3-SAT is N P-Complete 3-SAT is verifiable in polynomial time For every clause (a 1 a 2 a l ) in SAT, make the clauses (a 1 a 2 z 1 ) ( z 1 a 3 z 2 ) ( z l 3 a l 1 a l ) in 3-SAT

Presentation based on the proof from Prof. Pippenger s Complexity Theory class and in Michael Sipser s Introduction to the Theory of Compuation 2nd ed. 2006.