Clique Cover Cook’s Theorem 3SAT and Independent Set

Slides:



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

Polynomial-time reductions We have seen several reductions:
Vertex Cover Dominating Set These slides are based on the Lecture Notes by David Mount for the course CMSC 451 at the University of Maryland. The Copyright.
NP-Completeness: Reductions
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.
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
The Theory of NP-Completeness
1 NP-Complete Problems. 2 We discuss some hard problems:  how hard? (computational complexity)  what makes them hard?  any solutions? Definitions 
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 15-1 Computability and Complexity Andrei Bulatov NP-Completeness.
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.
NP-Complete Problems Problems in Computer Science are classified into
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 23 Instructor: Paul Beame.
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.
P, NP, and NP-Complete Suzan Köknar-Tezel.
1 The Theory of NP-Completeness 2 NP P NPC NP: Non-deterministic Polynomial P: Polynomial NPC: Non-deterministic Polynomial Complete P=NP? X = P.
1 The Theory of NP-Completeness 2012/11/6 P: the class of problems which can be solved by a deterministic polynomial algorithm. NP : the class of decision.
Nattee Niparnan. Easy & Hard Problem What is “difficulty” of problem? Difficult for computer scientist to derive algorithm for the problem? Difficult.
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
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.
CSE 024: Design & Analysis of Algorithms Chapter 9: NP Completeness Sedgewick Chp:40 David Luebke’s Course Notes / University of Virginia, Computer Science.
EMIS 8373: Integer Programming NP-Complete Problems updated 21 April 2009.
NP-Complete Problems. Running Time v.s. Input Size Concern with problems whose complexity may be described by exponential functions. Tractable problems.
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.
CSE 589 Part V One of the symptoms of an approaching nervous breakdown is the belief that one’s work is terribly important. Bertrand Russell.
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.
CS6045: Advanced Algorithms NP Completeness. NP-Completeness Some problems are intractable: as they grow large, we are unable to solve them in reasonable.
28.
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.
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.
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.
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.
1 The Theory of NP-Completeness 2 Review: Finding lower bound by problem transformation Problem X reduces to problem Y (X  Y ) iff X can be solved by.
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.
CSE 332: NP Completeness, Part II Richard Anderson Spring 2016.
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 (2) NP-Completeness Graphs 4/13/2018 5:22 AM x x x x x
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
Richard Anderson Lecture 26 NP-Completeness
Summary of the previous lecture
NP-Completeness Yin Tat Lee
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
NP-Complete Problems.
NP-Completeness Yin Tat Lee
CSE 6408 Advanced Algorithms.
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:

Clique Cover Cook’s Theorem 3SAT and Independent Set These slides are based on the Lecture Notes by David Mount for the course CMSC 451 at the University of Maryland. The Copyright notice is as follows: Copyright, David M. Mount, 2008 Dept. of Computer Science, University of Maryland, College Park, MD, 20742. These lecture notes were prepared by David Mount for the course CMSC 451, Design and Analysis of Computer Algorithms, at the University of Maryland. Permission to use, copy, modify, and distribute these notes for educational purposes and without fee is hereby granted, provided that this copyright notice appear in all copies.

3-Colorability Well known to be NP-complete Given a graph G, can each of its vertices be labeled with one of 3 different colors, such that no two adjacent vertices have the same label. Arises in partitioning problems, Where two objects cannot be assigned to the same set of partitions.

3-Colorability Planar graphs can be colored with 4 colors Polynomial algorithm Determining whether 3 colors are possible is “hard” No known polynomial algorithm for 3 colors.

3-Colorable

Clique Given a graph G= (V,E) we say that a subset of vertices V' forms a clique if for every pair of vertices u, v in V', the edge (u,v) is in E. A subgraph induced by V' is a complete graph.

Clique Cover (CCov) problem Given a graph G = (V, E) and an integer k, can we partition the vertex set into k subsets of vertices V1, V2, V3,..., Vk such that each Vi is a clique of G and Arises in applications of clustering Put an edge between two nodes if they are similar enough to be clustered in the same group. Is it possible to cluster all the vertices in k groups?

