260 likes | 441 Views
Input-Dependent and Asymptotic Approximation. Summary. Approximation algorithm for graph coloring Approximation algorithm for set cover Asymptotic approximation scheme for edge coloring. Approximation of graph coloring.
E N D
Summary • Approximation algorithm for graph coloring • Approximation algorithm for set cover • Asymptotic approximation scheme for edge coloring
Approximation of graph coloring • Polynomial-time n/logn-approximation algorithm for MINIMUM GRAPH COLORING begin i:=0; U:=V; while U ødo begin i:=i+1;V[i]:=ø;W:=U;H:=graph induced by W; while W ø do begin v=node of minimum degree in H; insert v inV[i]; delete v and its neighbors from W; U:=U-V[i] end end end.
Proof We first prove that, if G is k-colorable, then the algorithm uses at most 3|V|/logk|V| colors. • At any iteration of the inner loop, H is k-colorable • Hence, it contains an independent set of at least |W|/k nodes of degree at most |W|(k-1)/k • At least |W|/k nodes will be in W at the next iteration • At least logk|W| iterations of the inner loop • |V[i]| is at least logk|U|
Proof (continued) • As long as |U| |V|/logk|V|, logk|U| logk(|V|/logk|V|) (1/2) logk|V| • When |U|<|V|/logk|V|, at most 2|V|/logk|V| colors have been used • To color the remaining nodes|V|/logk|V| colors suffice • That is, the algorithm uses at most 3|V|/logk|V| colors
Proof (end) • The algorithm uses at most |V|/logm*(G)|V|, that is, at most 3nlog(m*(G))/logn colors • The performance ratio is at most 3n/logn
MINIMUM SET COVER • INSTANCE: Collection C of subsets of a finite set S • SOLUTION: A set cover for S, i.e., a subset C’ of C such that every element in S belongs to at least one member of C’ • MEASURE: |C’|
Johnson’s algorithm • Polynomial-time logarithmic approximation algorithm for MINIMUM SET COVER begin U:=S; C’:=ø; for any ci do c’i := ci ; repeat i:=index of c’with maximum cardinality; insert ci in C’; U := U-{elements of c’i }; delete all elements of ci from all c’; untilU:=ø end.
Proof • We prove that the performance ratio of the algorithm is at most ∑1 i k (1/i) where k is the maximum cardinality of the sets in C • Let a1 ,...,a|C’| be the sequence of indices obtained by the algorithm • Let cji be the surviving part of ci before index aj has been chosen • The intersection of ci and cjaj is equal to cji - cj+1i • li denote largest index j such that cji is not empty
First step For any i, H(|ci|) 1 j C’|(|ci Icjaj |/|cjaj|) where H(n)= 1 i n (1/i) Proof 1 j C’|(|ci Icjaj |/|cjaj|)= 1 j C’|(|cji |-|cj+1i |)/|cjaj|) 1 j li(|cji|-|cj+1i|)/|cji|)= 1 j li|cj+1i|+1 k | cji|(1/|cji|) 1 j li 1 k | cji|-|cj+1i|(1/(k+|cj+1i|)) 1 j li(H(|cji|)-H(|cj+1i|)= H(|c1i|)=H(|ci|)
Second step For any set cover C’’, ci C’’ 1 j |C’|(|ci Icjaj |/|cjaj|) |C’| Proof ci C’’ 1 j |C’|(|ci Icjaj |/|cjaj|) = 1 j |C’|(1/|cjaj|) ci C’’|ci Icjaj | 1 j =|C’|(|cjaj|/|cjaj|) = |C’|
Final step H(|ci|) 1 j C’|(|ci Icjaj |/|cjaj|) and ci C* 1 j C’|(|ci Icjaj |/|cjaj|) |C’| imply ciC*H(|ci|) |C’| Since |ci | k, we have that ciC*H(k) |C’| , that is, |C*|H(k) |C’| Since H(k) ln k+1 ln n+1, we have that the performance ratio is logarithmic
MINIMUM EDGE COLORING • INSTANCE: Graph G=(V,E) • SOLUTION: A coloring of E, that is, function f such that, for any pair of edges e1 and e2 that share a common endpoint, f(e1) f(e2) • MEASURE: Number of colors, i.e., cardinality of the range of f
Vizing’s algorithm • Polynomial-time algorithm to color a graph with at most D+1 colors, where D denotes the maximum degree of the graph begin D:=maximum degree of G; G’:=(V, E’:=ø); // G’ is clearly colorable with D+1 colors repeat add an edge (u,v)of E to E’; extend coloring of G’ without (u,v) into coloring of G’ with at most D+1 colors; E := E-{(u,v)}; until E:=ø end.
Asymptotic approximation scheme • The algorithm returns an edge-coloring with at most D+1 colors • The optimum is at least D • Hence, performance ratio is at most (D+1)/m*(G) D/D+1/m*(G)=1+ 1/m*(G) • It implies a 2-approximation
Proof • Assume G’ without (u,v) has an edge-coloring with at most D+1 colors • Let µ(v) denote the set of colors that are not used to color an edge incident to v • Clearly, if the coloring uses D+1 colors, then for any v, µ(v)ø: let c(v) be one of the colors in µ(v)
Proof (continued) • Compute in polynomial-time a sequence of edges (u,x[0]),...,(u,x[s]) such that: • x[0]=v • for any i, the color of (u,x[i]) = c(x[i-1]) • there is no other edge (u,w) such that its color is equal to c(x[s])
First case: c(x[s]) is in µ(u) • In this case, we can simply shift the colors of the sequence in order to obtain the new coloring of G’ • That is, for any i, we color (u,x[i]) with c(x[i])
Second case: c(x[s]) is not in µ(u) • In this case, one edge (u,x[i]) must have been colored with c(x[s]) (since the sequence is maximal) • Hence, c(x[i-1]) = c(x[s]) • We compute in polynomial time a path Pi-1 starting from x[i-1] formed by edges whose colors are, alternatively, c(u) and c(x[s])
First subcase: Pi-1does not end in u • Interchange colors c(u) and c(x[s]) in the path, assign color c(u) to (u,x[i]), shift the colors of the subsequence of edges preceding (u,x[i-1])
Second subcase: Pi-1 ends in u • Compute in polynomial time a path Ps starting from x[s] formed by edges whose colors are, alternatively, c(u) and c(x[s]) • Ps does not end in u
Interchange colors c(u) and c(x[s]) in Ps, assign color c(u) to (u,x[s]), and shift the colors of the subsequence of edges preceding (u,x[s])
Class F-APX • Let F be a class of functions • The class F -APX contains all NPO problems P that admit a polynomial-time algorithm A such that, for any instance x of P, R(x, A(x))) f(|x|), for a given function fF • P is said to be f(n)-approximable • A is said to be an f(n)-approximation algorithm
Class APTAS • The class APTAS contains all NPO problems P that admit a polynomial-time algorithm A and a constant k such that, for any instance x of P and for any rational r, R(x, A(x,r))) r+k/m*(x) • The time complexity of A is polynomial in |x| but not necessarily in 1/(r-1) • A is said to be an asymptotic approximation scheme • A is clearly a (r+k)-approximation algorithm
The NPO world NPO O(n)-APX MINIMUM GRAPH COLORING O(logn)-APX MINIMUM SET COVER MAXIMUM SAT MINIMUM VERTEX COVER MAXIMUM CUT APX APTAS MINIMUM EDGE COLORING PTAS MINIMUM PARTITION PO MINIMUM PATH