Download presentation
Presentation is loading. Please wait.
1
Approximation algorithms
Given minimization problem (e.g. min vertex cover, TSP,…) and an efficient algorithm that always returns some feasible solution. The algorithm is said to have approximation ratio if for all instances, cost(sol. found)/cost(optimal sol.)
2
Approximation algorithms
Given maximization problem (e.g. MAXSAT, MAXCUT) and an efficient algorithm that always returns some feasible solution. The algorithm is said to have approximation ratio if for all instances, cost(optimal sol.)/cost(sol. found)
3
General design/analysis trick
Our approximation algorithm often works by constructing some relaxation providing a lower bound and turning the relaxed solution into a feasible solution without increasing the cost too much. The LP relaxation of the ILP formulation of the problem is a natural choice. We may then round the optimal LP solution.
4
Not obvious that it will work….
5
Min weight vertex cover
Given an undirected graph G=(V,E) with non- negative weights w(v) , find the minimum weight subset C ⊆ V that covers E. Min vertex cover is the case of w(v)=1 for all v.
6
ILP formulation Find (xv)v ∈ V minimizing wv xv so that xv ∈ Z
For all (u,v) ∈ E, xu + xv ≥ 1.
7
LP relaxation Find (xv)v ∈ V minimizing wv xv so that xv ∈ R
For all (u,v) ∈ E, xu + xv ≥ 1.
8
Relaxation and Rounding
Solve LP relaxation. Round the optimal solution x* to an integer solution x: xv = 1 iff x*v ≥ ½. The rounded solution is a cover: If (u,v) ∈ E, then x*u + x*v ≥ 1 and hence at least one of xu and xv is set to 1.
9
Quality of solution found
Let z* = wv xv* be cost of optimal LP solution. wv xv ≤ 2 wv xv*, as we only round up if xv* is bigger than ½. Since z* ≤ cost of optimal ILP solution, our algorithm has approximation ratio 2.
10
Relaxation and Rounding
Relaxation and rounding is a very powerful scheme for getting approximate solutions to many NP-hard optimization problems. In addition to often giving non-trivial approximation ratios, it is known to be a very good heuristic, especially the randomized rounding version. Randomized rounding of x ∈ [0,1]: Round to 1 with probability x and 0 with probability 1-x.
11
Min set cover Given set system S1, S2, …, Sm ⊆ X, find smallest possible subsystem covering X.
12
Min set cover vs. Min vertex cover
Min set cover is a generalization of min vertex cover. Identify a vertex with the set of edges adjacent to the vertex.
13
Greedy algorithm for min set cover
14
Approximation Ratio Greedy-Set-Cover does not have any constant approximation ratio Even true for Greedy-Vertex-Cover! Quick analysis: Approximation ratio ln(n) Refined analysis: Approximation ratio Hs where s is the size of the largest set and Hs = 1/1 + 1/2 + 1/ /s is the s’th harmonic number. s may be small on concrete instances. H3 = 11/6 < 2.
15
Approximation Schemes
Some optimization problems can be approximated very well, with approximation ratio 1+ for any >0. An approximation scheme takes an additional input, >0, and outputs a solution within 1+ of optimal.
16
PTAS and FPTAS An approximation scheme is a Polynomial Time Approximation Scheme, if for every fixed >0, the algorithm runs in polynomial time in the input length n. An approximation scheme is a Fully Polynomial Time Approximation Scheme, if the algorithm runs in time polynomial in n and in 1/.
17
Knapsack problem Given n items with weights w1,...,wn , values v1,...,vn and weight limit W, fit items within weight limit maximizing total value.
18
FPTAS for Knapsack From tutorials: We have a pseudo-polynomial time algorithm for Knapsack in time O(n2V), where V is largest value. We use this in step 4.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.