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

Similar documents
Cook-Levin Theorem. SAT is NP-complete

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

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

CS311 Computational Structures. NP-completeness. Lecture 18. Andrew P. Black Andrew Tolmach. Thursday, 2 December 2010

CS154, Lecture 13: P vs NP

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

Chapter 7: Time Complexity

CS154, Lecture 13: P vs NP

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

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

22c:135 Theory of Computation. Analyzing an Algorithm. Simplifying Conventions. Example computation. How much time does M1 take to decide A?

The Cook-Levin Theorem

Theory of Computation Time Complexity

Intro to Theory of Computation

Computability Theory

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

BBM402-Lecture 11: The Class NP

Complexity (Pre Lecture)

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

CSCI3390-Lecture 16: NP-completeness

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

Applied Computer Science II Chapter 7: Time Complexity. Prof. Dr. Luc De Raedt. Institut für Informatik Albert-Ludwigs Universität Freiburg Germany

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

Time to learn about NP-completeness!

Lecture 19: Finish NP-Completeness, conp and Friends

CS 6505, Complexity and Algorithms Week 7: NP Completeness

CSE 555 HW 5 SAMPLE SOLUTION. Question 1.

Lecture 16: Time Complexity and P vs NP

conp, Oracles, Space Complexity

CSE 135: Introduction to Theory of Computation NP-completeness

Chapter 2 : Time complexity

15.1 Proof of the Cook-Levin Theorem: SAT is NP-complete

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

CS5371 Theory of Computation. Lecture 19: Complexity IV (More on NP, NP-Complete)

Welcome to... Problem Analysis and Complexity Theory , 3 VU

CISC 4090 Theory of Computation

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

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

1 Non-deterministic Turing Machine

NP Completeness. Richard Karp, 1972.

Time Complexity. CS60001: Foundations of Computing Science

Lecture 20: conp and Friends, Oracles in Complexity Theory

CS 320, Fall Dr. Geri Georg, Instructor 320 NP 1

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

PSPACE COMPLETENESS TBQF. THURSDAY April 17

Exam Computability and Complexity

Lecture 13, Fall 04/05

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

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

Lecture 22: PSPACE

CS21 Decidability and Tractability

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

CS5371 Theory of Computation. Lecture 14: Computability V (Prove by Reduction)

Week 3: Reductions and Completeness

Theory of Computer Science

Essential facts about NP-completeness:

NP Completeness. CS 374: Algorithms & Models of Computation, Spring Lecture 23. November 19, 2015

SOLUTION: SOLUTION: SOLUTION:

Lecture 3: Nondeterminism, NP, and NP-completeness

Notes for Lecture 3... x 4

P is the class of problems for which there are algorithms that solve the problem in time O(n k ) for some constant k.

Theory of Computation Space Complexity. (NTU EE) Space Complexity Fall / 1

Lecture Notes 4. Issued 8 March 2018

CSCI 1590 Intro to Computational Complexity

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

CSE 105 Theory of Computation

Theory of Computer Science. Theory of Computer Science. E3.1 Overview. E3.2 Cook-Levin Theorem E3.3 3SAT. E3.4 Summary. Further Reading (German)

6.5.3 An NP-complete domino game

1. Introduction Recap

CS20a: NP completeness. NP-complete definition. Related properties. Cook's Theorem

CS 3719 (Theory of Computation and Algorithms) Lectures 23-32

Advanced Topics in Theoretical Computer Science

Polynomial-time reductions. We have seen several reductions:

Lecture 24: Randomized Complexity, Course Summary

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

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

Review of Complexity Theory

Time to learn about NP-completeness!

NP-Complete Reductions 2

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

NP-Complete Problems. Complexity Class P. .. Cal Poly CSC 349: Design and Analyis of Algorithms Alexander Dekhtyar..

CSC 373: Algorithm Design and Analysis Lecture 18

A.Antonopoulos 18/1/2010

Computation Histories

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?

MTAT Complexity Theory September 15th, Lecture 3

Computability and Complexity CISC462, Fall 2018, Space complexity 1

Meta-Algorithms vs. Circuit Lower Bounds Valentine Kabanets

Midterm II : Formal Languages, Automata, and Computability

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

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

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

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

Lecture 12: Mapping Reductions

Lecture 18: PCP Theorem and Hardness of Approximation I

Lecture 6: Oracle TMs, Diagonalization Limits, Space Complexity

Decidability: Church-Turing Thesis

Non-emptiness Testing for TMs

Transcription:

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

3SAT is NP-complete 2

