Computability and Complexity 15-1 Computability and Complexity Andrei Bulatov NP-Completeness.

Slides:



Advertisements
Similar presentations
Theory of Computing Lecture 18 MAS 714 Hartmut Klauck.
Advertisements

NP-Completeness: Reductions
An NP-completeness Example. The graph CLIQUE problem Undirected Graph G = (V, E) –a clique is a complete subgraph of G Subset V’ of vertices that are.
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.
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
CSC5160 Topics in Algorithms Tutorial 2 Introduction to NP-Complete Problems Feb Jerry Le
Complexity 11-1 Complexity Andrei Bulatov NP-Completeness.
Computability and Complexity 14-1 Computability and Complexity Andrei Bulatov Cook’s Theorem.
CS21 Decidability and Tractability
February 23, 2015CS21 Lecture 201 CS21 Decidability and Tractability Lecture 20 February 23, 2015.
Graphs 4/16/2017 8:41 PM NP-Completeness.
NP-Complete Problems Reading Material: Chapter 10 Sections 1, 2, 3, and 4 only.
Computability and Complexity 16-1 Computability and Complexity Andrei Bulatov NP-Completeness.
1 Polynomial Time Reductions Polynomial Computable function : For any computes in polynomial time.
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 23 Instructor: Paul Beame.
Fall 2006Costas Busch - RPI1 More NP-complete Problems.
NP-Completeness (2) NP-Completeness Graphs 4/17/2017 6:25 AM x x x x x
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 24 Instructor: Paul Beame.
Black-box (oracle) Feed me a weighted graph G and I will tell you the weight of the max-weight matching of G.
Complexity ©D.Moshkovitz 1 Paths On the Reasonability of Finding Paths in Graphs.
Clique Cover Cook’s Theorem 3SAT and Independent Set
Lecture 22 More NPC problems
Theory of Computation, Feodor F. Dragan, Kent State University 1 NP-Completeness P: is the set of decision problems (or languages) that are solvable in.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
NP-complete Problems SAT 3SAT Independent Set Hamiltonian Cycle
1 3-COLOURING: Input: Graph G Question: Does there exist a way to 3-colour the vertices of G so that adjacent vertices are different colours? 1.What could.
CSE 024: Design & Analysis of Algorithms Chapter 9: NP Completeness Sedgewick Chp:40 David Luebke’s Course Notes / University of Virginia, Computer Science.
Complexity 25-1 Complexity Andrei Bulatov Counting Problems.
EMIS 8373: Integer Programming NP-Complete Problems updated 21 April 2009.
Additional NP-complete problems
NP-Complete Problems. Running Time v.s. Input Size Concern with problems whose complexity may be described by exponential functions. Tractable problems.
NP-Algorithms Tractable vs Intractable Some problems are intractable: as they grow large, we are unable to solve them in reasonable time.
1 Suppose I construct a TM M f which: 1. Preserves its input u. 2. Simulates a machine M b on input ε. 3. If M b hangs on input ε, force an infinite loop.
CS 461 – Nov. 30 Section 7.5 How to show a problem is NP-complete –Show it’s in NP. –Show that it corresponds to another problem already known to be NP-complete.
1 CSE 326: Data Structures: Graphs Lecture 24: Friday, March 7 th, 2003.
1 CPSC 320: Intermediate Algorithm Design and Analysis July 30, 2014.
Chapter 11 Introduction to Computational Complexity Copyright © 2011 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1.
CSC 413/513: Intro to Algorithms
CSCI 2670 Introduction to Theory of Computing December 2, 2004.
CSCI 2670 Introduction to Theory of Computing December 7, 2005.
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness Proofs.
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong NP-complete.
Given this 3-SAT problem: (x1 or x2 or x3) AND (¬x1 or ¬x2 or ¬x2) AND (¬x3 or ¬x1 or x2) 1. Draw the graph that you would use if you want to solve this.
Prof. Busch - LSU1 Busch Complexity Lectures: More NP-complete Problems.
COSC 3101A - Design and Analysis of Algorithms 14 NP-Completeness.
COMPLEXITY. Satisfiability(SAT) problem Conjunctive normal form(CNF): Let S be a Boolean expression in CNF. That is, S is the product(and) of several.
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
CSE 332: NP Completeness, Part II Richard Anderson Spring 2016.
TU/e Algorithms (2IL15) – Lecture 10 1 NP-Completeness, II.
Costas Busch - LSU 1 More NP-complete Problems. Costas Busch - LSU 2 Theorem: If: Language is NP-complete Language is in NP is polynomial time reducible.
Cook Theorem and NP-complete problems
NP-Completeness (2) NP-Completeness Graphs 4/13/2018 5:22 AM x x x x x
Richard Anderson Lecture 26 NP-Completeness
More NP-complete Problems
More NP-complete Problems
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
NP-Completeness (36.4-5) P: yes and no in pt NP: yes in pt NPH  NPC
CS21 Decidability and Tractability
NP-Completeness (2) NP-Completeness Graphs 11/23/2018 2:12 PM x x x x
More NP-complete Problems
NP-Complete Problems.
CS21 Decidability and Tractability
CS21 Decidability and Tractability
NP-Completeness (2) NP-Completeness Graphs 7/9/2019 6:12 AM x x x x x
CHAPTER 7 Time complexity
Lecture 23 NP-Hard Problems
Presentation transcript:

