Hardness Results for Problems

Slides:



Advertisements
Similar presentations
Analysis of Algorithms
Advertisements

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.
Department of Computer Science & Engineering
NP-complete and NP-hard problems Transitivity of polynomial-time many-one reductions Concept of Completeness and hardness for a complexity class Definition.
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
Computability and Complexity 23-1 Computability and Complexity Andrei Bulatov Search and Optimization.
CSE332: Data Abstractions Lecture 27: A Few Words on NP Dan Grossman Spring 2010.
Hardness Results for Problems P: Class of “easy to solve” problems Absolute hardness results Relative hardness results –Reduction technique.
NP-complete and NP-hard problems Transitivity of polynomial-time many-one reductions Definition of complexity class NP –Nondeterministic computation –Problems.
Reduction Techniques Restriction Local Replacement Component Design Examples.
NP-Complete Problems Reading Material: Chapter 10 Sections 1, 2, 3, and 4 only.
The Theory of NP-Completeness
NP-Complete Problems Problems in Computer Science are classified into
NP-complete and NP-hard problems
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 23 Instructor: Paul Beame.
Analysis of Algorithms CS 477/677
Example: HP ≤ p HC Hamiltonian Path –Input: Undirected Graph G = (V,E) –Y/N Question: Does G contain a Hamiltonian Path? Hamiltonian Cycle –Input: Undirected.
CSE 421 Algorithms Richard Anderson Lecture 27 NP Completeness.
Odds and Ends HP ≤ p HC (again) –Turing reductions Strong NP-completeness versus Weak NP-completeness Vertex Cover to Hamiltonian Cycle.
Chapter 11: Limitations of Algorithmic Power
Toward NP-Completeness: Introduction Almost all the algorithms we studies so far were bounded by some polynomial in the size of the input, so we call them.
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 22 Instructor: Paul Beame.
Approximation Algorithms Motivation and Definitions TSP Vertex Cover Scheduling.
Hardness Results for Problems P: Class of “easy to solve” problems Absolute hardness results Relative hardness results –Reduction technique.
Nattee Niparnan. Easy & Hard Problem What is “difficulty” of problem? Difficult for computer scientist to derive algorithm for the problem? Difficult.
Complexity Classes (Ch. 34) The class P: class of problems that can be solved in time that is polynomial in the size of the input, n. if input size is.
The Complexity of Optimization Problems. Summary -Complexity of algorithms and problems -Complexity classes: P and NP -Reducibility -Karp reducibility.
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.
EMIS 8373: Integer Programming NP-Complete Problems updated 21 April 2009.
CSE332: Data Abstractions Lecture 24.5: Interlude on Intractability Dan Grossman Spring 2012.
CSCI 3160 Design and Analysis of Algorithms Tutorial 10 Chengyu Lin.
NP-Complete Problems. Running Time v.s. Input Size Concern with problems whose complexity may be described by exponential functions. Tractable problems.
1 Chapter 34: NP-Completeness. 2 About this Tutorial What is NP ? How to check if a problem is in NP ? Cook-Levin Theorem Showing one of the most difficult.
NP-COMPLETE PROBLEMS. Admin  Two more assignments…  No office hours on tomorrow.
NP-Complete problems.
NP-Completeness (Nondeterministic Polynomial Completeness) Sushanth Sivaram Vallath & Z. Joseph.
CS 3343: Analysis of Algorithms Lecture 25: P and NP Some slides courtesy of Carola Wenk.
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.
LIMITATIONS OF ALGORITHM POWER
CS6045: Advanced Algorithms NP Completeness. NP-Completeness Some problems are intractable: as they grow large, we are unable to solve them in reasonable.
1 CPSC 320: Intermediate Algorithm Design and Analysis July 30, 2014.
NPC.
NP Completeness Piyush Kumar. Today Reductions Proving Lower Bounds revisited Decision and Optimization Problems SAT and 3-SAT P Vs NP Dealing with NP-Complete.
Young CS 331 D&A of Algo. NP-Completeness1 NP-Completeness Reference: Computers and Intractability: A Guide to the Theory of NP-Completeness by Garey and.
1 Ch 10 - NP-completeness Tractable and intractable problems Decision/Optimization problems Deterministic/NonDeterministic algorithms Classes P and NP.
Lecture. Today Problem set 9 out (due next Thursday) Topics: –Complexity Theory –Optimization versus Decision Problems –P and NP –Efficient Verification.
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 P and NP. 2 Introduction The Traveling Salesperson problem and thousands of other problems are equally hard in the sense that if we had an efficient.
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.
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.
The NP class. NP-completeness
More NP-Complete and NP-hard Problems
More NP-complete problems
P & NP.
Chapter 10 NP-Complete Problems.
Richard Anderson Lectures NP-Completeness
NP-Completeness Yin Tat Lee
CS154, Lecture 16: More NP-Complete Problems; PCPs
ICS 353: Design and Analysis of Algorithms
Richard Anderson Lecture 25 NP-Completeness
Richard Anderson Lecture 28 NP Completeness
Computation Basics & NP-Completeness
NP-Completeness Yin Tat Lee
NP-Completeness Reference: Computers and Intractability: A Guide to the Theory of NP-Completeness by Garey and Johnson, W.H. Freeman and Company, 1979.
CSE 589 Applied Algorithms Spring 1999
Presentation transcript:

Hardness Results for Problems Example Problems P: Class of “easy to solve” problems Absolute hardness results Relative hardness results Reduction technique

Example: Clique Problem Input: Undirected graph G = (V,E), integer k Y/N Question: Does G contain a clique of size ≥ k? k=4 k=5

