Spring 2003 Approximation Algorithmes 5 Performance ratios In Maximization

# Spring 2003 approximation algorithmes 5 performance

• 12

This preview shows page 5 - 12 out of 12 pages.

Spring 2003Approximation Algorithmes5 Performance ratios …In Maximization problems:0<C≤C* , ρ(n) = C*/CIn Minimization Problems:0<C*≤C , ρ(n) = C/C*ρ(n) is never less than 1. A 1-approximation algorithm is the optimal solution.The goal is to find a polynomial-time approximation algorithm with small constant approximation ratios.Spring 2003Approximation Algorithmes6 Some examples:Vertex cover problem.Traveling salesman problem.Set cover problem.Spring 2003Approximation Algorithmes7 Traveling salesman problemGiven an undirected weighted Graph G we are to find a minimum cost Hamiltonian cycle.Satisfying triangle inequality or not this problem is NP-Complete.We can solve Hamiltonian path.Spring 2003Approximation Algorithmes8 Traveling salesman problemNear Optimal solutionFasterMore easy to impliment.Spring 2003Approximation Algorithmes9 Traveling salesman problem with triangle inequality.APPROX-TSP-TOUR(G, c)1 select a vertex rЄV[G] to be root.2 compute a MSTfor Gfrom root r using Prim Alg.3 L=list of vertices in preorder walk of that MST.4 returnthe Hamiltonian cycle Hin the order L.Spring 2003Approximation Algorithmes10 Traveling salesman problem with triangle inequality.Spring 2003Approximation Algorithmes11rootMSTPre-Order walkHamiltonian Cycle Traveling salesman problemThis is polynomial-time 2-approximation algorithm. (Why?)Because:APPROX-TSP-TOUR is O(V2)C(MST) ≤ C(H*)C(W)=2C(MST)C(W)≤2C(H*)C(H)≤C(W)C(H)≤2C(H*)Spring 2003Approximation Algorithmes12OptimalPre-orderSolution • • • 