Computability and Complexity 15-1 Computability and Complexity Andrei Bulatov NP-Completeness

Computability and Complexity 15-2 NP-Completeness Proofs To prove that a language L is NP-complete we now just have to perform two steps: 1.Show that L belongs to NP 2.Find a known NP-complete problem (language) L and show L  L 100s of problems have now been shown to be NP-complete (for an earlier survey see Garey and Johnson) Note: If we can complete Step 2 but not Step 1, then we say that L is NP-hard

Computability and Complexity 15-3 NP-Completeness of Clique Instance: A graph G and a number k. Question: Does G contain a clique of size k ? Clique Theorem Clique is NP-complete Theorem Clique is NP-complete Step 1: The problem Clique is in NP : the list of vertices in the clique is the certificate

Computability and Complexity 15-4 Step 2: To show that Clique is NP-complete we shall reduce Satisfiability to Clique Given a formula  with clauses For each literal X in clause create a graph vertex Put an edge between every pair of vertices from distinct clauses, unless they are incompatible (i.e. X and  X ) This construction can be carried out in polynomial time The resulting graph has a clique of size k if and only if  is satisfiable (assign the value true to every variable occurring in the clique)

Computability and Complexity 15-5 Example Construction X Y Z U V YY  Z  X  U k  3

Computability and Complexity 15-6 NP-Completeness of Vertex Cover Instance: A graph G = (N,E), and a natural number k. Question: Is there a set M  N, with  M  k, such that for each edge (i,j)  E, {i,j}  M   ? Vertex Cover¹ ¹Sometimes called Node Cover Step 1: The problem Vertex Cover is in NP : the list of vertices in M is the certificate

Computability and Complexity 15-7 Given a formula  with clauses and n variables Step 2: To show that Vertex Cover is NP-complete we shall reduce Satisfiability to Vertex Cover This construction can be carried out in polynomial time For each variable X create two adjacent vertices and to represent the literals X and  X For each clause of size create a complete subgraph with vertices connected to corresponding literals Set

Computability and Complexity 15-8 Example Construction X Y Z U V

Computability and Complexity 15-9 At least one of each pair must be in the cover At least vertices from each complete graph must be in the cover If the formula is satisfiable, then choose the cover by choosing each literal assigned true plus all but one vertex in each (Omit a vertex which is connected to a satisfied literal.) Conversely, if a vertex cover exists, assign each Boolean variable according to whether ( true ) or ( false ) is in M. (By the choice of k, there must be one vertex in each clique which is not in M. This vertex must be adjacent to a vertex in M, hence the clause is satisfied.)

Computability and Complexity Alternative Reductions We have shown that Clique and Vertex Cover are both NP-complete This means it must be possible to reduce Clique to Vertex Cover and vice versa!

Computability and Complexity NP-Completeness of 3- SAT To show that 3- Satisfiability is NP-complete we reduce Satisfiability to 3- Satisfiability C is satisfiable if and only if C is, since at least one of the literals other than y s must be true Replace every clause with k > 3 by