Result Idea: B is known to be NP complete Use it to prove NP-Completeness of C IF C is NP-hard B is NP-complete and B P C and C NP THEN C is NP-complete 3

Result CLIQUE is NP-hard 3SAT is NP-complete and 3SAT P CLIQUE and CLIQUE NP THEREFORE CLIQUE is NP-complete 4

Result VERTEX-COVER is NP-hard 3SAT is NP-complete and 3SAT P VERTEX-COVER and VERTEX-COVER NP THEREFORE VERTEX-COVER is NP-complete 5

Result IF B is NP-complete and B P THEN P = NP 6

SAT P P = NP 3SAT P P = NP CLIQUE P P = NP VERTEX-COVER P P = NP 7

SAT = { Φ Φ is a satisfiable Boolean formula} SAT NP

Cook-Levin Theorem SAT is NP-complete In other words SAT NP A NP A P SAT 9

To prove A NP A P SAT define polynomial time computable function f: Σ * Σ * w Σ * w A f(w) SAT w Σ * w A Φ SAT 10

Consider any A NP NTM N that decides A in polytime n k For any input w Σ * valid tableau of configurations 11

Properties of a Valid Tableau There is exactly one symbol in each cell The first row is the ( legal ) start configuration Every subsequent row is generated legally 12

For any input w A there is an accepting (valid) tableau of configurations 13

Properties of an Accepting Tableau There is exactly one symbol in each cell The first row is the ( legal ) start configuration Every subsequent row is generated legally One of these rows is an accepting configuration 14

Proof Idea Given N and w construct a Boolean formula that is satisfiable exactly when N has an accepting tableau on input w 15

Constructing the formula Define Boolean formula with variables x ijs for 1 i n k 1 j n k s State Set Tape Alphabet Delimiter Want following semantics: x ijs is T iff cell (i, j) contains symbol s for some valid accepting tableau 16

x ijs is T iff cell (i, j) contains symbol s x 12q_0 is T whereas x 12 is F 17

Properties of an Accepting Tableau There is exactly one symbol in each cell The first row is the ( legal ) start configuration Every subsequent row is generated legally One of these rows is an accepting configuration 18

represent valid tableau with a Boolean formula with components Φ cell exactly one symbol per cell for any pair (i,j) the cell contains at least one symbol the cell contains at most one symbol 19

Properties of an Accepting Tableau There is exactly one symbol in each cell The first row is the ( legal ) start configuration Every subsequent row is generated legally One of these rows is an accepting configuration 20

represent valid tableau with a Boolean formula with components Φ cell exactly one symbol per cell Φ start legal starting configuration 21

Properties of an Accepting Tableau There is exactly one symbol in each cell The first row is the ( legal ) start configuration Every subsequent row is generated legally One of these rows is an accepting configuration 22

represent valid tableau with a Boolean formula with components Φcell exactly one symbol per cell Φstart legal starting configuration Φmove legal moves 23

represent valid tableau with a Boolean formula with components Φ move legal moves transition function N q1 b c, L q2 a b, R b a, R # a b q1 b c # a q2 b c c # a b q1 b c # a b a q2 c 24

represent valid tableau with a Boolean formula with components Φ move legal moves represented by legal windows transition function N q1 b c, L q2 a b, R b a, R 25

represent valid tableau with a Boolean formula with components Φ move legal moves represented by legal windows 26

Properties of an Accepting Tableau There is exactly one symbol in each cell The first row is the ( legal ) start configuration Every subsequent row is generated legally One of these rows is an accepting configuration 27

represent valid accepting tableau with a Boolean formula with components Φ cell exactly one symbol per cell Φ start legal starting configuration Φ move legal moves Φ accept legal accepting configuration 28

represent valid accepting tableau with Boolean formula Φcell Φstart Φmove Φaccept 29

SAT is NP-complete w Σ * w A there is a valid accepting tableau constructed formula is SATISFIABLE Corollary 7.42: 3SAT is NP-complete 30

HALTTM = { M, w : M is a TM that halts on input w} HALTTM is NP-hard In other words A NP A P HALTTM 31

3SAT P HALTTM define polynomial time computable function f: Σ * Σ * w Σ * w 3SAT f(w) HALT TM 32

Define TM M as follows M: On input w: 3SAT P HALTTM If w is not a valid 3CNF encoding then loop If w is a valid 3CNF encoding then check if w evaluates to True for any possible assignment to variables in w If yes then accept else loop w Σ * w 3SAT M, w HALT TM 33

HALTTM = { M, w : M is a TM that halts on input w} Is HALTTM NP-complete? 34

NP-hard NP-complete NP P All languages 35