Approximation Algorithms Motivation and Definitions TSP Vertex Cover Scheduling.

Slides:



Advertisements
Similar presentations
Design and Analysis of Algorithms Approximation algorithms for NP-complete problems Haidong Xue Summer 2012, at GSU.
Advertisements

Great Theoretical Ideas in Computer Science for Some.
Lecture 24 Coping with NPC and Unsolvable problems. When a problem is unsolvable, that's generally very bad news: it means there is no general algorithm.
Approximation Algorithms for TSP
1 The TSP : Approximation and Hardness of Approximation All exact science is dominated by the idea of approximation. -- Bertrand Russell ( )
NP-Complete Problems Polynomial time vs exponential time
Combinatorial Algorithms
Lecture 21 Approximation Algorithms Introduction.
Complexity 16-1 Complexity Andrei Bulatov Non-Approximability.
Great Theoretical Ideas in Computer Science.
Computability and Complexity 23-1 Computability and Complexity Andrei Bulatov Search and Optimization.
1 Discrete Structures & Algorithms Graphs and Trees: II EECE 320.
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 Algorithms1. 2 Outline and Reading Approximation Algorithms for NP-Complete Problems (§13.4) Approximation ratios Polynomial-Time Approximation.
1 Approximation Algorithms CSC401 – Analysis of Algorithms Lecture Notes 18 Approximation Algorithms Objectives: Typical NP-complete problems Approximation.
1 Vertex Cover Problem Given a graph G=(V, E), find V' ⊆ V such that for each edge (u, v) ∈ E at least one of u and v belongs to V’ and |V’| is minimized.
1 Assignment 4. This one is cancelled since there is a solution on website. I new assignment will be given on Nov. 28. (Due on Friday of Week 14. Drop.
Approximation Algorithms for the Traveling Salesperson Problem.
Job Scheduling Lecture 19: March 19. Job Scheduling: Unrelated Multiple Machines There are n jobs, each job has: a processing time p(i,j) (the time to.
1 NP-Complete Problems Polynomial time vs exponential time –Polynomial O(n k ), where n is the input size (e.g., number of nodes in a graph, the length.
NP-Complete Problems (Fun part)
1 Combinatorial Dominance Analysis Keywords: Combinatorial Optimization (CO) Approximation Algorithms (AA) Approximation Ratio (a.r) Combinatorial Dominance.
Vertex cover problem S  V such that for every {u,v}  E u  S or v  S (or both)
9-1 Chapter 9 Approximation Algorithms. 9-2 Approximation algorithm Up to now, the best algorithm for solving an NP-complete problem requires exponential.
Approximation Algorithms Ola Svensson. Course Information Goal: – Learn the techniques used by studying famous applications Graduate Course FDD
Hardness Results for Problems
1 NP-Complete Problems (Fun part) Polynomial time vs exponential time –Polynomial O(n k ), where n is the input size (e.g., number of nodes in a graph,
Approximation Algorithms
1 Chapter 11 Approximation Algorithms Slides by Kevin Wayne Pearson-Addison Wesley. All rights reserved.
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
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 The TSP : NP-Completeness Approximation and Hardness of Approximation All exact science is dominated by the idea of approximation. -- Bertrand Russell.
1 Approximation Algorithm Instructor: yedeshi
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
Advanced Algorithm Design and Analysis (Lecture 13) SW5 fall 2004 Simonas Šaltenis E1-215b
Great Theoretical Ideas in Computer Science.
Approximation Algorithms
1 Combinatorial Algorithms Parametric Pruning. 2 Metric k-center Given a complete undirected graph G = (V, E) with nonnegative edge costs satisfying the.
DP TSP Have some numbering of the vertices We will think of all our tours as beginning and ending at 1 C(S, j) = length of shortest path visiting each.
Princeton University COS 423 Theory of Algorithms Spring 2001 Kevin Wayne Approximation Algorithms These lecture slides are adapted from CLRS.
CSCI 3160 Design and Analysis of Algorithms Chengyu Lin.
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
Unit 9: Coping with NP-Completeness
Projects Network Theory VLSI PSM 1. Network 1. Steiner trees
WK15. Vertex Cover and Approximation Algorithm By Lin, Jr-Shiun Choi, Jae Sung.
Approximation Algorithms for TSP Tsvi Kopelowitz 1.
1 Approximation algorithms Algorithms and Networks 2015/2016 Hans L. Bodlaender Johan M. M. van Rooij TexPoint fonts used in EMF. Read the TexPoint manual.
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.
Approximation Algorithms by bounding the OPT Instructor Neelima Gupta
Instructor Neelima Gupta Table of Contents Introduction to Approximation Algorithms Factor 2 approximation algorithm for TSP Factor.
Approximation algorithms
TU/e Algorithms (2IL15) – Lecture 11 1 Approximation Algorithms.
Approximation Algorithms
Optimization problems such as
Approximation Algorithms
Hamiltonian Cycle and TSP
Hamiltonian Cycle and TSP
Great Theoretical Ideas in Computer Science
Approximation Algorithms
Computability and Complexity
Approximation Algorithms for TSP
Discrete Mathematics for Computer Science
Richard Anderson Lecture 28 Coping with NP-Completeness
Approximation Algorithms
Approximation Algorithms
Lecture 24 Vertex Cover and Hamiltonian Cycle
Presentation transcript:

Approximation Algorithms Motivation and Definitions TSP Vertex Cover Scheduling

Motivation Consider an NP-hard optimization problem like TSP –Input: n cities, pairwise distances d(i,j) –Task: find a tour of minimum length Given this is NP-hard, we are unlikely to find an optimal solution in polynomial time. What are our options? –Give up –Try to build the fastest possible algorithm that returns an optimal solution –Find a polynomial-time algorithm that returns good solutions that are “approximately” optimal. This is the option we focus on today.

Definitions For any input instance I, –let OPT(I) denote both the optimal solution and the value of the optimal solution –let A(I) denote both an approximate solution and the value of the approximate solution generated by running polynomial-time algorithm A. So what do we mean by a good solution that is “approximately” optimal (for a minimization problem)? Additive approximation –For any input I, A(I) ≤ OPT(I) + c for some constant c. Multiplicative approximation –For any input I, A(I) ≤ c OPT(I) for some constant c.

Are both approximations possible? Consider the TSP problem –Suppose c = 3. –Additive: if OPT(I) = 10, then APPROX(I) ≤ 13. If OPT(I 2 ) = 100, then APPROX(I) ≤ 103. –Multiplicative: if OPT(I) = 10, then APPROX(I) ≤ 30. If OPT(I 2 ) = 100, then APPROX(I) ≤ 300. –Argue that at least one of these approximations is impossible unless we can solve TSP optimally in polynomial time. –Hint: think about scaling the integers in your input. –Is the other approximation possible for TSP?

Definitions II Because we typically cannot achieve additive approximation due to scaling, we try to get multiplicative approximation For a minimization problem, an algorithm is a c- approximation algorithm if for all inputs I, –A(I) ≤ c OPT(I) For a maximization problem, an algorithm is a c- approximation algorithm if for all inputs I, –A(I) ≥ 1/c OPT(I) Approximation goal: for an NP-hard optimization problem, find a polynomial time algorithm that is a c-approximation algorithm for the smallest c possible.

Example Problems TSP –general TSP –metric TSP Vertex cover Scheduling

TSP We showed earlier there can be no additive approximation algorithm unless P=NP Show now that for any constant c, there can be no c-approximation algorithm for TSP unless P=NP Hint: show that if there is a c-approximation algorithm for some constant c, then Hamiltonian circuit can be solved in polynomial time

Metric TSP In the metric TSP, the city distances must satisfy a triangle inequality. –For any 3 cities i, j, k, it must be the case that d(i,j) ≤ d(i,k) + d(k,j) Observe how our previous argument violates this triangle inequality Show how to come up with a c-approximation algorithm for TSP based on a minimum spanning tree What value of c can you come up with?

Cristofides Improvement Start with MST T as before Identify nodes with odd degree Find a minimum weight matching M on these nodes Now compute an Euler tour of the graph of T union M (with shortcuts to prevent visiting an edge twice) This solution is guaranteed to have length at most 3/2.

Vertex Cover Input: Graph G = (V,E) Task: Find C subset of V of minimum size such that for each edge (u,v) in E, either u is in C or v is in C This can be as bad as Θ(lg n) –Hint: make a bipartite graph –Make x nodes in one set all have the same max degree –May y nodes in other set have varying degrees –Greedy picks all the y nodes (with bad tie-breaking), optimal picks all the x nodes

Vertex Cover Better solution –Find a maximal matching M in G Matching: set of edges in G that do not share any common vertices Maximal matching: No edges can be added to the matching to produce a larger matching –Return as C all the nodes in edges in M What approximation ratio does this guarantee and why?

Scheduling Input: –Set of m identical machines –Set of n jobs with length p i Task: Assign the n jobs to the m machines with the goal of minimizing the maximum total length of jobs assigned to any one machine Greedy strategy –Take the jobs one by one in any order –Assign the current job to the currently least loaded machine –What approximation bound can be derived? –What if we sort the jobs first? Should we do longest or shortest first?

Scheduling Greedy strategy –Take the jobs one by one in any order –Assign the current job to the currently least loaded machine What approximation bound can be derived? –Lower bounds on OPT What bounds can we derive on the best schedule? How can we relate this algorithm’s schedule to OPT’s?