NP-completeness Sipser 7.4 (pages 271 – 283). CS 311 Mount Holyoke College 2 The classes P and NP NP = ∪ k NTIME(n k ) P = ∪ k TIME(n k )

Slides:



Advertisements
Similar presentations
Polynomial-time reductions We have seen several reductions:
Advertisements

NP and NP Complete. Definitions A problem is in the class P if there is a polynomial time solution to the problem A problem is in the class NP if there.
The class NP Section 7.3 Giorgi Japaridze Theory of Computability.
NP-Completeness Lecture for CS 302. Traveling Salesperson Problem You have to visit n cities You want to make the shortest trip How could you do this?
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
More NP-completeness Sipser 7.5 (pages ). CS 311 Fall NP’s hardest problems Definition 7.34: A language B is NP-complete if 1.B ∈ NP 2.A≤
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen.
Umans Complexity Theory Lectures Lecture 2a: Reductions & Completeness.
The diagonalization method The halting problem is undecidable Decidability.
Computability and Complexity 13-1 Computability and Complexity Andrei Bulatov The Class NP.
P and NP Sipser (pages ). CS 311 Fall Polynomial time P = ∪ k TIME(n k ) … P = ∪ k TIME(n k ) … TIME(n 3 ) TIME(n 2 ) TIME(n)
Algorithms Sipser 3.3 (pages ). CS 311 Mount Holyoke College 2 Computability Hilbert's Tenth Problem: Find “a process according to which it can.
NP-completeness Sipser 7.4 (pages 271 – 283). CS 311 Fall The classes P and NP NP = ∪ k NTIME(n k ) P = ∪ k TIME(n k )
More NP-completeness Sipser 7.5 (pages ).
Mapping Reducibility Sipser 5.3 (pages ).
More Turing Machines Sipser 3.2 (pages ).
Mapping Reducibility Sipser 5.3 (pages ). CS 311 Fall Computable functions Definition 5.17: A function f:Σ*→Σ* is a computable function.
CS21 Decidability and Tractability
Graphs 4/16/2017 8:41 PM NP-Completeness.
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY Read sections 7.1 – 7.3 of the book for next time.
NP-Complete Problems Reading Material: Chapter 10 Sections 1, 2, 3, and 4 only.
NP-Completeness CS 51 Summer 2008 TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A AA A A AAA.
1 Polynomial Time Reductions Polynomial Computable function : For any computes in polynomial time.
NP-Complete Problems Problems in Computer Science are classified into
Time Complexity.
NP-Completeness (2) NP-Completeness Graphs 4/17/2017 6:25 AM x x x x x
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT Lecture NP-Completeness Jan Maluszynski, IDA, 2007
Chapter 11: Limitations of Algorithmic Power
Clique Cover Cook’s Theorem 3SAT and Independent Set
February 20, 2015CS21 Lecture 191 CS21 Decidability and Tractability Lecture 19 February 20, 2015.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
February 18, 2015CS21 Lecture 181 CS21 Decidability and Tractability Lecture 18 February 18, 2015.
Lecture 22 More NPC problems
Computational Complexity Theory Lecture 2: Reductions, NP-completeness, Cook-Levin theorem Indian Institute of Science.
Prabhas Chongstitvatana1 NP-complete proofs The circuit satisfiability proof of NP- completeness relies on a direct proof that L  p CIRCUIT-SAT for every.
CSCI 2670 Introduction to Theory of Computing November 29, 2005.
CSCI 2670 Introduction to Theory of Computing December 1, 2004.
Week 10Complexity of Algorithms1 Hard Computational Problems Some computational problems are hard Despite a numerous attempts we do not know any efficient.
CSE 024: Design & Analysis of Algorithms Chapter 9: NP Completeness Sedgewick Chp:40 David Luebke’s Course Notes / University of Virginia, Computer Science.
Complexity Non-determinism. NP complete problems. Does P=NP? Origami. Homework: continue on postings.
NP-Complete Problems. Running Time v.s. Input Size Concern with problems whose complexity may be described by exponential functions. Tractable problems.
1 Chapter 34: NP-Completeness. 2 About this Tutorial What is NP ? How to check if a problem is in NP ? Cook-Levin Theorem Showing one of the most difficult.
NP-completeness Section 7.4 Giorgi Japaridze Theory of Computability.
CSCI 3130: Formal languages and automata theory Andrej Bogdanov The Chinese University of Hong Kong The Cook-Levin.
NP-completeness Class of hard problems. Jaruloj ChongstitvatanaNP-complete Problems2 Outline  Introduction  Problems and Languages Turing machines and.
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 7 Time complexity Contents Measuring Complexity Big-O and small-o notation.
CSE 6311 – Spring 2009 ADVANCED COMPUTATIONAL MODELS AND ALGORITHMS Lecture Notes – Feb. 3, 2009 Instructor: Dr. Gautam Das notes by Walter Wilson.
Chapter 11 Introduction to Computational Complexity Copyright © 2011 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1.
NPC.
NP-complete Languages
CSCI 2670 Introduction to Theory of Computing December 2, 2004.
CSCI 2670 Introduction to Theory of Computing December 7, 2005.
April 13 th Class Notes Hw# 5 will be worth 50 points and it will be posted tonight or tomorrow.
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong NP-complete.
Computability Examples. Reducibility. NP completeness. Homework: Find other examples of NP complete problems.
The NP class. NP-completeness Lecture2. The NP-class The NP class is a class that contains all the problems that can be decided by a Non-Deterministic.
 2005 SDU Lecture15 P,NP,NP-complete.  2005 SDU 2 The PATH problem PATH = { | G is a directed graph that has a directed path from s to t} s t
