Computability Theory

Similar documents
W4231: Analysis of Algorithms

NP-Complete Reductions 2

NP-Completeness. Algorithms

CMPSCI611: The SUBSET-SUM Problem Lecture 18

NP Completeness. Andreas Klappenecker [partially based on slides by Jennifer Welch]

Example of a Demonstration that a Problem is NP-Complete by reduction from CNF-SAT

NP-complete Reductions

SAT-CNF Is N P-complete

8 NP-complete problem Hard problems: demo

9.1 Cook-Levin Theorem

P and NP (Millenium problem)

CS154, Lecture 18: PCPs, Hardness of Approximation, Approximation-Preserving Reductions, Interactive Proofs, Zero-Knowledge, Cold Fusion, Peace in

CSCE750 Analysis of Algorithms Fall 2017 NP-Complete Problems

Reductions. Linear Time Reductions. Desiderata. Reduction. Desiderata. Classify problems according to their computational requirements.

1 Introduction. 1. Prove the problem lies in the class NP. 2. Find an NP-complete problem that reduces to it.

Where Can We Draw The Line?

NP and computational intractability. Kleinberg and Tardos, chapter 8

PCP and Hardness of Approximation

HW1. Due: September 13, 2018

(p 300) Theorem 7.27 SAT is in P iff P=NP

Complexity Classes and Polynomial-time Reductions

Best known solution time is Ω(V!) Check every permutation of vertices to see if there is a graph edge between adjacent vertices

NP-Hardness. We start by defining types of problem, and then move on to defining the polynomial-time reductions.

arxiv: v2 [cs.cc] 29 Mar 2010

8.1 Polynomial-Time Reductions

Reductions and Satisfiability

1. Suppose you are given a magic black box that somehow answers the following decision problem in polynomial time:

Chapter 8. NP-complete problems

The Vertex Cover Problem. Shangqi Wu Presentation of CS 525 March 11 th, 2016

Prove, where is known to be NP-complete. The following problems are NP-Complete:

CSC 505, Fall 2000: Week 12

Some Hardness Proofs

8.1 Polynomial-Time Reductions

NP-Completeness of 3SAT, 1-IN-3SAT and MAX 2SAT

In this lecture we discuss the complexity of approximation problems, and show how to prove they are NP-hard.

More NP-Complete Problems [HMU06,Chp.10b] Node Cover Independent Set Knapsack Real Games

The NP-Completeness of Some Edge-Partition Problems

Notes for Lecture 24

Math 776 Graph Theory Lecture Note 1 Basic concepts

Homework 4 Solutions

Decision Problems. Observation: Many polynomial algorithms. Questions: Can we solve all problems in polynomial time? Answer: No, absolutely not.

Exercises Computational Complexity

Lecture 7: Counting classes

P and NP CISC4080, Computer Algorithms CIS, Fordham Univ. Instructor: X. Zhang

Chapter 8. NP and Computational Intractability. Slides by Kevin Wayne. Copyright 2005 Pearson-Addison Wesley. All rights reserved.

COMP260 Spring 2014 Notes: February 4th

Chapter 8. NP-complete problems. Search problems. cient algorithms. Exponential search space

Chapter 10 Part 1: Reduction

P and NP CISC5835, Algorithms for Big Data CIS, Fordham Univ. Instructor: X. Zhang

Unit 8: Coping with NP-Completeness. Complexity classes Reducibility and NP-completeness proofs Coping with NP-complete problems. Y.-W.

More NP-complete Problems. CS255 Chris Pollett May 3, 2006.

Fixed Parameter Algorithms

Chapter 8. NP-complete problems

On Modularity Clustering. Group III (Ying Xuan, Swati Gambhir & Ravi Tiwari)

Copyright 2000, Kevin Wayne 1

! Greed. O(n log n) interval scheduling. ! Divide-and-conquer. O(n log n) FFT. ! Dynamic programming. O(n 2 ) edit distance.

SAT Solver. CS 680 Formal Methods Jeremy Johnson

The Satisfiability Problem [HMU06,Chp.10b] Satisfiability (SAT) Problem Cook s Theorem: An NP-Complete Problem Restricted SAT: CSAT, k-sat, 3SAT

! Greed. O(n log n) interval scheduling. ! Divide-and-conquer. O(n log n) FFT. ! Dynamic programming. O(n 2 ) edit distance.

1 Definition of Reduction

The temporal explorer who returns to the base 1

