VIEWS: 12 PAGES: 40 CATEGORY: Education POSTED ON: 9/3/2009 Public Domain
Chapter 2 Greedy Strategy I. Independent System Ding-Zhu Du Max and Min • Min f is equivalent to Max –f. • However, a good approximation for Min f may not be a good approximation for Min –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 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. Greedy for Max and Min • Max --- independent system • Min --- submodular potential function Independent System • Consider a set E and a collection C of subsets of E. (E,C) is called an independent system if A B, B C A C Maximization + • c: E→R max c(A) s.t. AεC • c(A) = ΣxεA c(x) Greedy Approximation MAX Sort all elements in E into ordering c( x1) c( x 2) c( xn). A ; for i 1 to n do if A {xi} C hen A A {xi}; t output A. Theorem Let AG be obtained by the Greedy Algorithm. Let A * be an optimal solution. Then c( A*) u(F ) max F E c( AG ) v( F ) whereu ( F ) is the maximum size of independent set in F and v( F )is the minimum size of maximal independent set in F . Proof Denote Ei {x1, ..., xi}. c( AG ) n c( x1) | E1 AG | c( xi )(| Ei AG | | Ei 1 AG |) i 2 n 1 | Ei AG | (c( xi ) c( xi 1)) | En AG | c( xn) i 1 Similarly, c( A*) n 1 | Ei A* | (c( xi ) c( xi 1)) | En A* | c( xn) i 1 Therefore, c( A*) | Ei A* | max . c( AG ) 1i n | Ei AG | Note that | Ei A* | u ( Ei ). We need only to show | Ei AG | v( Ei ), that is, Ei AG is a maximal independent set of Ei. Supposeindependent set Ei AG is not maximal in Ei. Then thereis a xj Ei \ AG such that( Ei AG ) {xj} is independent. So, ( Ej 1 AG ) {xj} is independent, contradicting the rule of not choosing xj. Maximum Weight Hamiltonian Cycle • Given an edge-weighted complete graph, find a Hamiltonian cycle with maximum total weight. Independent sets • E = {all edges} • A subset of edges is independent if it is a Hamiltonian cycle or a vertex-disjoint union of paths. Maximal Independent Sets • Consider a subset F of edges. For any two maximal independent sets I and J of F, |J| < 2|I| Let Vi {v I | v has degree i in I }. Then | J | 2 | V 2 | | V 1 | / 2 2(| V 2 | | V 1 | / 2) 2 | I | Maximum Weight Directed Hamiltonian Cycle • Given an edge-weighted complete digraph, find a Hamiltonian cycle with maximum total weight. 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. Consider F E. Suppose I and J are two maximal independent sets of F . Denote J 1 {e J | e shares the head with an edge in I } J 2 {e J | e shares the tail with an edge in I } J 3 {e J | e connectsa maximal path of I from its head to its tail} | Ji || I | for i 1, 2, 3. | J || J 1 | | J 2 | | J 3 | 3 | I | . Tightness ε 1 1 1 1+ε A Special Case • If c satisfies the following condition: c(u , v) max{ c(u , v' ), c(u ' , v)} c(u , v) c(u ' , v' ) c(u , v' ) c(u ' , v) Then the greedy approximation for maximum weight Hamiltonian path has performance ratio 2. Suppose e1, e 2, ..., en 1 are selected by the Greedy algorithm in the order of appearance. Let Qi Pi {e1, e 2, ..., ei} where Pi is the maximum weight Hamiltonia n path containing e1, e 2, ..., ei. We claim that for i 1, ..., n, c(Qi 1) c(Qi ) 2c(ei ). If this is proved, then wehave c(Q 0) c(Qn) 2(c(e1) c(en 1)). Let ei (u, v). By the Greedy rule, c(ei ) c(e) for all e Qi 1. After ei is selected, at most threeedges in Qi 1 become not permissible : (1) one shares the head with ei, (2) one shares the tail with ei, (3) the third one is on the path from v to u. Case 1. At most twoedges, say e and e' , of Qi 1 become not permissible after ei is selected. Then (Qi 1 {e, e'}) {e1, ..., ei} is independent. Hence, c(Qi 1) c(e) c(e' ) c(Qi ) c(Qi 1) c(Qi ) c(e) c(e' ) c(Qi ) 2c(ei ) Case 2. There are three edges of Qi 1 become not permissible after ei. They are (u, v' ), (u ' v) and an edge e on the path from v to u in Pi 1. This means that Pi 1 contains a path from u ' to v'. u v’ u’ v After deleting (u, v' ), (u ' v) and e, (u ' , v' ) is permissible. c(Qi ) c(Qi 1) c(e) c(u, v' ) c(u ' , v) c(u ' , v' ) c(Qi 1) c(e) c(u, v) c(Qi 1) 2c(ei ) 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. 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(u,v)| is edge weight. Hamiltonian Path Suppose s1, s 2, ..., sn appear in minimum superstring s in this natural ordering. Then n n 1 | s | | si | | ov( si, si 1) | . i 1 i 1 Hence, ( s1, s 2, ..., sn) is a maximum Hamiltonia n path of overlapping graph. The condition | ov(u, v) | max(| ov(u, v' ) |, | ov(u ' , v) |) | ov(u, v) | | ov(u ' , v' ) || ov(u, v' ) | | ov(u ' , v) | u’ v u v’ Theorem • The Greedy approximation MAX for maximum Hamiltonian path in overlapping graph has performance ratio 2. • Conjecture: This greedy approximation also give the minimum superstring an approximation solution within a factor of 2 from optimal. 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. Sufficiency For contradiction, supposeindependent system( E , C ) isn' t a matroid. Then thereexists F E such that F has two maximal independent sets I and J with | I || J | . Define 1 if e I c (e) 1 if e J \ I 0 if e E \ ( I J ) where is a sufficiently small positive number tosatisfy c( I ) c( J ). The greedy algorithm will produce I , which is not optimal. Example of Matroid For any fixed A E , denote CA {B E | A B}. Then ( E , CA) is a matroid. Proof Consider F E. If A F , then F has unique maximal independent subset whi is F . Hence, u ( F ) v( F ) | F | . ch If A F , then every maximal independent subset of F is in form F {x} for some x A. Hence, u ( F ) v( F ) | F | 1. Theorem • Every independent system is an intersection of several matroids. circuit • A minimal dependent set is called a circuit. • Let A1, …, Ak be all circuits of independent system (E,C). • Let Ci {B E | Ai B} C Ci k i 1 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. Proof Let F E. Consider two maximal independent subets I , J of F w.r.t.(E,C) Let Ii I be a maximal independent subset . of I J w.r.t.( E , Ci ). For any e J \ I , if e ik1 ( Ii I ), then I {e} ik1 Ci C , contradicting the maximality of I . Hence, e appears in at most k 1 ( Ii I )' s. So, | Ii | k | I | i 1 | Ii I | (k 1) | J I | (k 1) | J | . k k i 1 Now, let Ji J be a maximal independent subset of I J w.r.t.( E , Ci ). Since ( E , Ci ) is a matroid, | Ii || Ji | . Therefore, | J | (i 1 | Ji | k | J |) | J | k (i 1 | Ii | k | J |) | J | k | I | . k Applications • Many combinatorial optimization problem can be represented as an intersection of matrods. (see Lawler: Combinatorial Optimization and Matroid.) Thanks, End