Complete Graphs A complete graph is one where there is an edge between every two nodes A C B G.

Slides:



Advertisements
Similar presentations
Polynomial-time reductions We have seen several reductions:
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.
NP-Completeness More Reductions. Definitions P: is the class of all decision problems which can be solved in polynomial time, O(n^k) for some constant.
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 23-1 Computability and Complexity Andrei Bulatov Search and Optimization.
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.
Approximation Algorithms Lecture for CS 302. What is a NP problem? Given an instance of the problem, V, and a ‘certificate’, C, we can verify V is in.
NP-Complete Problems Reading Material: Chapter 10 Sections 1, 2, 3, and 4 only.
NP-Complete Problems Problems in Computer Science are classified into
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 23 Instructor: Paul Beame.
Fall 2006Costas Busch - RPI1 More NP-complete Problems.
Last class Decision/Optimization 3-SAT  Independent-Set Independent-Set  3-SAT P, NP Cook’s Theorem NP-hard, NP-complete 3-SAT  Clique, Subset-Sum,
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.
CSE 421 Algorithms Richard Anderson Lecture 27 NP Completeness.
Black-box (oracle) Feed me a weighted graph G and I will tell you the weight of the max-weight matching of G.
Clique Cover Cook’s Theorem 3SAT and Independent Set
Constraint Satisfaction Definition. A constraint is a formula of the form: (x = y) (x  y) (x = red) (x  red) Where x and y are variables that can take.
Lecture 22 More NPC problems
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
NP-complete Problems SAT 3SAT Independent Set Hamiltonian Cycle
Polynomial-time reductions We have seen several reductions:
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.
CSC401 – Analysis of Algorithms Chapter 13 NP-Completeness Objectives: Introduce the definitions of P and NP problems Introduce the definitions of NP-hard.
1 Chapter 8 NP and Computational Intractability Slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved.
CS774. Markov Random Field : Theory and Application Lecture 02
1 How to prove that a problem is NPC. 2 Cook Cook showed the first NPC problem: SAT Cook received Turing Award in 1982.
Unit 9: Coping with NP-Completeness
NP-Complete Problems. Running Time v.s. Input Size Concern with problems whose complexity may be described by exponential functions. Tractable problems.
Instructor Neelima Gupta Table of Contents Class NP Class NPC Approximation Algorithms.
CS 3343: Analysis of Algorithms Lecture 25: P and NP Some slides courtesy of Carola Wenk.
NP-Algorithms Tractable vs Intractable Some problems are intractable: as they grow large, we are unable to solve them in reasonable time.
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.
28.
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
CSCI 2670 Introduction to Theory of Computing December 7, 2005.
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness Proofs.
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.
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.
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.
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
Richard Anderson Lectures NP-Completeness
Richard Anderson Lecture 26 NP-Completeness
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 (36.4-5) P: yes and no in pt NP: yes in pt NPH  NPC
CS21 Decidability and Tractability
ICS 353: Design and Analysis of Algorithms
NP-Completeness (2) NP-Completeness Graphs 11/23/2018 2:12 PM x x x x
Richard Anderson Lecture 25 NP-Completeness
Richard Anderson Lecture 28 NP-Completeness
NP-Complete Problems.
Richard Anderson Lecture 26 NP-Completeness
CS21 Decidability and Tractability
Umans Complexity Theory Lectures
NP-Completeness (2) NP-Completeness Graphs 7/9/2019 6:12 AM x x x x x
Presentation transcript:

Complete Graphs A complete graph is one where there is an edge between every two nodes A C B G

Clique Clique: A complete subgraph of a graph A C B D F G E H Problem (Clique): Find the clique with the largest number of nodes in a graph

CNF Can Be Reduced into Clique First we need to formulate Clique as a decision problem: Decision Problem (Clique): Given a graph and a value K, is there a clique of size K (i.e., with K nodes) in the graph? We will transform CNF formulas into clique problems such that the formulas can be satisfied if and only if the decision problem for the Clique is true We are going to show: CNF Clique

CNF Can Be Reduced Into Clique (II)  = (a)  (¬a  ¬b  c  d)  (¬c  ¬d)  (¬d) a ¬a ¬b c d ¬c¬c ¬d¬d ¬d¬d Connect two nodes from different disjunctions if they are not in conflict (i.e., a and ¬a are in conflict)  Can be made true if and only if there is a Clique of size 4

CNF Can Be Reduced Into Clique (II) Generally for a given CNF:  1   2  …  n it can be made true if and only if there is a Clique of size n for the corresponding graph

Vertex-Cover A C B D F G E H Given a graph G, a vertex cover V is a collection of nodes in G such that for every arc (w,v) either w is in G or v is in G or both Vertex-Cover Problem: Given a graph, find the vertex- cover containing the minimum number of nodes

Vertex-Cover is NP-Hard Hint: 1. Use the complement of a graph. 2. Make simple examples (e.g., graphs with 4-5 nodes) Given a graph G, the complement G C is a graph containing the same nodes as G, and the arcs: {(u,v) : (u,v) is not in G} G: G C : You are going to show: Clique Vertex-Cover

Independent Set Given a graph G, an independent set V is a collection of nodes in G such that no two nodes in V have an arc connecting them A C B D F G E H U

Independent Set Independent-Set Problem: Given a graph, find the Independent-set containing the maximum number of nodes You are going to show: Vertex-Cover Independent-Set Hint: look at the hint for the transformation of Clique into Vertex-Cover

Constraint-SAT Definition. A constraint is an expression of the form: (x = y) (x  y) Where x and y are variables that can take values from a set (e.g., {1, 2, 3, 4, …}) Definition. Constraint-SAT: given a sequence of constraints connected by  :  1   2  …  n find assignments of the variables that makes the conjunction true For example: ( x = y)  ( x  z)  (y  z)