ALGORITHMS EXAMINATION Department of Computer Science New York University December 17, 2007

P -vs- NP. NP Problems. P = polynomial time. NP = non-deterministic polynomial time

P = NP; P NP. Intuition of the reduction idea:

Computational problems. Lecture 2: Combinatorial search and optimisation problems. Computational problems. Examples. Example

Solutions for the Exam 6 January 2014

Vertex Cover is Fixed-Parameter Tractable

W[1]-hardness. Dániel Marx. Recent Advances in Parameterized Complexity Tel Aviv, Israel, December 3, 2017

CS 580: Algorithm Design and Analysis

3/7/2018. CS 580: Algorithm Design and Analysis. 8.1 Polynomial-Time Reductions. Chapter 8. NP and Computational Intractability

Learning a SAT Solver from Single-

Theorem 2.9: nearest addition algorithm

CS473-Algorithms I. Lecture 13-A. Graphs. Cevdet Aykanat - Bilkent University Computer Engineering Department

Robert Cowen and Stephen H. Hechler. Received June 4, 2003; revised June 18, 2003

Partha Sarathi Mandal

CS 4407 Algorithms. Lecture 8: Circumventing Intractability, using Approximation and other Techniques

Lecture 10 October 7, 2014

Combining forces to solve Combinatorial Problems, a preliminary approach

Umans Complexity Theory Lectures

Lecture 21: Other Reductions Steven Skiena

CS 151 Complexity Theory Spring Final Solutions. L i NL i NC 2i P.

1. [5 points each] True or False. If the question is currently open, write O or Open.

K 4 C 5. Figure 4.5: Some well known family of graphs

Reductions. designing algorithms establishing lower bounds establishing intractability classifying problems. Bird s-eye view

The k-center problem Approximation Algorithms 2009 Petros Potikas

Exam in Algorithms & Data Structures 3 (1DL481)

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science Algorithms For Inference Fall 2014

We ve done. Introduction to the greedy method Activity selection problem How to prove that a greedy algorithm works Fractional Knapsack Huffman coding

Finding a winning strategy in variations of Kayles

Lecture 20: Satisfiability Steven Skiena. Department of Computer Science State University of New York Stony Brook, NY

/633 Introduction to Algorithms Lecturer: Michael Dinitz Topic: Approximation algorithms Date: 11/27/18

4.1 Review - the DPLL procedure

A New Reduction from 3-SAT to Graph K- Colorability for Frequency Assignment Problem

CS270 Combinatorial Algorithms & Data Structures Spring Lecture 19:

Complexity results for Minimum Sum Edge Coloring

CPSC 536N: Randomized Algorithms Term 2. Lecture 10

Exact Algorithms Lecture 7: FPT Hardness and the ETH

The Resolution Algorithm

Introduction to Parameterized Complexity

NP versus PSPACE. Frank Vega. To cite this version: HAL Id: hal

Transcription:

CS:4330 Theory of Computation Spring 2018 Computability Theory Other NP-Complete Problems Haniel Barbosa

Readings for this lecture Chapter 7 of [Sipser 1996], 3rd edition. Sections 7.4 and 7.5.

The 3SAT Problem 3SAT is a special case of the SAT problem in which the Boolean formula is a 3CNF-formula, i.e. 3SAT = {ϕ ϕ is a satisfiable 3CNF-formula} Theorem 3SAT is NP-complete. Proof idea: provide a polynomial time reduction from SAT to 3SAT Transform ϕ SAT into CNF Represent each component of the CNF a 1 a n by n 2 clauses (a 1 a 2 z 2 ) ( z 2 a 3 z 3 ) ( z n 2 a n 1 a n ) The resulting formula is equisatisfiable to the original one, even though it is not logically equivalent 1 / 13

Reducing 3SAT to CLIQUE Theorem 3SAT is polynomial time reducible to CLIQUE. Proof idea Build a polynomial time reduction f from formulas to graphs In the constructed graphs, cliques of a specialized size correspond to a satisfying assignment to the formula Structures within the graph are designed to mimic the behavior of the variables and clauses Let ϕ be a formula with k clauses: ϕ = (a 1 b 1 c 1 ) (a 2 b 2 c 2 ) (a k b k c k ) The reduction f generates a string G, k in which G is an undirected graph. 2 / 13

