Fall 2006Costas Busch - RPI1 More NP-complete Problems.

Slides:



Advertisements
Similar presentations
CSci 4011 INHERENT LIMITATIONS OF COMPUTER PROGRAMS.
Advertisements

Theory of Computing Lecture 18 MAS 714 Hartmut Klauck.
Lecture 23. Subset Sum is NPC
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.
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
CSC5160 Topics in Algorithms Tutorial 2 Introduction to NP-Complete Problems Feb Jerry Le
Complexity 11-1 Complexity Andrei Bulatov NP-Completeness.
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 )
CS21 Decidability and Tractability
February 23, 2015CS21 Lecture 201 CS21 Decidability and Tractability Lecture 20 February 23, 2015.
Computability and Complexity 15-1 Computability and Complexity Andrei Bulatov NP-Completeness.
Graphs 4/16/2017 8:41 PM NP-Completeness.
Transitivity of  poly Theorem: Let ,  ’, and  ’’ be three decision problems such that   poly  ’ and  ’  poly  ’’. Then  poly  ’’. Proof:
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.
Computability and Complexity 24-1 Computability and Complexity Andrei Bulatov Approximation.
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.
Complexity ©D.Moshkovitz 1 Paths On the Reasonability of Finding Paths in Graphs.
Clique Cover Cook’s Theorem 3SAT and Independent Set
Fall 2003Costas Busch - RPI1 Linear Grammars Grammars with at most one variable at the right side of a production Examples:
Lecture 22 More NPC problems
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
NP-complete Problems SAT 3SAT Independent Set Hamiltonian Cycle
Prabhas Chongstitvatana1 NP-complete proofs The circuit satisfiability proof of NP- completeness relies on a direct proof that L  p CIRCUIT-SAT for every.
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.
Week 10Complexity of Algorithms1 Hard Computational Problems Some computational problems are hard Despite a numerous attempts we do not know any efficient.
CSC401 – Analysis of Algorithms Chapter 13 NP-Completeness Objectives: Introduce the definitions of P and NP problems Introduce the definitions of NP-hard.
Additional NP-complete problems
1 How to prove that a problem is NPC. 2 Cook Cook showed the first NPC problem: SAT Cook received Turing Award in 1982.
NP-Complete Problems. Running Time v.s. Input Size Concern with problems whose complexity may be described by exponential functions. Tractable problems.
CSCI 3130: Formal languages and automata theory Andrej Bogdanov The Chinese University of Hong Kong The Cook-Levin.
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.
28.
1 CPSC 320: Intermediate Algorithm Design and Analysis July 30, 2014.
CSE 6311 – Spring 2009 ADVANCED COMPUTATIONAL MODELS AND ALGORITHMS Lecture Notes – Feb. 3, 2009 Instructor: Dr. Gautam Das notes by Walter Wilson.
CSC 413/513: Intro to Algorithms
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.
NP-complete Languages
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.
Costas Busch - LSU1 Linear Grammars Grammars with at most one variable at the right side of a production Examples:
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.
34.NP Completeness. Computer Theory Lab. Chapter 34P.2.
 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.
NP-Completeness A problem is NP-complete if: It is in NP
NP-Completeness (2) NP-Completeness Graphs 4/13/2018 5:22 AM x x x x x
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
CS21 Decidability and Tractability
Instructor: Aaron Roth
NP-Completeness (2) NP-Completeness Graphs 7/9/2019 6:12 AM x x x x x
Presentation transcript:

Fall 2006Costas Busch - RPI1 More NP-complete Problems

Fall 2006Costas Busch - RPI2 Theorem: If: Language is NP-complete Language is in NP is polynomial time reducible to Then: is NP-complete (proven in previous class)

Fall 2006Costas Busch - RPI3 Using the previous theorem, we will prove that 2 problems are NP-complete: Vertex-Cover Hamiltonian-Path

Fall 2006Costas Busch - RPI4 Vertex cover of a graph is a subset of nodes such that every edge in the graph touches one node in Vertex Cover S = red nodes Example:

Fall 2006Costas Busch - RPI5 |S|=4Example: Size of vertex-cover is the number of nodes in the cover

Fall 2006Costas Busch - RPI6 graph contains a vertex cover of size } VERTEX-COVER = { : Corresponding language: Example:

Fall 2006Costas Busch - RPI7 Theorem: 1. VERTEX-COVER is in NP 2. We will reduce in polynomial time 3CNF-SAT to VERTEX-COVER Can be easily proven VERTEX-COVER is NP-complete Proof: (NP-complete)

Fall 2006Costas Busch - RPI8 Let be a 3CNF formula with variables and clauses Example: Clause 1 Clause 2Clause 3

Fall 2006Costas Busch - RPI9 Formula can be converted to a graph such that: is satisfied if and only if Contains a vertex cover of size

Fall 2006Costas Busch - RPI10 Clause 1 Clause 2Clause 3 Clause 1 Clause 2Clause 3 Variable Gadgets Clause Gadgets nodes

Fall 2006Costas Busch - RPI11 Clause 1 Clause 2Clause 3 Clause 1 Clause 2Clause 3

Fall 2006Costas Busch - RPI12 If is satisfied, then contains a vertex cover of size First direction in proof:

Fall 2006Costas Busch - RPI13 Satisfying assignment Example: We will show that contains a vertex cover of size

Fall 2006Costas Busch - RPI14 Put every satisfying literal in the cover

Fall 2006Costas Busch - RPI15 Select one satisfying literal in each clause gadget and include the remaining literals in the cover

Fall 2006Costas Busch - RPI16 This is a vertex cover since every edge is adjacent to a chosen node

Fall 2006Costas Busch - RPI17 Explanation for general case: Edges in variable gadgets are incident to at least one node in cover

Fall 2006Costas Busch - RPI18 Edges in clause gadgets are incident to at least one node in cover, since two nodes are chosen in a clause gadget

Fall 2006Costas Busch - RPI19 Every edge connecting variable gadgets and clause gadgets is one of three types: Type 1 Type 2 Type 3 All adjacent to nodes in cover

Fall 2006Costas Busch - RPI20 If graph contains a vertex-cover of size then formula is satisfiable Second direction of proof:

Fall 2006Costas Busch - RPI21 Example:

Fall 2006Costas Busch - RPI22 exactly one literal in each variable gadget is chosen exactly two nodes in each clause gadget is chosen To include “internal’’ edges to gadgets, and satisfy chosen out of

Fall 2006Costas Busch - RPI23 For the variable assignment choose the literals in the cover from variable gadgets

Fall 2006Costas Busch - RPI24 since the respective literals satisfy the clauses is satisfied with

Fall 2006Costas Busch - RPI25 Theorem: 1. HAMILTONIAN-PATH is in NP 2. We will reduce in polynomial time 3CNF-SAT to HAMILTONIAN-PATH Can be easily proven HAMILTONIAN-PATH is NP-complete Proof: (NP-complete)

Fall 2006Costas Busch - RPI26 Gadget for variable the directions change

Fall 2006Costas Busch - RPI27 Gadget for variable

Fall 2006Costas Busch - RPI28

Fall 2006Costas Busch - RPI29

Fall 2006Costas Busch - RPI30