1 / 43

Chapter 2 Greedy Strategy

Chapter 2 Greedy Strategy. I. Independent System. Max Weight Hamiltonian Cycle (M AX -HC). Given an edge-weighted complete graph, find a Hamiltonian cycle with maximum total weight. Greedy Strategy : Select max-weight edge that forms a partial HC (i.e., a subgraph of degree at most 2)

yates
Download Presentation

Chapter 2 Greedy Strategy

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. Chapter 2 Greedy Strategy I. Independent System

  2. Max Weight Hamiltonian Cycle(MAX-HC) • Given an edge-weighted complete graph, find a Hamiltonian cycle with maximum total weight. • Greedy Strategy: Select max-weight edge that forms a partial HC (i.e., a subgraph of degree at most 2) • What is the performance of this greedy algorithm? Answer: p.r. = 2

  3. Lemma • Consider a subset F of edges. For any two maximal subsets I and J of F of degrees at most 2, |J| < 2|I|

  4. How to use this lemma to get p.r. < 2? Note |J| < 2 |I| is about the number of edges in I and J, without considering their weights. However, by Greedy Strategy, edges in I are supposed to be the ones with the maximum weights. So, total weight in J is at most twice of the total weight in I. Formal proof: use Independent Systems.

  5. Max and Min • Min f is equivalent to Max –f. • However, a good approximation for Min f may not be a good approximation for Max –f. • For example, consider a graph G=(V,E). C is a minimum vertex cover of G if and only if V-C is a maximum independent set of G. The minimum vertex cover has a polynomial-time 2-approximation, but the maximum independent set has no constant-bounded approximation unless NP=P.

  6. Analysis of Greedy Strategy for Max and Min Problems • Max --- Independent Systems • Min --- Submodular Potential Functions

  7. Independent System • Consider a set E and a collection C of subsets of E. (E,C) is called an independent system if • A member A of C is called an independent subset.

  8. Maximization Find an independent subset with the max weight + • c: E→R max c(A) s.t. AεC • c(A) = ΣxεAc(x)

  9. Greedy Approximation MAX

  10. Theorem (Here, u(F) and v(F) are different from those of the textbook.)

  11. Proof

  12. Back to MAX-HC • Given an edge-weighted complete graph, find a Hamiltonian cycle with maximum total weight.

  13. Independent sets • E = {all edges} • A subset of edges is independent if it is a Hamiltonian cycle or a vertex-disjoint union of paths. • Our lemma shows that for any two maximal independent sets I, J of any F, |J| < 2 |I|. • So, u(F) < 2 v(F).

  14. Maximum Weight Directed Hamiltonian Cycle • Given an edge-weighted complete digraph, find a Hamiltonian cycle with maximum total weight. • Performance ratio = 3.

  15. Independent sets • E = {all edges} • A subset of edges is independent if it is a directed Hamiltonian cycle or a vertex-disjoint union of directed paths.

  16. Tightness ε 1 1 1 1+ε

  17. Matroid • An independent system (E,C) is called a matroid if for any subset F of E, u(F)=v(F). Theorem An independent system (E,C) is a matroid iff for any cost function c( ), the greedy algorithm MAX gives a maximum solution.

  18. Sufficiency

  19. Example 1 (of Matroids)

  20. Proof

  21. Example 2 E = a finite set of vectors C = the family of linearly independent subsets of E Then, (E,C) is a matroid, because all maximal independent subset of a subset F have the same size rank(F).

  22. Example 3. Graph Matroid • Let G=(V,E) be a graph, and C the family of edge sets of acyclic subgraphs of G. • Then, (E,C) is a matroid. • Note: A maximal indep set in F (subset of E) is just the family of MSTs of subgraph H=(V,F).

  23. Theorem • Every independent system is an intersection of a finite number of matroids.

  24. Circuit • A minimal dependent set is called a circuit. • Let A1, …, Ak be all circuits of independent system (E,C). • Let

  25. Theorem • If independent system (E,C) is the intersection of k matroids (E,Ci), then for any subset F of E, u(F)/v(F) <k.

  26. Proof

  27. Applications • Many combinatorial optimization problem can be represented as an intersection of matrods. (see Lawler: Combinatorial Optimization and Matroid.)

  28. Max-DHP (revisited) • The independent system of MAX-DHP (E,C) is the intersection of the following matroids: • C1 : All subgraphs with all out-degrees < 1. • C2 : All subgraphs with all in-degrees < 1. • C3 : All subgraphs that do not have a cycle (ignoring the edge direction). (Graph matroid) • It follows that the greedy algorithm for Max-DHP has p.r. 3

  29. Quadrilateral Condition • If c satisfies the following condition: Then the greedy approximation for MAX-DHC has performance ratio 2.

  30. u v’ u’ v

  31. Superstring • Given n strings s1, s2, …, sn, find a shortest string s containing all s1, s2, …, sn as substrings. • No si is a substring of another sj.

  32. Overlap • |ov(u,v)| = max{|w| | there exist x and y such that u=xw and v=wy} • Overlapping graph is a complete directed digraph: V = {s1, s2, …, sn} |ov(si, sj)| is edge weight.

  33. Hamiltonian Path

  34. The quadrilateral condition u’ v u v’

  35. Theorem • The Greedy approximation MAX for maximum Hamiltonian path in overlapping graph has performance ratio 2. • So, ||S|| - |s*| < 2 (||S|| - |sG|), where ||S|| is the total length of all strings. • Conjecture: |s*| < 2 |sG|

More Related