Richard Anderson Lecture 28 Coping with NP-Completeness

Slides:



Advertisements
Similar presentations
Instructor Neelima Gupta Table of Contents Approximation Algorithms.
Advertisements

Design and Analysis of Algorithms Approximation algorithms for NP-complete problems Haidong Xue Summer 2012, at GSU.
Combinatorial Algorithms
Approximation Algorithms
Approximation Algorithms: Combinatorial Approaches Lecture 13: March 2.
1 Optimization problems such as MAXSAT, MIN NODE COVER, MAX INDEPENDENT SET, MAX CLIQUE, MIN SET COVER, TSP, KNAPSACK, BINPACKING do not have a polynomial.
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.
Transitivity of  poly Theorem: Let ,  ’, and  ’’ be three decision problems such that   poly  ’ and  ’  poly  ’’. Then  poly  ’’. Proof:
CSE 421 Algorithms Richard Anderson Lecture 27 NP Completeness.
Approximation Algorithms Motivation and Definitions TSP Vertex Cover Scheduling.
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
Chapter 12 Coping with the Limitations of Algorithm Power Copyright © 2007 Pearson Addison-Wesley. All rights reserved.
The Traveling Salesman Problem Approximation
University of Texas at Arlington Srikanth Vadada Kishan Kumar B P Fall CSE 5311 Solving Travelling Salesman Problem for Metric Graphs using MST.
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
CSEP 521 Applied Algorithms Richard Anderson Lecture 10 NP Completeness.
CSE 024: Design & Analysis of Algorithms Chapter 9: NP Completeness Sedgewick Chp:40 David Luebke’s Course Notes / University of Virginia, Computer Science.
Princeton University COS 423 Theory of Algorithms Spring 2001 Kevin Wayne Approximation Algorithms These lecture slides are adapted from CLRS.
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness and course wrap up.
WK15. Vertex Cover and Approximation Algorithm By Lin, Jr-Shiun Choi, Jae Sung.
Instructor Neelima Gupta Table of Contents Class NP Class NPC Approximation Algorithms.
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.
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.
CSE 421 Algorithms Richard Anderson Lecture 29 Complexity Theory NP-Complete P.
Approximation Algorithms by bounding the OPT Instructor Neelima Gupta
CSE 421 Algorithms Richard Anderson Lecture 28 Survey of NP Complete Problems NP-Complete P.
Instructor Neelima Gupta Table of Contents Introduction to Approximation Algorithms Factor 2 approximation algorithm for TSP Factor.
CSE 332: NP Completeness, Part II Richard Anderson Spring 2016.
Exhaustive search Exhaustive search is simply a brute- force approach to combinatorial problems. It suggests generating each and every element of the problem.
Approximation algorithms
TU/e Algorithms (2IL15) – Lecture 11 1 Approximation Algorithms.
The Theory of NP-Completeness
More NP-Complete and NP-hard Problems
More NP-complete problems
Richard Anderson Lectures NP-Completeness
Richard Anderson Lecture 26 NP-Completeness
Optimization problems such as
Lecture 2-2 NP Class.
An introduction to Approximation Algorithms Presented By Iman Sadeghi
Richard Anderson Lecture 29 NP-Completeness and course wrap-up
Richard Anderson Lecture 26 NP-Completeness
Hamiltonian Cycle and TSP
Hamiltonian Cycle and TSP
Hard Problems Introduction to NP
Richard Anderson Lecture 25 Min Cut Applications and NP-Completeness
Lecture 5 NP Class.
Great Ideas in Computing Complexity Theory
Computability and Complexity
ICS 353: Design and Analysis of Algorithms
Richard Anderson Lecture 25 NP-Completeness
Richard Anderson Lecture 28 NP-Completeness
Richard Anderson Lecture 29 NP-Completeness
Richard Anderson Lecture 29 Complexity Theory
CSE 421 Richard Anderson Autumn 2016, Lecture 3
Richard Anderson Lecture 30 NP-Completeness
Richard Anderson Lecture 28 NP Completeness
Richard Anderson Lecture 27 NP Completeness
CS 3343: Analysis of Algorithms
Richard Anderson Lecture 26 NP-Completeness
ICS 353: Design and Analysis of Algorithms
The Theory of NP-Completeness
CS154, Lecture 16: More NP-Complete Problems; PCPs
Richard Anderson Lecture 27 Survey of NP Complete Problems
Richard Anderson Lecture 25 NP Completeness
Lecture 24 Classical NP-hard Problems
Lecture 24 Vertex Cover and Hamiltonian Cycle
CSE 421 Richard Anderson Autumn 2019, Lecture 3
Presentation transcript:

Richard Anderson Lecture 28 Coping with NP-Completeness CSE 421 Algorithms Richard Anderson Lecture 28 Coping with NP-Completeness

Announcements Final exam, Review session Monday, December 12, 2:30-4:20 pm Comprehensive (2/3 post midterm, 1/3 pre midterm) Review session Lowe 101 Friday, December 9, 2:30-4:20 Ben and Max

NP Complete Problems Circuit Satisfiability Formula Satisfiability Graph Problems Independent Set Vertex Cover Clique Path Problems Hamiltonian cycle Hamiltonian path Traveling Salesman Partition Problems Three dimensional matching Exact cover Graph Coloring Number problems Subset sum Integer linear programming Scheduling with release times and deadlines

Exact Cover (sets of size 3) XC3 Given a collection of sets of size 3 of a domain of size 3N, is there a sub-collection of N sets that cover the sets {(A, B, C), (D, E, F), (A, B, G), (A, C, I), (B, E, G), (A, G, I), (B, D, F), (C, E, I), (C, D, H), (D, G, I), (D, F, H), (E, H, I), (F, G, H), (F, H, I)} A B C D E F G H I

Number Problems Subset sum problem Subset sum problem is NP-Complete Given natural numbers w1,. . ., wn and a target number W, is there a subset that adds up to exactly W? Subset sum problem is NP-Complete Subset Sum problem can be solved in O(nW) time

XC3 <P SUBSET SUM Idea: Represent each set as a bit vector, then interpret the bit vectors as integers. Add them up to get the all one’s vector. {x3, x5, x9} => 001010001000 Does there exist a subset that sums to exactly 111111111111? Annoying detail: What about the carries?

Integer Linear Programming Linear Programming – maximize a linear function subject to linear constraints Integer Linear Programming – require an integer solution NP Completeness reduction from 3-SAT Use 0-1 variables for xi’s Constraint for clause x1 + (1 – x2) + (1-x3) > 0

Scheduling with release times and deadlines Tasks T1,…,Tn with release time ri, deadline di, and work wi Reduce from Subset Sum Given natural numbers w1,. . ., wn and a target number K, is there a subset that adds up to exactly K? Suppose the sum w1+…+ wn = W Task Ti has release time 0 and deadline W+1 Add an additional task with release time K, deadline K+1 and work 1

Coping with NP-Completeness Approximation Algorithms Exact solution via Branch and Bound Local Search

Multiprocessor Scheduling Unit execution tasks Precedence graph K-Processors Polynomial time for k=2 Open for k = constant NP-complete is k is part of the problem

Highest level first is 2-Optimal Choose k items on the highest level Claim: number of rounds is at least twice the optimal.

Christofides TSP Algorithm Undirected graph satisfying triangle inequality Find MST Add additional edges so that all vertices have even degree Build Eulerian Tour 3 4 4 1 2 5 5 3 6 4 3 4 3 2 6 5

Christophies Algorithm 3 4 3 4 4 4 1 1 2 2 5 5 5 5 3 3 6 6 4 4 3 3 4 3 4 3 2 2 6 5 6 5 3 4 1 2 5 3 4 4 3 2 6

Bin Packing Given N items with weight wi, pack the items into as few unit capacity bins as possible Example: .3, .3, .3, .3, .4, .4

First Fit Packing First Fit First Fit Decreasing Theorem: FF(I) is at most 17/10 Opt(I) + 2 First Fit Decreasing Theorem: FFD(I) is at most 11/9 Opt (I) + 4

Branch and Bound Brute force search – tree of all possible solutions Branch and bound – compute a lower bound on all possible extensions Prune sub-trees that cannot be better than optimal

Branch and Bound for TSP Enumerate all possible paths Lower bound, Current path cost plus MST of remaining points Euclidean TSP Points on the plane with Euclidean Distance Sample data set: State Capitals

Local Optimization Improve an optimization problem by local improvement Neighborhood structure on solutions Travelling Salesman 2-Opt (or K-Opt) Independent Set Local Replacement