Reducing 3SAT to CLIQUE Nodes Nodes are organized in k groups of three nodes each called the triplets t 1,..., t k Each triplet corresponds to one of the clauses in ϕ and each node in the triplet corresponds to a literal in the associated clause Label each node of G with its corresponding literal in ϕ Edges of G connect all but two types of pairs of nodes in G: No edge is present between the nodes of the same triplet No edge is present between two nodes with contradictory labels, such as x 1 and x 1 3 / 13

Example of 3SAT reduction to graphs The 3-SAT formula (x x y) ( x y y) ( x y y) is reduced to the following clique problem below. x ~x x y y y ~x ~y ~y The green vertices form a 3-clique and correspond to the satisfying assignment x = 0,y = 1 4 / 13

Why this construction works? Lemma A 3CNF formula ϕ with k clauses is satisfiable if and only if its encoding as a graph G has a k clique, i.e. G,k CLIQUE. Proof idea 3SAT CLIQUE: Suppose that ϕ has a satisfying assignment and show G has a k-clique CLIQUE 3SAT: Suppose that G has a k-clique and show that ϕ has a satisfying assignment 5 / 13

3SAT CLIQUE Suppose that ϕ has a satisfying assignment At least one literal is true in every clause (required by ) In each triplet of G we select one node corresponding to a true literal in the assignment. If more literals are true is some clause we select a true one arbitrarily The selected nodes form a k-clique: there are k nodes (the number of clauses in ϕ) and each pair of selected nodes are joined, by construction selected nodes are not from the same triplet, by construction, and they could not have contradictory labels, since the assignment can t make both a variable and its negation true Therefore G contains a k-clique 6 / 13

CLIQUE 3SAT Suppose that G has a k-clique No two of the clique nodes can occur in the same triplet because nodes in the same triplet are not connected Therefore each of the k-triplets contains one of the k-clique nodes Assign the variables of ϕ s.t. each literal labeling a clique node is true. This can be done since two nodes with contradictory labels are not connected This assignment satisfies ϕ each triplet contains a clique node therefore each clause contains a literal that is assigned to true 7 / 13

CLIQUE is NP-complete Since there is a polynomial time reduction from 3SAT into CLIQUE and CLIQUE NP, we can conclude that CLIQUE is NP-complete Polynomial time reducibility allows us to link these two very different problems Similar links may be made among other problems 8 / 13

NP-hardness Definition A language B is NP-hard if every A NP is polynomial time reducible to B. Lemma If A NP and A is NP-hard, then A is NP-complete. 9 / 13

VERTEX-COVER is NP-complete If G is an undirected graph, a vertex cover of G is a subset of the nodes where every edge of G touches one of those nodes. The vertex cover problem asks whether a graph contains a vertex cover of a specified size: VERTEX-COVER = { G,k G is an undirected graph with a k-node vertex cover} Theorem VERTEX-COVER is NP-complete Proof idea Show that VERTEX-COVER is in NP Easy to certify in polynomial time that subset of k nodes is a vertex-cover Show that VERTEX-COVER is NP-hard Reduction from 3SAT to VERTEX-COVER Alternative proof can be done using reductions between graph problems 10 / 13

VERTEX-COVER is NP-hard (from 3SAT reduction) Theorem 3SAT p VERTEX-COVER. Proof idea Convert a 3CNF formula ϕ into a graph G and number k such that ϕ is satisfiable whenever G has a vertex cover with k nodes. f (ϕ) = G,m + 2n, where ϕ is a 3CNF formula with n clauses on m variables G = (V,E), where V = {x i, x i 1 i m} {l i,j 1 i 3,1 j n} and E = {(l 1,j,l 2,j ),(l 1,j,l 3,j ),(l 2,j,l 3,j ) 1 j l} {(x i,l j,k ) 1 i m,1 j 3,1 k n} in which the j-th literal of clause k is x i 11 / 13

VERTEX-COVER is NP-hard (by graph reductions) Given a graph G = (V,E) X V is a vertex-cover if for each edge (u,v) E, u X or v X I V is an independent set if for each edge (u,v) E, u I or v I X is a vertex-cover iff V \ X is an independent set of G Note this a lemma to be proved X is a clique of G iff X is an independent set of Ḡ, i.e. the graph complement of G (which complements the edges) Note this a lemma to be proved NP-hardness proof then amounts to show: CLIQUE p INDEPENDENCE-SET: f ( G,k ) = Ḡ,k INDEPENDENCE-SET p VERTEX-COVER: f ( G,k ) = G, V k 12 / 13

Other NP-complete problems HAM-PATH SUBSET-SUM PARTITION BIN-PACKING KNAPSACK 13 / 13