Example: Vertex Cover k=3 k=2 Input: Undirected graph G = (V,E), integer k Y/N Question: Does G contain a vertex cover of size ≤ k? Vertex cover: A set of vertices C such that for every edge (u,v) in E, either u is in C or v is in C (or both are in C) k=3 k=2

Example: Satisfiability Input: Set of variables X and set of clauses C over X Y/N Question: Is there a satisfying truth assignment T for the variables in X such that all clauses in C are true?

Hardness Results for Problems Example Problems P: Class of “easy to solve” problems Absolute hardness results Relative hardness results Reduction technique

Fundamental Setting When faced with a new problem P, we alternate between the following two goals Find a “good” algorithm for solving P Use algorithm design techniques Prove a “hardness result” for problem P No “good” algorithm exists for problem P

Complexity Class P P is the set of problems that can be solved using a polynomial-time algorithm Sometimes we focus only on decision problems The task of a decision problem is to answer a yes/no question If a problem belongs to P, it is considered to be “efficiently solvable” If a problem is not in P, it is generally considered to be NOT “efficiently solvable” Looking back at previous slide, our goals are to: Prove that P belongs to P Prove that P does not belong to P

Hardness Results for Problems Example Problems P: Class of “easy to solve” problems Absolute hardness results Relative hardness results Reduction technique

Absolute Hardness Results Fuzzy Definition A hardness result for a problem P without reference to another problem Examples Solving the clique problem requires W(n) time in the worst-case Solving the clique problem requires W(2n) time in the worst-case. The clique problem is not in P.

Proof Techniques Diagonalization Information Theory argument Can be used to prove some problems are not in P Information Theory argument W(nlog n) lower bound for sorting Typically not a superpolynomial lower bounds “Size of input” argument Prove that solving the graph connectivity problem requires W(V2) time Prove that solving the maximum clique problem requires W(V2) time Typically not a superpolynomial lower bound

Status Many natural problems can be shown to be in P Graph connectivity Shortest Paths Minimum Spanning Tree Very few natural problems have been proven to NOT be in P Variants of halting problem are one example Many natural problems cannot be placed in or out of P Satisfiability Longest Path Problem Clique Problem Vertex Cover Problem

Hardness Results for Problems Example Problems P: Class of “easy to solve” problems Absolute hardness results Relative hardness results Reduction technique

Relative Hardness Results Fuzzy Definition A hardness result for a problem P with reference to another problem Examples Satisfiability is at least as hard as Clique to solve If Satisfiability is unsolvable, then Clique is unsolvable. If Satisfiability is in P, then Clique is in P If Clique is not in P, then Satisfiability is not in P

Important Observation We are interested in relative hardness results BECAUSE of our inability to prove absolute hardness results That is, if we could prove strong absolute hardness results, we would not be as interested in relative hardness results Example If I could prove “Satisfiability is not in P”, then I would be less interested in proving “If Clique is not in P, then Satisfiability is not in P”.

Relative Hardness Proof Technique We show that P2 is at least as hard as P1 in the following way Informal: We show how to solve problem P1 using a procedure P2 that solves P2 as a subroutine

Examples Multiplication and Squaring square(x) = mult(x,x) Proves multiplication is at least as hard as squaring mult(x,y) = (square(x+y) – square(x-y))/4 Prove squaring is at least as hard as multiplication Assumes that addition, subtraction, and division by 4 can be done with no substantial increase in complexity Specific complexity of multiplication may be higher as there are two calls to square, but the difference is polynomially bounded

Hardness Results for Problems Example Problems P: Class of “easy to solve” problems Absolute hardness results Relative hardness results Reduction technique

Decision Problems We restrict our attention to decision problems Key characteristic: 2 types of inputs Yes input instances No input instances Almost all natural problems can be converted into an equivalent decision problem without changing the complexity of the problem One technique: add an extra input variable that represents the solution for the original problem

Optimization to Decision Example using clique problem Optimization Problems Input: Graph G=(V,E) Task: Output size of maximum clique in G Task 2: Output a maximum sized clique of G Decision Problem Input: Graph G=(V,E), integer k ≤ |V| Y/N Question: Does G contain a clique of size k? Your task Show that if we can solve decision clique in polynomial-time, then we can solve the optimization clique problems in polynomial-time.

Polynomial-time Reduction Technique Can describe as a polynomial-time “Answer-preserving input transformation” Consider two problems П1 and П2, and suppose I want to show If П2 is in P, then П1 is in P If П1 is not in P, then П2 is not in P The basic idea Develop a function (reduction) R that maps input instances of problem П1 to input instances of problem П2 The function R should be computable in polynomial time x is a yes input to П1 ↔ R(x) is a yes input to П2 Notation: П1 ≤p П2

What П1 ≤p П2 Means If R exists, then: If П2 is in P, then П1 is in P Yes Input to П2 P2 solves П2 in poly time Yes Input to П1 Yes R No Input to П2 No No Input to П1 P1 solves П1 in polynomial-time If R exists, then: If П2 is in P, then П1 is in P If П1 is not in P, then П2 is not in P

Showing П1 ≤p П2 For any x input for П1, specify what R(x) will be Show that R(x) has polynomial size relative to x You should show that R runs in polynomial time; I only require the size requirement above Show that if x is a yes instance for П1, then R(x) is a yes instance for П2 Show that if x is a no instance for П1, then R(x) is a no instance for П2 Often done by showing that if R(x) is a yes instance for П2, then x must have been a yes instance for П1