Clique Cover (size = 3)‏

How to prove CCov NP-complete? Assume that you have access to a subroutine CCov(G,k) returns true if G has a CCov of size k. Try to write a polynomial-time subroutine for 3Col(G) which is allowed to call CCov(G,k) Reduce G to (G’, k) in polynomial time Call the subroutine for CCov(G’,k) 3Col(G) if and only if CCov(G’,k)

3Col and CCov: what is similar? Both 3Col and CCov involve partitioning vertices into groups CCov: into k groups 3Col: into 3 color groups For two vertices u and v to be in the same group In CCov: u and v has to be adjacent In 3Col: u and v should NOT be adjacent

Reduction: 3Col to CCov Given graph G for which we want to determine 3-colorability (G is an instance of 3Col)‏ Produce G' which is a complement of G G' is a graph on the same vertex set, but (u,v) is an edge of G' if and only if it is not an edge of G Call Ccov(G', 3)‏ (G',3) is an instance of CCov

3-Colorable G’: Coverable by 3-cliques G: 3-colorable

Recall: To prove a problem Q to be NP- complete, we pick a known NP-complete problem P, and show P is polynomial-time reducible to Q. We need at least one known NP-complete problem to start the ball rolling!

Boolean Satisfiability Theorem SAT (Boolean Satisfiability Theorem): Given a boolean formula, is there some way to assign truth values (0/1, false/true) to variables of the formula, such that the formula evaluates to true (1). A boolean formula is a logical formula which consists of variables xi and the logical operators, negation ( x ), boolean-or (x V y) and boolean-and (x Λ y) E.g. is satisfiable (evaluates to true) if x1=1, x2=0 and x3=0

Cook’s Theorem Cook’s Theorem: SAT is NP-complete Complicated proof Requires background infor on Turing machines We will not cover

3SAT 3SAT: A restricted version of SAT which is the problem of determining whether a formula in 3-CNF is satisfiable 3-CNF (3-conjunctive normal form): boolean-and of clauses where each clause is the boolean-or of exactly 3 literals A literal is a variable or its negation E.g.

3SAT Proof of Cook’s theorem can be modified to prove that 3SAT is also NP-complete.

Independent Set (IS) Now that we know 3SAT is NP-complete, we can use it to prove other problems are NP- complete Independent Set (IS): Given an undirected graph G=(V,E) and an integer k, does G contain a subset V’ of k vertices such that no two vertices in V’ are adjacent to one another.

IS IS (shown in blue) of size 4.

Is IS NP-complete? Is IS in NP? Certificate consists of k vertices in V’ Verify for each pair of vertices, u,v that there is no edge between them Verifiable in polynomial time

Is IS NP-complete? Is IS NP-hard? Show that some known NP-complete problem (3SAT) is reducible to IS in polynomial time. 3SAT yes F (G,k) Reduction IS no F: boolean formula in 3-CNF

3SAT IS What is to be selected? Requirements: Restrictions: 3SAT: which variables are assigned true IS: which vertices are to be placed in V’ Requirements: 3SAT: Each clause must contain at least one literal whose value is true V’ must contain at least k vertices Restrictions: 3SAT: If x is assigned true then x must be false and vice versa. IS: If u is selected to be in V’, then vertices adjacent to u cannot be in V’

3SAT IS Given F (3-CNF), create G and set k Create one vertex in G for each literal that appears in F The vertices are grouped into clause clusters. Assigning true to a literal from some clause corresponds to selecting a vertex to place in V’ Set k to be the number of clauses Forces IS to pick one vertex from each clause—thus one literal from each clause is true connect all vertices in the same clause cluster to each other to avoid IS selecting two literals from the same clause Put an edge between each literal and its negation To avoid IS placing both in V’ (to avoid assigning true to both)

Create one vertex in G for each literal that appears in F

connect all vertices in the same clause cluster to each other

Put an edge between each literal and its negation

Put an edge between each literal and its negation

Put an edge between each literal and its negation k = 4