CSCI-256 Data Structures & Algorithm Analysis Lecture Note: Some slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved. 27.

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.
1 NP-completeness Lecture 2: Jan P The class of problems that can be solved in polynomial time. e.g. gcd, shortest path, prime, etc. There are many.
CSCI 256 Data Structures and Algorithm Analysis Lecture 22 Some slides by Kevin Wayne copyright 2005, Pearson Addison Wesley all rights reserved, and some.
The Theory of NP-Completeness
Complexity ©D Moshkovitz 1 Approximation Algorithms Is Close Enough Good Enough?
Parallel Scheduling of Complex DAGs under Uncertainty Grzegorz Malewicz.
COMP 482: Design and Analysis of Algorithms
CSC5160 Topics in Algorithms Tutorial 2 Introduction to NP-Complete Problems Feb Jerry Le
Computational problems, algorithms, runtime, hardness
NP-Complete Problems Reading Material: Chapter 10 Sections 1, 2, 3, and 4 only.
Polynomial-Time Reductions
1 Chapter 8 NP and Computational Intractability Slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved.
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
CSE 421 Algorithms Richard Anderson Lecture 27 NP Completeness.
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 22 Instructor: Paul Beame.
CSCI-256 Data Structures & Algorithm Analysis Lecture Note: Some slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved. 31.
1 Algorithm Design Patterns and Anti-Patterns Algorithm design patterns.Ex. n Greed.O(n log n) interval scheduling. n Divide-and-conquer. O(n log n) FFT.
1 Chapter 8 NP and Computational Intractability Slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved.
Piyush Kumar (Lecture 7: Reductions)
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.
Lecture 22 More NPC problems
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
1 Chapter 10 Extending the Limits of Tractability Slides by Kevin Wayne Pearson-Addison Wesley. All rights reserved.
Approximation Algorithms
CSCI-256 Data Structures & Algorithm Analysis Lecture Note: Some slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved. 33.
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.
1 Chapter 8 NP and Computational Intractability Slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved.
Sailesh Prabhu Prof. Swarat Chaudhuri COMP 482: Design and Analysis of Algorithms Spring 2013.
1 Chapter 8 NP and Computational Intractability Slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved.
Unit 9: Coping with NP-Completeness
30.
1.1 Chapter 3: Proving NP-completeness Results Six Basic NP-Complete Problems Some Techniques for Proving NP-Completeness Some Suggested Exercises.
CS 3343: Analysis of Algorithms Lecture 25: P and NP Some slides courtesy of Carola Wenk.
CSCI-256 Data Structures & Algorithm Analysis Lecture Note: Some slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved. 29.
CSCI-256 Data Structures & Algorithm Analysis Lecture Note: Some slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved. 25.
CPS Computational problems, algorithms, runtime, hardness (a ridiculously brief introduction to theoretical computer science) Vincent Conitzer.
28.
NP-completeness NP-complete problems. Homework Vertex Cover Instance. A graph G and an integer k. Question. Is there a vertex cover of cardinality k?
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness Proofs.
NP Hard Problems Instructor Neelima Gupta Presentation Edited by Sapna Grover.
CSCI-256 Data Structures & Algorithm Analysis Lecture Note: Some slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved. 3.
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.
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.
34.NP Completeness. Computer Theory Lab. Chapter 34P.2.
CSE 332: NP Completeness, Part II Richard Anderson Spring 2016.
TU/e Algorithms (2IL15) – Lecture 10 1 NP-Completeness, II.
Richard Anderson Lectures NP-Completeness
Richard Anderson Lecture 26 NP-Completeness
Polynomial-Time Reduction
Richard Anderson Lecture 26 NP-Completeness
NP-Completeness Yin Tat Lee
Intro to Theory of Computation
Intro to Theory of Computation
Computability and Complexity
Richard Anderson Lecture 25 NP-Completeness
Richard Anderson Lecture 28 NP-Completeness
Approximation Algorithms
Chapter 8 NP and Computational Intractability
Richard Anderson Lecture 28 NP Completeness
Richard Anderson Lecture 27 NP Completeness
Richard Anderson Lecture 26 NP-Completeness
NP-Completeness Yin Tat Lee
CSE 6408 Advanced Algorithms.
Richard Anderson Lecture 25 NP Completeness
Presentation transcript:

