This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Approximation Algorithms We have a NPC problem Q . Then it is extremely unlikely Q can be solved in polynomial time. What to do? Just give up? Many NPC problems are natural problems with important applications. We cannot afford to just give up! Many NPC problems are hard to solve if we insist on absolute optimal solution . But if we settle for nearly optimal solutions (for example, within 50 % of optimal), it might be possible to solve Q . In many applications, a nearly optimal solution might be good enough. This is the subject of Approximation Algorithms : Try to find solutions not too far from optimal. c Xin He (University at Buffalo) CSE 431/531 Algorithm Analysis and Design 2 / 44 Approximation Algorithms First we have to define what we mean by “nearly optimal” . If Q is a decision problem, the term approximation makes no sense: The answer is either yes or no . Nothing to be approximated. So we now switch back to optimization problems . c Xin He (University at Buffalo) CSE 431/531 Algorithm Analysis and Design 4 / 44 Approximation Algorithms for Minimization Problems Approximation Algorithm Q : a minimization problem . A : an algorithm for solving Q . I : an instance of Q . Opt ( I ) : the optimal solution of I .  Opt ( I )  : the value of Opt ( I ) . A ( I ) : the solution found by A on input I .  A ( I )  : the value of A ( I ) . If  A ( I )   Opt ( I )  ≤ r for some constant r and for ALL input instances I , then we say “ A is an approximation algorithm for Q with performance ratio r .” c Xin He (University at Buffalo) CSE 431/531 Algorithm Analysis and Design 5 / 44 Example: TSP Example: Q is TSP I : an instance of TSP: Given a complete graph G = ( V , E ) and weight function w ( * ) , find a HC C of G with minimum total length w ( C ) . A : an algorithm for solving TSP. It finds a HC in G , not necessarily with minimum length. Opt ( G , w ) : the optimal solution. Namely an HC of G with minimum length. (Caution: since TSP is NPC , Opt ( G , w ) is unknown! .)  Opt ( G , w )  : the length of Opt ( G , w ) . A ( G , w ) : the solution found by A . Namely, a HC of G found by A .  A ( G , w )  : the length of the HC of G found by A . If  A ( I )   Opt ( I )  ≤ 1 . 5 for ALL input instances I , then we say “ A is an approximation algorithm for TSP with performance ratio 1 . 5 .” So, for any input G , w , A will always find a HC of G within 50% of the optimal length. c Xin He (University at Buffalo) CSE 431/531 Algorithm Analysis and Design 6 / 44 Approximation Algorithms Since we are dealing with minimization problem, the value of A ( I ) is always ≥ the value of Opt ( I ) . So we always have  A ( I )   Opt ( I )  ≥ 1 ....
View
Full Document
 Fall '09
 Algorithms, Travelling salesman problem, Approximation algorithm, optimization problem

Click to edit the document details