Chapter 2. Greedy Strategy II. Submodular function Ding-Zhu Du What is a submodular function? Consider a function f on all subsets of a set E. f is submodular if f ( A) f ( B) f ( A B) f ( A B) Set-Cover Given a collection C of subsets of a set E, find a minimum subcollection C’ of C such that every element of E appears in a subset in C’ . Example of Submodular Function For a subcollection A of C , define f ( A) | s A S|. Then f ( A) f ( B) f ( A B) f ( A B ) Greedy Algorithm C ' ; while | E | f (C ') do choose S C to maximize f (C ' {S}) and C ' C ' {S}; Analysis Suppose S 1, S 2, ..., Sk are selected by Greedy Algorithm. Denote Ci {S 1, ..., Si}. Then f (Ci 1) f (Ci ) (| E | f (Ci )) / opt (| E | f (Ci ))(1 1 / opt ) | E | f (Ci 1) | E | f (Ci 1) (| E | f (Ci ))(1 1 / opt ) (| E | f (Ci 1))(1 1 / opt ) | E | (1 1 / opt ) i 1 Choose i to be the largest one satisfying opt | E | f (Ci ). Then k i opt opt | E | (1 1 / opt ) i 2 opt | E | (1 1 / opt ) | E |e So i / opt i (note : 1 x e ) i opt ln (| E | / opt ) Thus, k opt i opt (1 ln (| E | / opt )) x Analysis Suppose S 1, S 2, ..., Sk are selected by Greedy Algorithm. Denote Ci {S 1, ..., Si}. Then f (Ci 1) f (Ci ) (| E | f (Ci )) / opt Denote Xf ( A) f ( A { X }) f ( A). Let C* { X 1, X 2,..., Xopt} be an optimal solution. Denote Cj* { X 1,..., Xj}. By greedy rule, Si 1 f (Ci ) Xj 1 f (Ci ) for all 0 j opt 1 Thus, Si 1 f (Ci ) (0 j opt1 Xj 1 f (Ci )) / opt (0 j opt1 Xj 1 f (Ci Cj*)) / opt ( f (Ci C*) f (Ci )) / opt (| E | f (Ci )) / opt What’s we need? A B Xf ( A) Xf ( B) Actually, this inequality holds if and only if f is submodular and A B f ( A) f ( B) (monotone increasing) A B xf ( A) xf ( B) if and only if f is submodular and monotone increasing ( f is submodular ) implies A B xf ( A) xf ( B) for x B ( f is monotone increasing ) implies A B xf ( A) xf ( B) for x B f ( A) f ( B ) f ( A B ) f ( A B ) f ( A) f ( A B ) f ( A B ) f ( B ) Denote C A \ B A A B A B B. Then Cf ( A B ) Cf ( B ) Suppose f is submodular . For U V and x V , set A U {x} and B V . Then A \ B {x}, A B U , and hence xf (U ) xf (V ). Conversely , suppose above inequality holds for all U V and x V . Let C { y1,..., yk} and denote Ci { y1,..., yi}. Cf ( A B ) y1 f ( A B ) y 2 f (( A B ) C1) ykf (( A B ) Ck 1) Cf ( B ) y1 f ( B ) y 2 f ( B C1) ykf ( B Ck 1) For A B and x B, xf ( A) xf ( B) 0 if and only if f ( A {x}) f ( A), i.e., f is monotone increasing . Meaning of Submodular • The earlier, the better! • Monotone decreasing gain! Theorem Greedy Algorithm produces an approximation within ln n +1 from optimal. The same result holds for weighted set-cover. Weighted Set Cover Given a collection C of subsets of a set E and a weight function w on C, find a minimum totalweight subcollection C’ of C such that every element of E appears in a subset in C’ . Greedy Algorithm C ' ; while | E | f (C ' ) do choose S C to maximize Sf (C ' ) / w( S ) and C ' C '{S }; output C '. A General Problem Consider a monotone increasing , submodular function f defined on all subsets of a set E. Define ( f ) { A | x E , xf ( A) 0}. min c( A) xA c( x) s.t. A ( f ) Greedy Algorithm A ; while f * f ( A) do choose x E to maximize xf ( A) / c( x) and A A {x}; output A. ( f * max f ( A) f ( A) for any A ( f )) A General Theorem If f () 0, f is an integer function, and c( x) 0 for x E , then Greedy gives a (1 ln ) - approximat ion where max xE f ({x}). Remark: If f () 0, we may consider g ( A) f ( A) f (). Therefore max xE ( f ({x}) f ()). Proof Suppose x1, x 2, ..., xk are selected by Greedy Algorithm in the order of their appearance . Denote Ai {x1, ..., xi} and ri xif ( Ai 1). Suppose A* { y1, ..., yh} is an optimal solution. For each ye A*, denote zei ye f ( Ai 1), ci c( xi ) and k 1 ck ci w( ye) ( zei ze, i 1) zek rk ri i 1 k ci ci 1 c1 ) zei ze1 ( ri 1 r1 i 2 ri By Greedy rule and submodular property of f , r1 r 2 rk c1 c 2 ck ************************** r1 x 2 f ( A0) by Greedy rule, where A0 c1 c2 x 2 f ( A1) r 2 since f is submodular c2 c2 k r z j for i 1, ..., k ei j i ye A* k r f (A ) f (A j k ) f ( Ai 1 A*) f ( Ai 1) i 1 j i h yjf ( Ai 1 A * j 1) j 1 h yjf ( Ai 1) by submodular and monotone j 1 increasing properties of f h zji j 1 k ri c( Ak ) ci i 1 ri k 1 k ci k ck k ( rj rj ) rj rk j k i 1 ri j i j i 1 k c1 k ci ci 1 k rj ( ) rj r1 j 1 ri 1 j i i 2 ri k c1 ci ci 1 ze1 ( ) zei r1 yeA* ri 1 yeA* i 2 ri w( y ) e ye A* ci c( ye) By greedy rule, . ri zei By the submodular and monotone increasing property of f , zei ze, i 1. Therefore, k 1 ci ck w( ye) ( zei ze , i 1) zek ri rk i 1 k 1 c( ye) c( ye) ( zei ze , i 1) zek zei zek i 1 ze 1 1 c( ye) i 1 i since zei are integers. 1 2 3 zek Ze2 ze1 Subset Interconnection Design • Given m subsets X1, …, Xm of set X, find a graph G with vertex set X and minimum number of edges such that for every i=1, …, m, the subgraph G[Xi] induced by Xi is connected. fi For any edge set E, define fi(E) to be the number of connected components of the subgraph of (X,E), induced by Xi. • Function -fi is submodular. Rank • All acyclic subgraphs form a matroid. • The rank of a subgraph is the cardinality of a maximum independent subset of edges in the subgraph. • Let Ei = {(u,v) in E | u, v in Xi}. • Rank ri(E)=ri(Ei)=|Xi|-fi(E). • Rank ri is sumodular. Potential Function r1+ּּ+rm Theorem Subset Interconnection Design has a (1+ln m)-approximation. r1(Φ)+ּּ+rm(Φ)=0 r1(e)+ּּ+rm(e)<m for any edge Connected Vertex-Cover • Given a connected graph, find a minimum vertex-cover which induces a connected subgraph. • For any vertex subset A, p(A) is the number of edges not covered by A. • For any vertex subset A, q(A) is the number of connected component of the subgraph induced by A. • -p is submodular. • -q is not submodular. |E|-p(A) • p(A)=|E|-p(A) is # of edges covered by A. • p(A)+p(B)-p(A U B) = # of edges covered by both A and B > p(A ∩ B) -p-q • -p-q is submodular. Theorem • Connected Vertex-Cover has a (1+ln Δ)approximation. • -p(Φ)=-|E|, -q(Φ)=0. • |E|-p(x)-q(x) < Δ-1 • Δ is the maximum degree. Theorem • Connected Vertex-Cover has a 3approximation. Weighted Connected Vertex-Cover Given a vertex-weighted connected graph, find a connected vertex-cover with minimum total weight. Theorem Weighted Connected Vertex-Cover has a (1+ln Δ)-approximation. This is the best-possible!!! Thanks, End