CSE332: Data Abstractions Lecture 24.5: Interlude on Intractability Dan Grossman Spring 2012.

Slides:



Advertisements
Similar presentations
Analysis of Algorithms
Advertisements

Introduction to Algorithms NP-Complete
NP-Hard Nattee Niparnan.
Design and Analysis of Algorithms Approximation algorithms for NP-complete problems Haidong Xue Summer 2012, at GSU.
1 NP-Complete Problems. 2 We discuss some hard problems:  how hard? (computational complexity)  what makes them hard?  any solutions? Definitions 
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.
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 21 Instructor: Paul Beame.
Approximation Algorithms Lecture for CS 302. What is a NP problem? Given an instance of the problem, V, and a ‘certificate’, C, we can verify V is in.
NP-Complete Problems Reading Material: Chapter 10 Sections 1, 2, 3, and 4 only.
The Theory of NP-Completeness
CSE 326: Data Structures NP Completeness Ben Lerner Summer 2007.
Analysis of Algorithms CS 477/677
CSE 421 Algorithms Richard Anderson Lecture 27 NP Completeness.
Chapter 11: Limitations of Algorithmic Power
Complexity Issues Mark Allen Weiss: Data Structures and Algorithm Analysis in Java Lydia Sinapova, Simpson College.
P, NP, and NP-Complete Suzan Köknar-Tezel.
Hardness Results for Problems
CSE 589 Applied Algorithms Spring Colorability Branch and Bound.
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
MCS312: NP-completeness and Approximation Algorithms
The Traveling Salesman Problem Approximation
Nattee Niparnan. Easy & Hard Problem What is “difficulty” of problem? Difficult for computer scientist to derive algorithm for the problem? Difficult.
Tonga Institute of Higher Education Design and Analysis of Algorithms IT 254 Lecture 8: Complexity Theory.
CSE 024: Design & Analysis of Algorithms Chapter 9: NP Completeness Sedgewick Chp:40 David Luebke’s Course Notes / University of Virginia, Computer Science.
1 Lower Bounds Lower bound: an estimate on a minimum amount of work needed to solve a given problem Examples: b number of comparisons needed to find the.
EMIS 8373: Integer Programming NP-Complete Problems updated 21 April 2009.
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
Unit 9: Coping with NP-Completeness
NP-Complete Problems. Running Time v.s. Input Size Concern with problems whose complexity may be described by exponential functions. Tractable problems.
NP-COMPLETE PROBLEMS. Admin  Two more assignments…  No office hours on tomorrow.
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness and course wrap up.
NP-Complete problems.
CSE332: Data Abstractions Lecture 27: A Few Words on NP Tyler Robison Summer
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.
CS6045: Advanced Algorithms NP Completeness. NP-Completeness Some problems are intractable: as they grow large, we are unable to solve them in reasonable.
CSE 6311 – Spring 2009 ADVANCED COMPUTATIONAL MODELS AND ALGORITHMS Lecture Notes – Feb. 3, 2009 Instructor: Dr. Gautam Das notes by Walter Wilson.
NPC.
CSC 413/513: Intro to Algorithms
1 Ch 10 - NP-completeness Tractable and intractable problems Decision/Optimization problems Deterministic/NonDeterministic algorithms Classes P and NP.
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness Proofs.
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
COSC 3101A - Design and Analysis of Algorithms 14 NP-Completeness.
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 589 Applied Algorithms Spring 1999 Prim’s Algorithm for MST Load Balance Spanning Tree Hamiltonian Path.
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.
The Theory of NP-Completeness
More NP-complete problems
NP-completeness Ch.34.
Richard Anderson Lectures NP-Completeness
Richard Anderson Lecture 26 NP-Completeness
CSE373: Data Structures & Algorithms Lecture 19: Spanning Trees
Richard Anderson Lecture 26 NP-Completeness
Hard Problems Introduction to NP
CS120 Graphs.
ICS 353: Design and Analysis of Algorithms
Richard Anderson Lecture 25 NP-Completeness
CSE373: Data Structures & Algorithms Lecture 18: Dijkstra’s Algorithm
Richard Anderson Lecture 28 NP-Completeness
CSE373: Data Structures & Algorithms Lecture 19: Spanning Trees
Richard Anderson Lecture 30 NP-Completeness
Chapter 11 Limitations of Algorithm Power
Richard Anderson Lecture 26 NP-Completeness
The Theory of NP-Completeness
CS154, Lecture 16: More NP-Complete Problems; PCPs
Richard Anderson Lecture 27 Survey of NP Complete Problems
CSE 589 Applied Algorithms Spring 1999
Presentation transcript:

CSE332: Data Abstractions Lecture 24.5: Interlude on Intractability Dan Grossman Spring 2012

No, the material in lecture 24.5 (this one) won’t be on the final –But it’s still an important high-level idea Spring 20122CSE332: Data Abstractions

Intractable Graph Problems Graph problems we studied all had efficient solutions (roughly O(|V| 2 ) or better) –Topological sort –Traversals/connectedness –Shortest paths –Minimum Spanning Tree But there are plenty of intractable graph problems –Worst-case exponential in some aspect of the problem as far as we know –Topic studied in CSE312 and CSE421, but do not want to give false impression that there is always an efficient solution to everything –Common instances or approximate solutions can be better Spring 20123CSE332: Data Abstractions

Vertex Cover: Optimal Input: A graph (V,E) Output: A minimum size subset S of V such that for every edge ( u, v ) in E, at least one of u or v is in S O(2 |V| ) algorithm: Try every subset of vertices; pick smallest one O(|V| k ) algorithm: Unknown, probably does not exist Spring 20124CSE332: Data Abstractions

Vertex Cover: Decision Problem Spring 20125CSE332: Data Abstractions Input: A graph (V,E) and a number m Output: A subset S of V such that for every edge ( u, v ) in E, at least one of u or v is in S and |S|=m (if such an S exists) O(2 m ) algorithm: Try every subset of vertices of size m O(m k ) algorithm: Unknown, probably does not exist Good enough: Binary search on m can solve the original problem Easy to verify a solution: See if S has size m and covers edges

Traveling Salesman [Like vertex cover, usually interested in the optimal solution, but we can ask a yes/no question and rely on binary search for optimal] Input: A complete directed graph (V,E) and a number m Output: A path that visits each vertex exactly once and has total cost < m if one exists O(|V|!) algorithm: Try every path, stop if find cheap enough one Verifying a solution: Easy Spring 20126CSE332: Data Abstractions

Clique Input: An undirected graph (V,E) and a number m Output: Is there a subgraph of m nodes such that every edge in the subgraph is present? Naïve algorithm: Try all subsets of m nodes Verifying a solution: Easy Spring 20127CSE332: Data Abstractions

Not Just Graph Problems Every problem studied in CSE332 has an efficient solution –Correct cause and effect: Chose to study problems for which we know efficient solutions! There are plenty of intractable problems… Spring 20128CSE332: Data Abstractions

Subset Sum Input: An array of n numbers and a target-sum sum Output: A subset of the numbers that add up to sum if one exists O(2 n ) algorithm: Try every subset of array O(n k ) algorithm: Unknown, probably does not exist Spring 20129CSE332: Data Abstractions ?

Satisfiability Input: a logic formula of size m containing n variables Output: An assignment of Boolean values to the variables in the formula such that the formula is true O(m*2 n ) algorithm: Try every variable assignment O(m k n k ) algorithm: Unknown, probably does not exist Spring CSE332: Data Abstractions

So… what to do? Given a problem, how can you: –Find an efficient solution… –… or prove that one (probably) does not exist? See CSE312, CSE421, CSE431 Spring CSE332: Data Abstractions