1 / 53

z-Approximations

z-Approximations. Refael Hassin Samir Khuller. 吳晉賢 D90922003 馬德文 R90922004 李耘天 R90922003. Introduction. 傳統分析方法 傳統分析方法的困境 新的分析方法. 傳統分析方法. OPT 是針對 NP problem 的最佳解. C 假設是我們 approximation algo. 所求的 cost. 求最大值 C >= (1- )*OPT (0< <1) 求最小值

fleta
Download Presentation

z-Approximations

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. z-Approximations Refael Hassin Samir Khuller 吳晉賢 D90922003 馬德文 R90922004 李耘天 R90922003

  2. Introduction • 傳統分析方法 • 傳統分析方法的困境 • 新的分析方法

  3. 傳統分析方法 • OPT 是針對NP problem的最佳解. • C 假設是我們approximation algo. 所求的cost. • 求最大值 C >= (1-)*OPT (0< <1) • 求最小值 C <= (1+)*OPT (0< <1)

  4. 傳統分析方法的困境 • 不好的approximation會被以為是好的approximation,像vertex cover,用maximum matching找到的有可能是所有的vertices. • 有些NP的問題用傳統方法會找不到-approximation,像 generic TSP,如果找的到的話,則NP=P.

  5. 新的分析方法 • 以前都是跟最佳解來做比較,看是否能在最佳解的  倍以內. (0< <1) • 假設我們可以找到一個best sol’n跟一個worst sol’n,則我們的approximation algo.所產生的cost是用來跟best sol’n的cost跟worst sol’n的cost間來比較,則這是我們新的評估方法.

  6.   z-Approximation (新的分析法) • 以求最大值為例 worst sol’n OPT best 有些問題找不到-approximation,像generic TSP,但是根據新的分析法,我們可以找到 z-approximation

  7. z-Approximation for minimization problems c(S)是我們所求的一個解的cost c(best)是找出來的一個很好的解的cost c(worst)是找出來的一個很差的解的cost =>

  8. z-Approximation for maximization problems c(S)是我們所求的一個解的cost c(best)是找出來的一個很好的解的cost c(worst)是找出來的一個很差的解的cost =>

  9. z-Approximation for some NP problems • TSP ½ z-Approximation for directed graph. 1/3 z-Approximation for undirected graph. • Max cut and Min cluster ½(n/n-2) z-Approximation. (n是點的個數) • Minimum disjoint cycle cover 1/3 z-Approximation • Minimum dominating set ½ z-Approximation

  10. ½ z-approximation ~ Directed TSP • Input : Directed Complete Graph G = (V, A) with weights c( i, j ) . • Output : minimum cost simple cycle on V.

  11. Facts ~ Christofides ‘76 • The well known algorithm which guarantee bounded ratio (3/2) approximations for the minimum (metric) TSP on undirected may still output worst solutions on such instances.

  12. Facts ~ Christofides ‘76 For example, consider a complete graph with unit length edges for all but a single edge whose length is two. 1 1 1 1 k+1

  13. Cycle cover • Cycle Cover is a set of vertex disjoint cycles which span the vertex set. • A minimum cost cycle cover can be computed in P-time in the directed case by reducing to the assignment problem.

  14. Algorithm • Step 1 Compute a minimum cost directed cycle cover DCC. It contains a single cycle return this cycle (it is an optimal tour). Otherwise, arbitrarily fix a cyclic order of the cycles in DCC. Denote the cycles in the order fixed above as

  15. Algorithm • Step 2 Randomly choose a vertex . Index the vertices of starting from in the dictated by the cycle’s orientation, as

  16. Algorithm • Step 3 Let denote the sequence of vertices between starting from p in the direction dictated by the orientation of . Step 4 Return the tour which visits the vertices in the order of .

  17. Analysis • Q1. P-time? All steps including the generation of DCC only consume P-time. It is right! Q2. Is it feasible? The DCC is a set of vertex disjoint cycles which span the vertex set and this algorithm has only modified these cycles to a single one without any replication of vertices.

  18. Analysis • Q3. Approximation ratio? Let denote the expected cost of the solution , we want to prove that Remind that the z-approximation for the min. problem

  19. Analysis

  20. Analysis Consider a tour denote the expected cost of

  21. Analysis

  22. Analysis • delete an arc from each cycle and added an arc from each cycle to its successor. • delete two arcs in each cycle and added two arcs from each cycle to its successor.

  23. Analysis

  24. Analysis

  25. Analysis • Since each arc in a cycle has the same probability of being deleted and each arc from a given cycle to its successor has the same probability of being used. Therefore, Then,

  26. Analysis • Derandomized to the the deterministic ½z – approximation. Applying the method of conditional expectations, we first choose the arc to be deleted from to satisfy:

  27. Analysis

  28. Analysis • The same idea for the following cycles. • And the last cycle…

  29. Analysis • There is 1/3 z-approximation for the undirected TSP. • In the undirected case a cycle cover is also called a binary 2-matching problem… This can also be obtained in polynomial time!

  30. Analysis The main difference is that each cycle in a cycle cover in an undirected graph has size at least three, whereas in the directed case, each cycle in the cycle cover has size at least two. (multigraph is not allowed for the undirected case)

  31. Analysis • In the undirected case, we can perform an extra exchange operation to swap another edge from each cycle, thus creating a bad solution from the cycle by using two sets of swaps. So, Then,

  32. Analysis • If there is a polynomial time algorithm that for any fixed yields an z – approximation for TSP then P = NP.

  33. Analysis Proof. If so, it finds a solution S with cost at most Then,

  34. Analysis • Note that the TSP with distances between vertices being either 1 or 2 (called ½ TSP) is MAX SNP-hard. (Proved by C.H. Papadimitriou and M. Yannakakis, Mathematics of Operations Research, 1993) • This implies that there is a PTAS for ½ TSP, which in turn implies that P = NP.

  35. MAX-CUT and MIN-CLUSTER • Input: a graph with non-negative edge weights. • Output: two non-empty sets so that the total weight of edges with end vertices in different sets is maximized. • Facts: many ½-approx algorithms • Remember the 0.87856…-approx?

  36. Algorithm • Find one maximal cutSapx and output it.

  37. Analysis(1) • Q1: Polynomial time? • A1: Maximal matching can be done in O(|E|). • Q2: Feasible? • A2: It is a cut told by the algorithm.

  38. Analysis(2) • Q3: n/2(n-2) z-approx? • A3: Assume |V| = n. • c(Smax) <= c(G) (maximum value is total cost of the graph) • c(Smin) <= 2c(G) / n (minimum value must be less than the expected value, which for any vertex, is 2c(G) / n) • c(Sapx) >= c(G) / 2 (every edge is considered in the procedure for finding the maximal matching!!)

  39. Analysis(3) • From above, c(Sapx) >= c(G)/2 = (nc(G) – 2c(G)) / (2n – 4)) = (c(G) – 2c(G)) / (n – 2)) + (nc(G) – (n / 2)c(G)) / (n – 2) = c(G) / (n – 2) + (n – 2)c(G) / (n – 2) – (n / 2)c(G) / (n – 2) = (n / 2(n – 2)) * (2c(G) / n) + (1 – n / 2(n – 2)) * c(G) >= (n / 2(n – 2)) * c(Smin) + (1 – n / 2(n – 2)) * c(Smax) • Let α= n / 2(n – 2), then c(Sapx) >= αc(Smin) + (1 – α)c(Smax) so we know it is an α z-approx

  40. Minimum Disjoint Cycle Cover • Input: an undirected graph G=(V, E). • Output: a set of vertex disjoint cycles of minimum cardinality, that span V.

  41. Algorithm • Construct a complete graph H with vertex set V and weights • w(i, j) = 1, if i = j • w(i, j) = 0, if (i, j) belongs to E, i <> j • w(i, j) = |V| + 1, if (i, j) not belongs to E, i <> j • Compute a minimum cost cycle coverC in H. • Output C.

  42. Analysis(1) • Q1: Polynomial time? • A1: Undirected minimum cost cycle cover is also called binary 2-matching. This can be obtained in polynomial time through LP.  Integer and Combinatorial Optimization. • Q2: Feasible? • A2: It is a cycle cover, told by its name.

  43. Analysis(2) • Q3: 1/3 z-approx? • A3: Denote the number of cycles in C by apx. • apx1: the number of cycles with a single vertex • apx2: the number of cycles with more than 1 vertex • Denote the number of cycles in one optimal solution by opt, and define opt1, opt2 as above.

  44. Analysis(3) • Since |V| = apx1 + Σi = 1…apx2ni (ni : number of vertices in cycle i of apx2) >= apx1 + 3apx2 (number of vertices in any cycle >= 3), apx2 <= (|V| - apx1) / 3. • And, since apx1 + apx2 = apx = w(C) <= w(opt) = opt1, apx2 = 0, apx1 <= opt1. • Also, c(Smin) >= opt1 and c(Smax) = |V| = n.

  45. Analysis(4) • From above, c(Sapx) = apx = apx1 + apx2 <= apx1 + (n – apx1) / 3 = n / 3 + 2apx1 / 3 <= n / 3 + 2opt1 / 3 <= n / 3 + 2c(Smin) / 3 = c(Smax) / 3 + 2c(Smin) / 3 = (1 – 1 / 3) * c(Smin) + 1 / 3 * c(Smax) • Let α = 1 / 3, then c(Sapx) <= (1 – α)c(Smin) + αc(Smax) so we know it is an α z-approx.

  46. Minimum Dominating Set • Input: a graph G=(V, E). • Output: a subset U belong to (or equal to) V such that every vertex in V\U has at least one neighbor in U. • Facts: • special case of SET COVER (O(log|V|)-approx) • no constant performance guarantee unless P=NP.

  47. Algorithm • Assumption: the graph is connected. • Construct a bipartition through any spanning tree. That is, put the vertices belong to odd levels in one side and those to even levels in the other side. • Choose the smaller part and output it.

  48. Analysis(1) • Q1: Polynomial time? • A1: spanning trees can be found in O(|V|). • Q2: Feasible? • A2: since it is a spanning tree, any vertices are connected; and in the bipartition, every vertex in V\U has at least one neighbor in U.

  49. Analysis(2) • Q3: ½ z-approx? • A3: Let c(Sapx) be the number of vertices output by the algorithm. • c(Sapx) <= |V| / 2 (choose the smaller part of the bipartition) • c(Smax) = |V| • c(Smin) = 0

  50. Analysis(3) • c(Sapx) <= |V| / 2 = |V| / 2 + 0 / 2 = c(Smax) / 2 + c(Smin) / 2 = (1 – 1 / 2) * c(Smin) + 1 / 2 * c(Smax) • Let α = 1 / 2, then c(Sapx) <= (1 – α) * c(Smin) + 1 / 2 * c(Smax) so we know it is an α z-approx.

More Related