Introduction to Algorithms. Lecture 24. Prof. Patrick Jaillet

Similar documents
NP-Complete Problems

6.006 Introduction to Algorithms. Lecture 25: Complexity Prof. Erik Demaine

NP-Complete Reductions 2

Introduction to Algorithms

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

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

NP-Completeness. Algorithms

NP-complete Reductions

P and NP (Millenium problem)

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

Module 6 NP-Complete Problems and Heuristics

Module 6 NP-Complete Problems and Heuristics

Lecture 7: Counting classes

Chapter 9 Graph Algorithms

11/22/2016. Chapter 9 Graph Algorithms. Introduction. Definitions. Definitions. Definitions. Definitions

Chapter 9 Graph Algorithms

COMP Analysis of Algorithms & Data Structures

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

Lecture 24: More Reductions (1997) Steven Skiena. skiena

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

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

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

9.1 Cook-Levin Theorem

Module 6 NP-Complete Problems and Heuristics

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

Chapter 9 Graph Algorithms

Chapter 10 Part 1: Reduction

6.2. Paths and Cycles

CMPSCI611: The SUBSET-SUM Problem Lecture 18

Partha Sarathi Mandal

Vertex 3-colorability of claw-free graphs

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

Solutions for the Exam 6 January 2014

Module 6 P, NP, NP-Complete Problems and Approximation Algorithms

Problem 1. Which of the following is true of functions =100 +log and = + log? Problem 2. Which of the following is true of functions = 2 and =3?

CMSC Theory of Algorithms Second Midterm

CSC 505, Fall 2000: Week 12

Theorem 2.9: nearest addition algorithm

CS 125 Section #10 Midterm 2 Review 11/5/14

Examples of P vs NP: More Problems

NP-Complete Problems

8.1 Polynomial-Time Reductions

W4231: Analysis of Algorithms

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

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

Graph Theory S 1 I 2 I 1 S 2 I 1 I 2

Computability Theory

Greedy Algorithms 1. For large values of d, brute force search is not feasible because there are 2 d

Introduction to Graph Theory

6,8:15. MA/CSSE 473 Day 37. Student Questions. Kruskal data structures. Disjoint Set ADT. Complexity intro

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

Algorithm Design, Anal. & Imp., Homework 4 Solution

CONTRACTIONS OF PLANAR GRAPHS

Traveling Salesman Problem (TSP) Input: undirected graph G=(V,E), c: E R + Goal: find a tour (Hamiltonian cycle) of minimum cost

Practice Final Exam 1

CSE 417 Branch & Bound (pt 4) Branch & Bound

Slides on Approximation algorithms, part 2: Basic approximation algorithms

NP-Complete Chapter 8

Preventing Unraveling in Social Networks: The Anchored k-core Problem

Modules. 6 Hamilton Graphs (4-8 lectures) Introduction Necessary conditions and sufficient conditions Exercises...

CSE 417 Network Flows (pt 4) Min Cost Flows

The Maximum Clique Problem

Complexity Results on Graphs with Few Cliques

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

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

The k-center problem Approximation Algorithms 2009 Petros Potikas

CS 470/570 Exam 6 Spring 2017 Solution

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

Notes for Lecture 24

Basic Approximation algorithms

Steven Skiena. skiena

Lecture 10 October 7, 2014

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

Maximizing edge-ratio is NP-complete

CSE 417 Network Flows (pt 3) Modeling with Min Cuts

Analysis of Optimal Sets of Survivable Paths in Undirected Simple Graph Applicable for Optical Networks

We ve studied the main models and concepts of the theory of computation:

COLORING EDGES AND VERTICES OF GRAPHS WITHOUT SHORT OR LONG CYCLES

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

Assignment No 2 (Group B)

Exam 3 Practice Problems

Greedy Algorithms 1 {K(S) K(S) C} For large values of d, brute force search is not feasible because there are 2 d {1,..., d}.

COMP260 Spring 2014 Notes: February 4th

Steiner Tree. Algorithms and Networks 2014/2015 Hans L. Bodlaender Johan M. M. van Rooij

CSC 373: Algorithm Design and Analysis Lecture 3

Reductions of Graph Isomorphism Problems. Margareta Ackerman. Technical Report 08

CSE 548: Analysis of Algorithms. Lecture 13 ( Approximation Algorithms )

Fixed Parameter Algorithms

1 The Traveling Salesperson Problem (TSP)

CS6702 GRAPH THEORY AND APPLICATIONS QUESTION BANK

1 Definition of Reduction