NP-Completeness A problem is NP-complete if: It is in NP
NP-Completeness Yin Tat Lee
Intro to Theory of Computation
CSC 4170 Theory of Computation The class NP Section 7.3.
CS154, Lecture 13: P vs NP.
CS21 Decidability and Tractability
CSC 4170 Theory of Computation The class NP Section 7.3.
NP-Completeness Yin Tat Lee
CSE 589 Applied Algorithms Spring 1999
Theory of Computability
Intro to Theory of Computation
Presentation transcript:

NP-completeness Sipser 7.4 (pages 271 – 283)

CS 311 Mount Holyoke College 2 The classes P and NP NP = ∪ k NTIME(n k ) P = ∪ k TIME(n k )

CS 311 Mount Holyoke College 3 A famous NP problem CNF satisfiability ( CNFSAT ): Given a boolean formula B in conjunctive normal form (CNF), is there a truth assignment that satisfies B ?

CS 311 Mount Holyoke College 4 A graph theory NP problem CLIQUE : Given a graph G = (V, E) and an integer k, does G contain C k as a subgraph? –Is ∈ CLIQUE?

CS 311 Mount Holyoke College 5 A graph theory NP problem CLIQUE : Given a graph G = (V, E) and an integer k, does G contain C k as a subgraph? –Is ∈ CLIQUE?

CS 311 Mount Holyoke College 6 A graph theory NP problem CLIQUE : Given a graph G = (V, E) and an integer k, does G contain C k as a subgraph? –Is ∈ CLIQUE?

CS 311 Mount Holyoke College 7 A graph theory NP problem CLIQUE : Given a graph G = (V, E) and an integer k, does G contain C k as a subgraph? –Is ∈ CLIQUE?

CS 311 Mount Holyoke College 8 A graph theory NP problem CLIQUE : Given a graph G = (V, E) and an integer k, does G contain C k as a subgraph? –Is ∈ CLIQUE?

CS 311 Mount Holyoke College 9 CLIQUE ∈ NP Verifier: V = “On input,c> : 1.Test whether c is a set of k nodes of G 2.Test whether G contains all edges connecting nodes in c 3.If both pass, accept; otherwise, reject.” NTM: N = “On input : 1.Nondeterministically select a subset c of k nodes of G 2.Test whether G contains all edges connecting nodes in c 3.If yes, accept; otherwise, reject.”

CS 311 Mount Holyoke College 10 Which problem is harder? NP P P CNF CLIQUE

CS 311 Mount Holyoke College 11 Recall… Definition 5.17: A function f:Σ*→Σ* is a computable function if ∃ some Turing machine M, on every input w, halts with just f(w) on its tape.

CS 311 Mount Holyoke College 12 Polynomial time computable functions Definition 7.28: A function f:Σ*→Σ* is a polynomial time computable function if ∃ some polynomial time Turing machine M, on every input w, halts with just f(w) on its tape.

CS 311 Mount Holyoke College 13 Recall… Definition 5.20: Language A is mapping reducible to language B, written A ≤ m B, if there is a computable function f:Σ* → Σ*, where for every w, w ∈ A ⇔ f(w) ∈ B A A B B f f

CS 311 Mount Holyoke College 14 Polynomial time mapping reducibility Definition 7.29: Language A is polynomial time mapping reducible to language B, written A ≤ p B, if there is a polynomial time computable function f:Σ* → Σ*, where for every w, w ∈ A ⇔ f(w) ∈ B A A B B f f

CS 311 Mount Holyoke College 15 Intuitively, A is no harder than B Theorem 7.31: If A ≤ p B and B ∈ P, then A ∈ P. Proof: Algorithm for deciding A Reductio n algorithm F Algorithm for deciding B wf(w) “yes” “no”

CS 311 Mount Holyoke College 16 CNF ≤ p CLIQUE Given a boolean formula B in CNF, we show how to construct a graph G and an integer k such that G has a clique of size k ⇔ B is satisfiable. Given the construction would yield

CS 311 Mount Holyoke College 17 NP’s hardest problems Definition 7.34: A language B is NP-complete if 1.B ∈ NP 2.A≤ p B, for all A ∈ NP NP A1A1 B (NP-complete) A3A3 A2A2

CS 311 Mount Holyoke College 18 P=NP? Theorem 7.35: If B is NP-complete and B ∈ P, then P = NP. NP P P P=NP P=NP A1A1 B (NP-complete) A3A3 A2A2

CS 311 Mount Holyoke College 19 Cook-Levin Theorem SAT is NP-complete. (If A ∈ NP, then A≤ p SAT.) NP A1A1 SAT A3A3 A2A2

CS 311 Mount Holyoke College 20 But that’s not the only one! CLIQUE is NP-complete (why?) NP A1A1 SAT A3A3 A2A2 CLIQUE