CSC 4170 Theory of Computation The class NP Section 7.3.

Slides:



Advertisements
Similar presentations
The class NP Section 7.3 Giorgi Japaridze Theory of Computability.
Advertisements

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.
CSC5160 Topics in Algorithms Tutorial 2 Introduction to NP-Complete Problems Feb Jerry Le
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)
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 )
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 ).
NP-Complete Problems Reading Material: Chapter 10 Sections 1, 2, 3, and 4 only.
1 Polynomial Time Reductions Polynomial Computable function : For any computes in polynomial time.
Time Complexity.
CSE 421 Algorithms Richard Anderson Lecture 27 NP Completeness.
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT Lecture NP-Completeness Jan Maluszynski, IDA, 2007
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
חישוביות וסיבוכיות Computability and Complexity Lecture 7 TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A AAAA.
CSCI 2670 Introduction to Theory of Computing November 29, 2005.
CSCI 2670 Introduction to Theory of Computing December 1, 2004.
Complexity Non-determinism. NP complete problems. Does P=NP? Origami. Homework: continue on postings.
1 Design and Analysis of Algorithms Yoram Moses Lecture 11 June 3, 2010
NP-Completeness (Nondeterministic Polynomial Completeness) Sushanth Sivaram Vallath & Z. Joseph.
NP-completeness Section 7.4 Giorgi Japaridze Theory of Computability.
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 7 Time complexity Contents Measuring Complexity Big-O and small-o notation.
NPC.
Alternation Section 10.3 Giorgi Japaridze Theory of Computability.
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.
Computability Examples. Reducibility. NP completeness. Homework: Find other examples of NP complete problems.
 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
TU/e Algorithms (2IL15) – Lecture 10 1 NP-Completeness, II.
ICS 353: Design and Analysis of Algorithms NP-Complete Problems King Fahd University of Petroleum & Minerals Information & Computer Science Department.
The Theory of NP-Completeness
NP-Completeness A problem is NP-complete if: It is in NP
The NP class. NP-completeness
NP-Completeness (2) NP-Completeness Graphs 4/13/2018 5:22 AM x x x x x
Chapter 10 NP-Complete Problems.
Richard Anderson Lectures NP-Completeness
Richard Anderson Lecture 26 NP-Completeness
SUBSET-SUM Instance: A set of numbers denoted S and a target number t.
NP-Completeness (2) NP-Completeness Graphs 7/23/ :02 PM x x x x
NP-Completeness (2) NP-Completeness Graphs 7/23/ :02 PM x x x x
NP-Completeness Proofs
Richard Anderson Lecture 26 NP-Completeness
NP-Completeness Yin Tat Lee
Intro to Theory of Computation
CS154, Lecture 16: More NP-Complete Problems; PCPs
ICS 353: Design and Analysis of Algorithms
NP-Completeness (2) NP-Completeness Graphs 11/23/2018 2:12 PM x x x x
Intro to Theory of Computation
Richard Anderson Lecture 25 NP-Completeness
Theory of Computability
Richard Anderson Lecture 28 NP-Completeness
Theory of Computability
Additional NP-complete problems
NP-Complete Problems.
CS154, Lecture 13: P vs NP.
Theory of Computability
Time Complexity Classes
CSC 4170 Theory of Computation The class NP Section 7.3.
NP-Completeness Yin Tat Lee
CS154, Lecture 16: More NP-Complete Problems; PCPs
CSE 589 Applied Algorithms Spring 1999
Instructor: Aaron Roth
Instructor: Aaron Roth
Instructor: Aaron Roth
Theory of Computability
NP-Completeness (2) NP-Completeness Graphs 7/9/2019 6:12 AM x x x x x
Presentation transcript:

CSC 4170 Theory of Computation The class NP Section 7.3

and target node are fixed. The HAMPATH problem 7.3.a A Hamiltonian path in a directed graph G is a directed path that goes through each node exactly once. We consider a special case of this problem where the start node and target node are fixed. HAMPATH = {<G,s,t> | G is a directed graph with a Hamiltonian path from s to t} 1 5 3  PATH? s t  HAMPATH? 4 2 6 1 5 3  HAMPATH? s t 4 2 6