Final Exam Solutions

ACO Comprehensive Exam October 12 and 13, Computability, Complexity and Algorithms

Some Hardness Proofs

Algorithm Design and Analysis

Lecture 4: Walks, Trails, Paths and Connectivity

University of Nevada, Las Vegas Computer Science 456/656 Fall 2016

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

Umans Complexity Theory Lectures

Transcription:

6.006- Introduction to Algorithms Lecture 24 Prof. Patrick Jaillet

Outline Decision vs optimization problems P, NP, co-np Reductions between problems NP-complete problems Beyond NP-completeness Readings CLRS 34

Decision problems A decision problem asks us to check if something is true (possible answers: yes or no ) Examples: PRIMES Instance: A positive integer n Question: is n prime? COMPOSITES NUMBERS Instance: A positive integer n Question: are there integers k>1 and p>1 such that n=kp?

Optimization problems An optimization problem asks us to find, among all feasible solutions, one that maximizes or minimizes a given objective Example: single shortest-path problem Instance: Given a weighted graph G, two nodes s and t of G Problem: find a simple path from s to t of minimum total length Possible answers: a shortest path from s to t or no path exists between s and t.

Decision version of an optimization A decision version of a given optimization problem can easily be defined with the help of a bound on the value of feasible solutions Previous example: SINGLE SPP Instance: A weighted graph G, two nodes s and t of G, and a bound b Question: is there a simple path from s to t of length at most b?

Optimization vs Decision version Clearly, if one can solve an optimization problem (in polynomial time), then one can answer the decision version (in polynomial time) Conversely, by doing binary search on the bound b, one can transform a polynomial time answer to a decision version into a polynomial time algorithm for the corresponding optimization problem In that sense, these are essentially equivalent. We will then restrict ourselves to decision problems

The classes P and NP P is the class of all decision problems that can be solved in polynomial time. NP is the class of all decision problems that can be verified in polynomial time: any yes-instances can be checked in polynomial time with the help of a short certificate. Clearly P NP P NP

The class co-np co-np is the class of all decision problems whose no answers can be verified in polynomial time: any no-instances can be checked in polynomial time with the help of a short certificate. So clearly P NP co - NP

Reductions between problems A polynomial-time reduction from a decision problem A to a decision problem B is a procedure that transforms any instance I A of A into an instance I B of B with the following characteristics: the transformation takes polynomial time the answer for I A is yes iff the answer for I B is yes We say that A P B

Reductions between problems if A P B, then one can turn an algorithm for B into an algorithm for A: Reductions are of course useful for optimization problems as well

VERTEX-COVER P DOMINATING SET VERTEX-COVER Instance: a graph G and a positive integer k Question: is there a vertex cover (i.e. set of vertices covering all edges) of size k or less? DOMINATING SET Instance: a graph G and a positive integer p Question: is there a dominating set (i.e. set of vertices covering all vertices) of size p or less?

VERTEX-COVER P DOMINATING SET

VERTEX-COVER P CLIQUE VERTEX-COVER Instance: a graph G and a positive integer k Question: is there a vertex cover (i.e. set of vertices covering all edges) of size k or less? CLIQUE Instance: a graph G and a positive integer p Question: is there a clique (i.e. set of vertices all adjacent to each other) of size p or more?

VERTEX-COVER P CLIQUE Consider a third problem: INDEPENDENT SET Instance: a graph G and a positive integer q Question: is there an independent set (i.e. set of vertices no-one adjacent to each other) of size q or more? For a graph G=(V,E), the following statements are equivalent: V is a vertex cover for G V\V is an independent set for G V\V is a clique in the complement G c of G

Reductions - consequences Def: A P B: There is a procedure that transforms any instance I A of A into an instance I B of B with the following characteristics: the transformation takes polynomial time the answer for I A is yes iff the answer for I B is yes If B can be solved in polynomial time, and A P B, then A can be solved in polynomial time. If A is hard, then B should be hard too...

The class NP-complete A decision problem X is NP-complete if X belongs to NP A P X for all A in NP Theorem[Cook-Karp-Levin]: Vertex-Cover is NPcomplete Corollary: Dominating Set and Clique are NPcomplete, and so are many other problems (Knapsack, Hamiltonian circuit, Longest path problem, etc.)

One view of various classes... NP P NP complete

Beyond NP-completeness On the negative side, there are decision problems that can be proved not to be in NP decidable but not in NP undecidable (ouch!!) On the positive side, some hard optimization problems can become easier to approximate... unfortunately not all...