CSCI-256 Data Structures & Algorithm Analysis Lecture Note: Some slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved. 27

The Universe NP-Complete NP P Millennium Prize Problems Copyright © 1990, Matt Groening

Classify Problems According to Computational Requirements Q: Which problems will we be able to solve in practice? –A working definition. [Cobham 1964, Edmonds 1965, Rabin 1966] Those with polynomial-time algorithms Desiderata: Classify problems according to those that can be solved in polynomial-time and those that cannot Frustrating news: Huge number of fundamental problems have defied classification for decades This chapter: Show that these fundamental problems are "computationally equivalent" and appear to be different manifestations of one really hard problem

Polynomial-Time Reduction Desiderata': Suppose we could solve Y in polynomial-time. What else could we solve in polynomial time? Reduction: Problem X polynomial reduces to problem Y if arbitrary instances of problem X can be solved using –Polynomial number of standard computational steps, plus –Polynomial number of calls to oracle that solves problem Y Notation: X  P Y computational model supplemented by special piece of hardware that solves instances of Y in a single step

Lemma Suppose X  P Y. If Y can be solved in polynomial time, then X can be solved in polynomial time

Lemma Suppose X  P Y. If X cannot be solved in polynomial time, then Y cannot be solved in polynomial time

Polynomial-Time Reduction Purpose: Classify problems according to relative difficulty Design algorithms: If X  P Y and Y can be solved in polynomial-time, then X can also be solved in polynomial time Establish intractability: If X  P Y and X cannot be solved in polynomial-time, then Y cannot be solved in polynomial time Establish equivalence: If X  P Y and Y  P X, we use notation X  P Y up to cost of reduction

Independent Set –Graph G = (V, E), a subset S of the vertices is independent if there are no edges between vertices in S. Goal is to find S of maximum size

Independent Set Convert to decision version of the problem –Given a graph G = (V, E) and an integer k, does G contain an independent set of size at least k? –Ex: Is there an independent set of size  6? Yes –Ex: Is there an independent set of size  7? No independent set Sample Application: find set of mutually non-conflicting points

Vertex Cover –Graph G = (V, E), a subset S of the vertices is a vertex cover if every edge in E has at least one endpoint in S. Goal is to find S of minimum size

Vertex Cover Convert to decision version of the problem –Given a graph G = (V, E) and an integer k, does G contain a vertex cover of size at most k? –Ex: Is there a vertex cover of size  4? Yes –Ex: Is there a vertex cover of size  3? No vertex cover Sample Application: place guards within an art gallery so that all corridors are visible at any time

Vertex Cover and Independent Set Claim: VERTEX-COVER  P INDEPENDENT-SET –Pf: We show S is an independent set iff V  S is a vertex cover  –Let S be any independent set –Consider an arbitrary edge (u, v) –S independent  u  S or v  S  u  V  S or v  V  S –Thus, V  S covers (u, v)  –Let V  S be any vertex cover –Consider two nodes u  S and v  S –Observe that (u, v)  E since V  S is a vertex cover –Thus, no two nodes in S are joined by an edge  S independent set

Set Cover SET COVER: Given a set U of elements, a collection S 1, S 2,..., S m of subsets of U, and an integer k, does there exist a collection of  k of these sets whose union is equal to U? Sample application –m available pieces of software –Set U of n capabilities that we would like our system to have –The ith piece of software provides the set S i  U of capabilities –Goal: achieve all n capabilities using fewest pieces of software U = { 1, 2, 3, 4, 5, 6, 7 } k = 2 S 1 = {3, 7}S 4 = {2, 4} S 2 = {3, 4, 5, 6}S 5 = {5} S 3 = {1}S 6 = {1, 2, 6, 7}

Vertex Cover Reduces to Set Cover Claim: VERTEX-COVER  P SET-COVER –Pf: Given a VERTEX-COVER instance G = (V, E), k, we construct a set cover instance whose size equals the size of the vertex cover instance Construction –Create SET-COVER instance k = k, U = E, S v = {e  E : e incident to v } –Set-cover of size  k iff vertex cover of size  k SET COVER U = { 1, 2, 3, 4, 5, 6, 7 } k = 2 S a = {3, 7}S b = {2, 4} S c = {3, 4, 5, 6}S d = {5} S e = {1}S f = {1, 2, 6, 7} a d b e fc VERTEX COVER k = 2 e1e1 e2e2 e3e3 e5e5 e4e4 e6e6 e7e7