Polynomial verifiability Does this graph have a Hamiltonian path? s t

The COMPOSITES problem COMPOSITES = {x | x=pq for some integers p,q>1} 15  COMPOSITES ? 17  COMPOSITES ? 77  COMPOSITES ? 10403  COMPOSITES ? 997,111,111,911,111,119,131,119,871  COMPOSITES ? COMPOSITES is very easily seen to be verifiable in polynomial time. But only a few years ago it was proven that it is also decidable in polynomial time. The same question, however, remains open for HAMPATH --- one of the seven $1,000,000 questions!

NP and NP-completeness Definition NP is the class of languages decided by some nondeterministic polynomial time Turing machine. The class of so called NP-complete languages is a subset of NP consisting of the “hardest” languages from NP. It is known that if any of the NP-complete problems has a polynomial time deterministic algorithm, then so do all problems from NP and thus P=NP. In fact, a polynomial time deterministic algorithm for any NP-complete problem can be easily/automatically “translated” into a polynomial time deterministic algorithm for any other problem from NP. HAMPATH is NP-complete. So are CLIQUE, SUBSET-SUM, SAT and many other natural languages (but not COMPOSITES).

A k-clique in an undirected graph is a subgraph The CLIQUE problem 7.3.e A k-clique in an undirected graph is a subgraph with k nodes, wherein every two nodes are connected by an edge. On the right we see a 5-clique CLIQUE = {<G,k> | G is an undirected graph with a k-clique} Theorem 7.24 CLIQUENP. Proof. Here is a polynomial time NTM N deciding CLIQUE: N = “On input <G,k>: 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.”

The SUBSET-SUM problem 7.3.f SUBSET-SUM = {<S,t> | S is a multiset of integers and, for some RS, the sum of all elements of R equals t} Theorem 7.25 SUBSET-SUMNP. Proof. Here is a polynomial time NTM N deciding SUBSET-SUM: N = “On input <S,t>: 1. Nondeterministically select a subset c of S. 2. Test whether the elements of c sum up to t. 3. If yes, accept; otherwise reject.”

(1  (0  1))  (0  1) (1  (1  0))  (0  0) Boolean formulas 7.3.g Boolean variables x,y,… take one of the two values 0 (false) or 1 (true). Boolean operations:  (NOT),  (AND),  (OR). We write A for A. Boolean formulas are constructed from variables and operations in the standard way. Once a truth assignment for variables is given, the value of a compound formula is calculated as follows: 0 = 1 0  0 = 0 0  0 = 0 1 = 0 0  1 = 0 0  1 = 1 1  0 = 0 1  0 = 1 1  1 = 1 1  1 = 1 If x=0 and y=1, what is the value of the following formula? (y  (x  y))  (x  y) (1  (0  1))  (0  1) (1  (1  0))  (0  0) (1  1 )  0 1  0 1

of 0s and 1s to its variables that makes the formula evaluate to 1. The SAT problem 7.3.h We say that a Boolean formula is satisfiable iff there is an assignment of 0s and 1s to its variables that makes the formula evaluate to 1. Are the following formulas satisfiable? x(xy) x(xy) Yes. An (in fact, the) satisfying assignment: x=0, y=1 No SAT = {<> |  is a satisfiable Boolean formula} SAT  P? SAT  NP? Nobody knows! Yes. A satisying assignment can serve as a membership certificate

P vs. NP vs. coNP vs. EXPTIME Definitions coNP = {L | L is the complement of some language in NP} EXPTIME = TIME(2n1)  TIME(2n2)  TIME(2n3)  … This is what we know: P NP coNP EXPTIME NP  coNP ≠ EXPTIME P: membership can be decided quickly NP: membership can be verified quickly coNP: membership can be refuted quickly EXPTIME: none of the above This is what we do not know: P = NP? NP = coNP? P = NP  coNP?