WINSEM2015-16_CP2075_12-APR-2016_RM03_Approximation algorithms for NP-complete problems_definitions_ - Design and Analysis of Algorithms Approximation

# WINSEM2015-16_CP2075_12-APR-2016_RM03_Approximation algorithms for NP-complete problems_definitions_

• 41

This preview shows page 1 - 9 out of 41 pages.

Design and Analysis of AlgorithmsApproximation algorithms for NP-complete problems 2Coping With NP-HardnessBrute-force algorithms.Develop clever enumeration strategies.Guaranteed to find optimal solution.No guarantees on running time.Heuristics.Develop intuitive algorithms.Guaranteed to run in polynomial time.No guarantees on quality of solution.Approximation algorithms.Guaranteed to run in polynomial time.Guaranteed to find "high quality" solution, say within 1% of optimum.Obstacle: need to prove a solution’s value is close to optimum,without even knowing what optimum value is! 3Approximate Algorithms (chap. 35)Motivation:Many problems are NP-complete, so unlikely find efficient algorithmsThree ways to get around:If input size is small, exponential algorithm is OK.Isolate important special case and find poly algorithms for them.Find near-optimal solutions in poly time. So approximate algorithms:An algorithm returning a near-optimal solution is called approximate algorithm. Some Characteristics of Approximation AlgorithmsTime-efficient (sometimes not as efficient as heuristics)Don’t guarantee optimal solutionGuarantee good solution within some factor of the optimum Rigorous mathematical analysis to prove the approximation guaranteeOften use algorithms for related problems as subroutines- Depending on the problem , an optimal solution may be defined as the problem of maximization or minimization problem. Approximation algorithms for NPC problemsIf a problem is NP-complete, there is very likely no polynomial-time algorithm to find an optimal solutionThe idea of approximation algorithms is to develop polynomial-time algorithms to find a near optimal solution Approximation algorithms for NPC problemsE.g.: develop a greedy algorithm without proving the greedy choice property and optimal substructure.Are those solution found near-optimal?How near are they? Approximation algorithms for NPC problemsApproximation ratio C*-Define the cost of the optimal solution as C*C- The cost of the solution produced by a approximation algorithm is CThe approximation algorithm is then called a -approximation algorithm. Approximation algorithms for NPC problemsE.g.:If the total weigh of a MST of graph G is 20A algorithm can produce some spanning trees, and they are not MSTs, but their total weights are always smaller than 25What is the approximation ratio?  • • • 