Minimum Leaf Out-branching and Related Problems
Given a digraph $D$, the Minimum Leaf Out-Branching problem (MinLOB) is the problem of finding in $D$ an out-branching with the minimum possible number of leaves, i.e., vertices of out-degree 0. We prove that MinLOB is polynomial-time solvable for ac…
Authors: G. Gutin, I. Razgon, E.J. Kim
Minim um Leaf Out-branc hing and Related Problems ∗ Gregory Gutin † Igor Razgon ‡ Eun Jung Kim § Abstract Given a digraph D , the Minimum Leaf Out-Br anching problem (MinLOB) is the problem of finding in D an out-bra nc hing with the minimum pos sible nu mber of leaves, i.e., v ertices of out-degr ee 0. W e prov e that MinLOB is po lynomial-time solv able for a cyclic digraphs. In general, MinLOB is NP- hard and we co nsider three parameteriza tions of MinLOB. W e prov e that t wo o f them are NP-complete for every v alue of the parameter , but the third one is fixed- pa rameter tracta ble (FPT). The FPT par ametrization is as follo ws: given a digraph D o f order n and a p ositive integral par a meter k , chec k whether D con tains an out-br anching with at most n − k leav es (a nd find suc h an out-bra nching if it exists ). W e find a problem kernel o f order O ( k 2 ) and construct an algorithm of running time O (2 O ( k log k ) + n 6 ) , which is an ‘additive’ FPT alg orithm. W e also co nsider transfor mations from tw o related pro blems, the minimum path c overing and the maxim um internal out-tree problems in to MinLOB, whic h imply that some parameteriza tions of the t wo problems are FPT as w ell. 1 In tro duction W e say that a su b graph T of a digraph D is an out-tr e e if T is an oriented tree with only o ne v er tex s of in-degree zero (calle d the r o ot ). The ve rtices of T of out-degree zero are called le aves and all other vertices internal vertic es . If T is a spanning out-tree, i.e. V ( T ) = V ( D ), then T is called an out-br anching of D . Giv en a digraph D , the M inimum L e af O ut-Br anching problem ( MinLOB ) is the pr oblem of fin ding an out-branching with the minim um p ossible num b er of lea v es in D . W e denote this minimum b y ℓ min ( D ) and if D has no out-br anc hing, w e write ℓ min ( D ) = 0. Notice that n ot every digraph D has an out-br anc hing. It is not d ifficult to see th at D has an o ut-branching (i.e., ℓ min ( D ) > 0) if a nd only if D has just on e strongly connected c omp on ent without incoming a rcs [2]. ∗ Preliminary extended abstract of th is paper app ears in the pro ceedings of AA IM’08 [14]. † Department of C omputer Science, R o yal Hollo wa y , Univ ersity of Lon don, Eg ham, Surrey TW20 0EX, UK, gutin@cs.rhu l.ac.uk ‡ Department of Computer S cience, Universit y Colleg e Cork, Ireland, i.razgon@ cs.ucc.ie § Department of C omputer Science, R o yal Hollo wa y , Univ ersity of Lon don, Eg ham, Surrey TW20 0EX, UK, eunjung@cs.r hul.ac.uk 1 Since the last condition can b e c hec ke d in linear time [2], w e may often assume that ℓ min ( D ) > 0. The underlying gr aph U G ( D ) o f a digraph D is obtained from D b y omitting all orien tation of arcs and by deleting one edge from eac h resu lting pair of parallel edges. F or a digraph D , an indep endent set (v ertex co ver resp ectiv ely) of D is an indep endent set (v ertex co ve r resp ectiv ely) of U G ( D ). W e denote th e union of (in-) out-neigh b ors of v ertices in X b y ( N − ( X )) N + ( X ) and N ( X ) = N + ( X ) ∪ N − ( X ). W e fi rst study MinLOB r estricted to acyclic digraphs (abbreviated MinLOB- DA G ). MinL OB-D A G was c onsidered in US paten t [7], where its application to the area of database sys tems w as d escrib ed. Demers and Do wnin g [7] also sug- gested a heuristic approac h to Min L OB-D A G. Ho we ve r no argument or assertio n has b een made to pro vide the v alidit y of t heir approac h and to inv estigate its computational c omplexit y . Using a nother approac h, we giv e a simple p r o of in Section 2 that MinLOB-D A G can b e solv ed in p olynomial time. Since MinLOB generalizes the h amiltonian directed pat h problem, MinLOB is NP-hard . In this pap er, w e in tro duce three parameterizations of MinL OB: (a) ℓ min ( D ) ≤ k ( k ≥ 1), (b) ℓ min ( D ) ≤ n/k ( k ≥ 2), (c) ℓ min ( D ) ≤ n − k ( k ≥ 1), where n is the num b er of ve rtices in D and k is the parameter. W e sho w that (a) and (b) are NP-complete for ev ery v alue of the parameter, but (c) is fixed- parameter tractable and has an algorithm of complexit y O (2 O ( k log k ) + n 6 ). W e also sh o w the existence o f a quadratic k ernel f or the parameterized p roblem (c). These results are considered in section (3)-(5). The problem (c) w as stu d ied b y Prieto and Sloper [19, 20] for un directed graphs (i.e. s y m metric d igraphs), where the authors obtained an FPT algorithm of complexit y O (2 2 . 5 k log k n O (1)) and a quadr atic k ernel. In the minimum p ath c overing prob lem ( MinP C ), giv en a digraph D , our aim is to find the m inim um n um b er of vertex- disjoint dir ected p aths, p c( D ), co vering all v ertices of D . It is well-kno wn that MinPC is p olynomial time solv ab le for acyclic digraphs, p c( D ) ≤ α ( D ) f or ev ery digraph D (the Gallai-Milg ram theorem), and p c( D ) = α ( D ) for ev ery transitive ac yclic digraph D (Dilw orth’s theorem) [2]. In first part of Section 6, we describ e a simple tr ansformation from MinPC in to MinLOB whic h implies that th e parameterize d p roblem p c( D ) ≤ n − k is fixed-parameter tractable, where n is th e num b er of v ertices in D and k is the p arameter. Observe that MinLOB can b e reform ulated as a pr oblem of findin g an out- branc hing with m axim um num b er of inte rnal v er tices. How ev er, while the prob- lem of finding an out-tree with min imum n umb er of lea ve s in a digraph D is trivial (a v ertex is an out-tree), the problem of finding an out-tr e e with maxi- mum numb er of internal vertic es (a bb r eviated MaxIOT ) i s not trivial; in fact, it is NP-hard (as it also generalizes the h amiltonian directed p ath pr oblem). The second part o f Section 6 is dev oted to th e latter problem. F urther researc h is 2 discussed in Section 7. W e reca ll some basic noti ons of parameterized complexit y here, for a more in-depth treatmen t of the topic w e refer the reader to [6, 11, 18]. A parameterized p roblem Π can b e considered as a set of pairs ( I , k ) where I is the pr oblem instanc e and k (usually an in teger) is the p ar ameter . Π is called fixe d-p ar ameter tr actable (FPT) if memb ership of ( I , k ) in Π can b e decided in time O ( f ( k ) | I | c ), where | I | is th e size of I , f ( k ) is a compu table function, and c is a constan t indep endent from k and I . Let Π b e a parameterized pr oblem. A r e duction R to a pr oblem ke rnel (or k e rnelization ) is a many-t o-one trans- formation from ( I , k ) ∈ Π to ( I ′ , k ′ ) ∈ Π ′ , suc h that (i) ( I , k ) ∈ Π if and only if ( I ′ , k ′ ) ∈ Π, (ii) k ′ ≤ k and | I ′ | ≤ g ( k ) for some function g and (iii) R is computable in time p olynomial in | I | and k . In k ernelization, an instance ( I , k ) is reduced to anot her in stance ( I ′ , k ′ ), whic h is called the pr oblem kernel ; | I ′ | is the size of th e ke rnel. It is easy to see that a decidable parameterized problem is FPT if and only if it admits a ke rnelization (cf. [11, 18]); how ev er, the pr ob lem k ernels obtained by this general result h a v e impractically large size. Therefore, one tries to dev elop k ernelizations th at yield problem kernels of smaller size. The surve y of Guo and Niedermeier [12] on k ernelization li sts some p roblem for whic h p olynomial size k ernels an d exp onent ial size kernels w ere obtained. Notice that due to k ernel- ization w e can obtain so-ca lled an additive FPT algorithm, i.e., an algorithm of runn in g time O ( n O (1) + g ( k )) , wher e g ( k ) is indep endent of n , whic h is often significan tly faster than its ‘multiplicat iv e’ counterpart. All digraphs in this pap er are fin ite with no loops or parallel arcs. W e use terminology and notation of [ 2]; in particular, f or a digraph D , V ( D ) and A ( D ) denote its v ertex and arc sets. Th e sym b ols n and m will d enote the n um b er of v ertices and arcs in the digraph under consideration. 2 MinLOB-D A G Let D b e an acyclic digraph. W e may assu m e th at D h as a uniqu e ve rtex r of in-degree 0 as otherwise D has no out-br anc hings. Let V = V ( D ) and V ′ = { v ′ : v ∈ V } . Let u s define a b ipartite graph B of D with partite s ets X and X ′ as follo ws: X = V , X ′ = V ′ \ { r ′ } and E ( B ) = { xy ′ : x ∈ X, y ′ ∈ X ′ , xy ∈ A ( D ) } . Consider the follo wing alg orithm for finding a minimum leaf out-br anc hing T in an input acyclic digraph D . The al gorithm outputs T if it exists and ‘NO’, otherwise. MINLEAF 1. if the num b er of vertic es with in-degree 0 equals 1 t hen r ← the v ertex of in-degree 0 else r eturn ‘NO’ 3 2. construct the b ipartite graph B of D 3. find a maximum matc hing M in B 4. M ∗ ← M 5. for all y ′ ∈ X ′ not co v ered by M do M ∗ ← M ∗ ∪ { an arbitrary edge incident with y ′ } 6. A ( T ) ← ∅ 7. for all xy ′ ∈ M ∗ do A ( T ) ← A ( T ) ∪ { xy } 8. return T Theorem 2.1. L et D b e an acyclic digr aph. Then MINLEAF r eturns a mini- mum le af out-br anching if one exists, or r eturns ‘NO’ otherwise in time O ( m + n 1 . 5 p m/ log n ) . Pr o of. W e start with proving the v alidity of the algorithm. Observe that an acyclic d igraph has an out-branc hing if and only if th er e exists on ly one vertex of in-degree zero. Hence Step 1 retur ns ‘NO’ pr ecisely when ℓ min ( D ) = 0 . Let M b e the maxim um matc hing ob tained in Step 2, let V ( M ) be the set of v ertices of B co vered by M , and let Z = X \ V ( M ) and Z ′ = X ′ \ V ( M ) . First we claim that Z is the set of the lea ve s of T , the out-branc hing o f D obtained in the end of Step 7. Consider the edge set M ∗ obtained at the e nd of Step 5. First observ e that for eac h ve rtex y ′ ∈ Z ′ , there exists an edge of E ( B ) whic h is inciden t with y ′ since r is th e only v ertex of in-degree zero and th us no vertex of Z ′ is isolated. Moreo v er, all neigh b ors of y ′ are cov ered b y M due to the maximalit y of M . It follo ws th at M ∗ ⊇ M cov ers all vertic es of X ′ and lea v es Z unco ve red. Notice that r is co v ered b y M . Ind eed there exists a v ertex u suc h that r is the only in-neigh b or of u in D . Hence if r w as n ot co v ered by M then u ′ w ould not b e co v ered by M either, wh ic h means w e could extend M b y r u ′ , a con tradiction. Consider T which has b een obtained in the end of Step 7. Clearly d − T ( v ) = 1 for all v ∈ V ( D ) \ { r } due to the constru ction of M ∗ . Moreo ver D do es not hav e a cycle , whic h means that T is connecte d and thus is an out-branc hing. Finally no vertex of Z has an out-neigh b or in T while all the other v ertices ha v e an out-neigh b or. Now the claim h olds. Con v ersely , w henev er there exists a minim um leaf out-bran ching T of D with the le af set Z , w e can b u ild a matc hing in B wh ich co vers exactly X \ Z among the v ertices of X . In d eed, simply rev erse the pro cess of building an out- branc hing T from M ∗ describ ed at Step 7. If some v ertex x ∈ X has more t han one neigh b or in X ′ , eliminate all but one edge in ciden t with x . Secondly we claim that T obtained in MINLEAF( D ) is of minim um num b er of lea ves. Su pp ose to the co ntrary that the the attained out-branc hing T is not a m inim um lea f out-branc hing of D . T h en a minim um leaf out-branc hin g can b e used to pro d uce a matc hing of B that cov ers m ore vertice s of X th an M 4 do es u sing the argument in the preceding paragraph, a con tradiction. Hence MINLEAF(D) return s a min leaf out-branc hing T at Step 8. Finally we analyze the computational complexit y of MINLEAF( D ). Eac h step of MINLEAF( D ) tak es at most O( m ) time except for Step 3. The com- putation time required to p erform Step 3 is the s ame as that of solving the maxim um cardin alit y matc hing problem on a bipartite graph. The last problem can b e solv ed in time O ( | V ( B ) | 1 . 5 p | E ( B ) | / log | V ( B ) | ) [1]. Hence, the algo- rithm requires at m ost O ( m + n 1 . 5 p m/ log n ) time. 3 P arameteriza tions of MinLOB The follo wing is a natural wa y to parameterize MinLOB. MinLOB P aramet e rized Naturally (MinLOB-PN) Instanc e: A digraph D . Par ameter: A p ositiv e in teger k . Question: Is ℓ min ( D ) ≤ k ? Clearly , this problem is NP-co mplete already for k = 1 as for k = 1 MinL O B- PN is equiv alen t to th e h amiltonian dir ected path problem. Let v b e an arbi- trary v ertex of D . T ransform D into a new digraph D k b y addin g k v ertices v 1 , v 2 , . . . , v k together with the arcs v v 1 , v v 2 , . . . , v v k . Observe that D has a hamiltonian directed path terminating at v if and only if ℓ min ( D k ) ≤ k . Sin ce the problem is NP-complete of c hec king wh ether a digraph h as a h amiltonian directed path terminating at a prescrib ed v ertex, we conclud e that MinLOB-PN is NP-complete for every fixed k . Clearly , ℓ min ( D ) ≤ n − 1 for ev ery digraph D of order n > 1. Consider a differen t parameterizations of MinLOB. MinLOB P arameterized Belo w Guaranteed V alue (MinLO B- PBGV) Instanc e: A digraph D o f ord er n with ℓ min ( D ) > 0 . Par ameter: A p ositiv e in teger k . Question: Is ℓ min ( D ) ≤ n − k ? Solution: An out-branc hing B of D with at most n − k lea v es or the answ er ‘NO’ to the ab o v e question. Note that we consider MinLOB-PBGV as a s earch problem, not just as a decision p roblem. In the next section w e will pro v e that MinLO B-PBGV is fixed-parameter tractable. W e will find a problem kernel of order O ( k · 2 k ) and constr u ct an additiv e FPT algorithm of runn ing time O (2 O ( k log k ) + n 3 ) . T o obtain our results we u s e notions and prop erties of v ertex co v er and tree decomp osition of un derlying graphs and Las V ergnas’ theorem on digraphs. 5 The parametrization MinLOB-PBGV is of the t yp e b e low a guar ante e d value . P arameterizatio ns ab ov e/b elo w a guaran teed v alue w ere first considered b y Ma- ha jan and Raman [17] for the problems Max-SA T and Max-Cut; such p arameter- izations ha v e latel y gained muc h atten tion, c f. [9, 13, 15, 16, 18] (it wo rth noting that Heggernes, P aul, T elle, and Villanger [16] recen tly solv ed the longstanding minim um in terv al completion pr oblem, w hic h is a parametrization ab ov e guar- an teed v alue). F or directed graphs there hav e b een only a couple of results on problems parameterized ab o v e/b elo w a guaran teed v alue, see [3 , 10]. Let us denote b y ~ K 1 ,p − 1 the star digr aph of order p , i.e., the d igraph with v ertices 1 , 2 , . . . , p and arcs 12 , 13 , . . . , 1 p . Our success w ith MinLOB-PBGV ma y lead us to considering the follo wing stronger (than MinLOB-PBGV) pa- rameterizatio ns of MinLOB. MinLOB P aramet e rized Strongly B elow Guaranteed V alue (MinLOB-PSBGV) Instanc e: A digraph D o f ord er n with ℓ min ( D ) > 0 . Par ameter: An in teger k ≥ 2. Question: Is ℓ min ( D ) ≤ n/k ? Unfortunately , MinLOB-PSBGV is NP-complete for ev ery fixed k ≥ 2 . T o pro ve this consider a digraph D of o rder n and a digraph H obtained from D b y adding to it th e s tar digraph ~ K 1 ,p − 1 on p = ⌊ n/ ( k − 1) ⌋ vertice s ( V ( D ) ∩ V ( ~ K 1 ,p − 1 ) = ∅ ) and app ending an arc from v ertex 1 of ~ K 1 ,p − 1 to an arbitrary v ertex y o f D . Observe that ℓ min ( H ) = p − 1 + ℓ min ( D , y ), where ℓ min ( D , y ) is the minimum p ossible n umber of lea ves in an out-br anc hing r o oted at y , and that 1 k | V ( H ) | = p + ǫ, where 0 ≤ ǫ < 1. Thus, ℓ min ( H ) ≤ 1 k | V ( H ) | if and only if ℓ min ( D , y ) = 1 . Hence, the hamilt onian d ir ected path problem with fixed initial v ertex (ve rtex y in D ) can b e reduced to Mi nLO B-PSBGV for eve ry fixed k ≥ 2 and, therefore, MinL OB-PSBGV is NP-complete f or ev ery k ≥ 2 . 4 Quadratic Kernel for MinLOB-PB GV In this section we in tro duce a reduction rule for the MinLOB-PBGV p roblem. Using the reduction rule we presen t a p olynomial time algorithm th at either yields an out-branc hing with a t most n − k lea v es or pro duces a k ernel whose size is b ounded b y a quadratic function of k . Let T b e an out-branching of a giv en d igraph D a nd let ( u, v ) ∈ A ( D ) \ A ( T ). W e define the 1-change for ( u, v ) as the operation t o add the arc ( u, v ) to T and remo v e the existing arc ( p ( v ) , v ) from T , w here p ( v ) is the p ar ent (i.e. in- neigh b or) of v in T . W e sa y an out-branching is minimal if no 1-c hange for an arc of A ( D ) \ A ( T ) leads to an out-branc hing w ith more in ternal v ertices, or equiv alent ly , less lea v es. F or distinct v ertices x, y , w e w rite x < T y if there is a 6 path from x to y in T . An arc ( y , x ) ∈ A ( D ) \ A ( T ) is T -bac kward if x < T y . The follo wing is a simple obs er v ation on a minimal out-branc hing. Lemma 4.1. L et T b e an out-br anching of D . Then T is minima l if and only if for every ar c ( u, v ) ∈ A ( D ) \ A ( T ) which is no t T -b ackwar d ar c, the vertex u is internal or d + ( p ( v )) = 1 . Pr o of. Supp ose the 1-c hange for ( u, v ) ∈ A ( D ) \ A ( T ) yiel ds an out-branc hing with less lea v es. I t is easy to see that ( u, v ) is not T -bac kwa rd , u is a leaf and d + ( p ( v )) ≥ 2. Conv ersely if there is an arc ( u, v ) ∈ A ( D ) \ A ( T ) whic h is not T -b ac kw ard, u is a leaf and d + ( p ( v )) ≥ 2 then 1-c hange for ( u, v ) pro duces an out-branc hing in whic h the num b er num b er of lea ve s is s trictly decreased. Lemma 4.2. Given a digr aph D , we c an either build a minimal out-br anching T with at most n − k le aves or obtain a vertex c over of size at mo st 2 k − 2 in O ( n 2 m ) time. Pr o of. Let T b e a minimal out-branc hing. If T has at most n − k lea ves, w e are done. Supp ose it is not. W e claim that the set U = { u ∈ V ( D ) : u is in ternal in T } ∪ { u ∈ V ( D ) : u is a leaf in T and d + ( p ( u )) = 1 } is a ve rtex co ve r of D . Since the set of in ternal v ertices co v er all arcs whic h are n ot b et w een the lea v es, it s u ffices to s h o w that every arc ( u, v ) b et w een t w o lea v es u and v is co vered b y U . The last sta tement follo ws fr om the fact th at T is min imal and Lemma 4.1. What remains is to observ e that the n umber of internal v ertices is at m ost k − 1 and the n umber of lea v es whic h is the only child of it s paren t is at most k − 1 as w ell. No w w e consid er the time complexit y of the algorithm. The construction of a n out-branc hing T of D tak es O ( n + m ) time. Whether T is minimal can b e chec ked in O ( nm ) time since for ev ery arc ( u, v ) ∈ A ( D ) \ A ( T ) w e test the conditions of Lemma 4.1. Let L b e the list of arcs ( u, v ) ∈ A ( D ) \ A ( T ) whic h violate s the minimalit y of T , i.e. su c h that u is a leaf and d + ( p ( v )) ≥ 2. Whenev er L 6 = ∅ , c ho ose ( u, v ) ∈ L and transform T by replacing the arc ( p ( v ) , v ) b y ( u, v ). Accordingly we u p date the list L a s follo ws: (1) er ase all arcs whose tai l is u , whic h ta ke s O ( m ) time (2) erase all arcs w hose hea d is v , whic h tak es O ( m ) time (3) add to L arcs of the form ( x, y ) where x is a leaf of the subtree ro oted at v and y is a v ertex with d + ( p ( y )) ≥ 2 on t he u nique path from the ro ot of T to p ( v ). This tak es O ( nm ) time. Th e v alidation of the up date with (1)-(3) can b e easily v erified. Since an y out-branching h as at least one le af and w e decrease the num b er of lea ves of T b y 1 at e ac h transf ormation, after at most n su c h transformations w e obtain an out-br an ching where no f urther transformation can b e done. This will b e our minimal out-branc hing. When the minimal out-branc h ing has more than n − k lea v es, we can construct the v ertex co v er U as ab o ve in O ( n ) time. 7 It follo ws from Lemma 4.2 that w e can find either a n out-branc hing whic h certifies a p ositiv e answer for the MinLOB-PBGV problem or a v ertex cov er of D of size at most 2 k − 2. In the seco nd case, w e can remo ve some redun dan t v ertices from th e large indep enden t set of size at least n − (2 k − 2) and obtain an instance of sm aller size. T he cr own structur e pla ys the fundament al role in this reduction. Definition 4.3. A c r own in a g r aph G is a p air ( H , C ) , wher e H ⊆ V ( G ) and C ⊆ V ( G ) with H ∩ C = ∅ such that t he fol lowing c onditions hold: (a) The set of neighb ors of vertic es in C is pr e c isely H , i.e. H = N ( C ) , (b) C = C m ∪ C u is an indep endent se t, an d (c) Ther e is a p erfe ct matching b etwe en C m and H . A c rown structure is a relativ ely new idea that allo w s us to hav e p o w erfu l reduction rules. Its app licatio ns ha v e b een wide an d successful, which includes a linear-size ke rn el for the vertex co v er problem [5, 8]. Giv en a digraph D , let U b e a v ertex co v er of D . Modify U b y includin g in it the verte x of in-degree 0 if one exists. Let W = V ( D ) \ U and o bserve that W is an in dep endent set. Finding an out-br an ching with at most n − k lea v es can b e reformulated as the problem of fi nding an out-branching with at least k inte rnal v ertices. Herein w e d efine the i nternal numb er of D as the largest p ossible num b er of int ernal v ertices of an out-branc hing of D . In order to accommodate a cro wn stru ctur e to MinLOB-PBGV problem w e create an auxilia ry mo del w h ic h is similar to t hose considered in [8, 20]. Note that our m o del is more refined as w e deal with directed graphs un like [8, 20] whic h consider o nly undirected graphs. Giv en a directed graph D with U an d W as ab o v e, w e b uild the (und irected) bipartite graph B as follo ws. • V ( B ) = U ′ ∪ W , where U ′ = N − ( W ) ∪ ( U × U ) • E ( B ) = {{ xy , w } : xy ∈ U × U, w ∈ W, ( x, w ) ∈ A ( D ) , ( w, y ) ∈ A ( D ) } ∪ {{ x, w } : x ∈ U, w ∈ W , ( x, w ) ∈ A ( D ) } Observe that no v ertex of W in B is isolated since ev ery v ertex of W is of in-degree at least one in D . Lemma 4.4. If B c ontains a cr own ( H , C = C m ∪ C u ) with C ⊆ W and C u 6 = ∅ , then the internal numb er of D e qu als the internal numb er of D − C u . Pr o of. W e can e xtend an out-branc h ing T of D − C u b y app ending a n arc ( x, w ) ∈ A ( D ), where w ∈ C u and x is an y in-neigh b or of w . T he at tac hment of suc h an arc do es not decrease the num b er of in ternal v ertices of T . This sho ws that the in ternal num b er of D is not smaller than th at of D − C u . Let a cro wn ( H , C = C m ∪ C u ) with C ⊆ W and a p erf ect matc hing M b et we en H and C m are giv en. W e s tart with the follo wing claim. 8 Claim 1. Let c r oot b e the ro ot of T . If c r oot ∈ C , we can mod ify the p er- fect matc h ing M into M ′ b et we en H and C ′ m ⊆ C so that c r oot ∈ C ′ m and { ux, c r oot } ∈ M for some p air ve rtex ux ∈ U × U . Pr o of of Claim 1. Supp ose this is not the case. Recall th at c r oot is of in- degree at least 1 since we excluded any v ertex of in-degree 0 from W . Let u b e an in-neigh b or of c r oot in D and x b e a child of c r oot in T . Note th at { u, c r oot } , { ux, c r oot } ∈ E ( B ) and thus u, ux ∈ H . There a re t w o cases and for eac h case w e can obtain a new p erfect m atching as follo ws. Firstly if c r oot ∈ C u , simply exc hange it with a v ertex c ∈ C m whic h is m atc hed to th e pair vertex ux by M . This exc hange is justified since { ux, c r oot } ∈ E ( B ). S econdly supp ose c r oot ∈ C m but it is matc hed t o a v ertex u ∈ N − ( W ). Sin ce ( u, c r oot ) , ( c r oot , x ) ∈ A ( D ), we hav e the pair v ertex ux in U ′ and moreo v er it is in H . Hence we can fin d c ∈ C m whic h is matc hed to the p air vertex ux and by exc hanging it with c r oot w e ha v e a new p erfect matc hing. This is p ossible as we ha v e { ux, c r oot } ∈ E ( B ) and ( u, c ) ∈ A ( D ), th us { u, c } ∈ E ( B ). Due to Claim 1, when c r oot ∈ C w e ma y alw a ys assume that c r oot ∈ C m and furthermore that { ux, c r oot } ∈ M for some pair v ertex ux ∈ ( U × U ). Notice that x is n ot necessarily a c hild of c r oot in T . W e shall sho w th at the in ternal num b er of D − C u is not smalle r than the in ternal n umber of D . T o see th is sup p ose T is an out-br anc hing of D and consider the subgraph F = T − C obtained fr om T by d eleting the vertic es of C . O bviously F is a un ion o f out-trees, sa y F 1 , . . . , F l . W e will add the v ertices of C m and a set of arcs so that w e obtain an out-br anc hing of D − C u with as man y inte rn al v ertices as in T at the end of this pr o cess. Recalling th at C ⊆ W is an i nd ep endent s et, it is s traigh tforw ard to se e an y v ertex c ∈ C falls into one of the three t yp es: (a) c is a leaf in T hanging to some v ertex of F (b ) c is an in ternal vertex in T whic h has b oth a paren t and c hildren in F (c) c is the root c r oot of T and it has at least one in-n eigh b or in V ( D ). Let c 1 , . . . , c t ∈ C b e the v ertices that are of t yp e (b) in T . Consider c i , 1 ≤ i ≤ t . If c i comes under t yp e (b), let H i = { f p f q ∈ U × U : ( f p , c i ) ∈ A ( T ) , ( c i , f q ) ∈ A ( T ) } . W e denote S 1 ≤ i ≤ t H i b y H int . F or the ve rtex c r oot ∈ C , let H c r oot = { f p x ∈ U × U : ( f p , c r oot ) ∈ A ( D ) \ A ( T ) , ( c r oot , x ) ∈ A ( T ) } . W e s et H r oot = ∅ if c r oot / ∈ C . Note that b oth H int and H r oot b elong to H . The f ollo w in g pro cedu re defines ho w to construct an out-tree T ′′ from F . W e initialize T ′ ← F and C int ← ∅ . 1. F or ev ery f p f q ∈ H int 1.1 let H i b e the un ique set con taining f p f q . 1.2 let c pq ∈ C m b e the vertex with { f p f q , c pq } ∈ M 1.3 T ′ ← T ′ + c pq + ( f p , c pq ) + ( c pq , f q ). 9 1.4 C int ← C int ∪ c pq . 2. T ′′ ← T ′ . 3. If c r oot / ∈ C , return T ′′ . 4. If c r oot / ∈ C int 4.1 T ′′ ← T ′′ + c r oot . 4.2 for eac h c hild x of c r oot in T , T ′′ ← T ′′ + ( c r oot , x ). 4.3 return T ′′ . 5. Otherw ise 5.1 let f p f q ∈ H int b e the vertex with { f p f q , c r oot } ∈ M . 5.2 let x b e the c hild of c r oot in T with x ≤ T ′′ f p . 5.3 let c x ∈ C m b e the vertex with { f p x, c x } ∈ M . 5.4 T ′′ ← T ′′ + c x + ( c x , x ). 5.5 for eac h c hild y 6 = x of c r oot in T (if any) 5.5.1 let c y ∈ C m b e the vertex with { f p y , c y } ∈ M 5.5.2 T ′′ ← T ′′ + c y + ( f p , c y ) + ( c y , y ). 5.6 return T ′′ Claim 2. Step 1 is v alid and T ′ at step 2 is a union of out-trees. Pr o of of Claim 2. F or eac h f p f q ∈ H int , the vertex f q ∈ V ( F ) app ears as the second elemen t of the pair v ertex in H int at most once. The uniqu eness of H i ∋ f p f q then follo ws (step 1.1). Moreo v er by the construction of H i , { f p f q , c i } ∈ E ( B ) a nd th us f p f q ∈ N ( C ) = H , where the last e qualit y follo ws b y the defin ition of c rown. Hence f p f q is uniquely matc hed to a vertex c pq ∈ C m b y M (step 1.2). Also { f p f q , c pq } ∈ E ( B ) implies ( f p , c pq ) , ( c pq , f q ) ∈ A ( D ), whic h imp lies that T ′ can b e pr op erly constructed (step 1.3). No w observ e that an y second elemen t f q of a pair v ertex f p f q ∈ H int is a ro ot o f an out-tree in F . Thus for eac h comp onent F q of F , T ′ con tains at most one arc en tering into its ro ot. Moreo ver, f p < T ′ f q if and only if f p < T f q , wh ic h means there is no d irected cycle in T ′ . Witnessing that all the other v ertices ha v e at most one arc en tering into it, we conclude T ′ at step 2 is a union of out-trees. W e claim that the ab ov e pro cedu re returns an out-tree T ′′ Claim 3. Step 3-5 are v alid and T ′′ is an out-tree. Pr o of of Claim 3. First consider the case when T ′′ is returned at s tep 3. With Claim 2 , it is enough to sho w that T ′ is connected. L et t wo components F p and F q in F b e connected b y c i in T . S ince c r oot / ∈ C , the v ertex c i is of t yp e (b) and th us there exist f p ∈ F p and the ro ot f q of F q suc h that ( f p , c i ) ∈ A ( T ), ( c i , f q ) ∈ A ( T ). By the construction of H int , w e h a v e f p f q ∈ H i ⊆ H int and 10 the v ertex c pq ∈ C m with { f p f q , c pq } ∈ M connects F p and F q in T ′ during th e p erformance of step 1. Hence T ′ is connected. If T ′′ is no t returned at s tep 3 , w e ha v e c r oot ∈ C . It is important to observ e that in this case, the ro ots of the out-trees in T ′ at step 2 are exactly the c hildren of c r oot in T . This is b ecause the ro ot of an out-tree in F has an incoming arc in T ′ if and only if its parent in T is of type (b). Secondly supp ose that T ′′ is retur ned at step 4. Then c r oot do es not p artic- ipate in T ′ and c r oot in T ′′ is of in-degree 0. By the observ ation in the s econd paragraph, T ′′ is an out-tree. Thirdly supp ose that T ′′ is returned at step 5. In this case c r oot has b een included as an internal vertex to connect t wo out-trees in step 1, and the arcs ( f p , c r oot ) and ( c r oot , f q ) hav e b een included in T ′ , where f p f q is the p air v ertex found in step 5.1. W e wan t to c hec k th at c x and the arc ( c x , x ) in line 5.3 can b e prop erly pick ed up . Indeed, the pair v ertex f p x belongs to H r oot ⊆ H and there exists a v ertex c x whic h is matc hed to the p air f p x . By th e constr u ction of B , t he arc ( c x , x ) exists as well. Hence at the end of step 5.4, T ′′ is a union of out-trees w h ose ro ots are c x and the children of c r oot in T other th an x . If d + T ( c r oot ) = 1, T ′′ consists of a single out-tree whose ro ot is c x . Else if d + T ( c r oot ) ≥ 2, let y b e a c hild of c r oot in T and y 6 = x . Since ( f p , c r oot ) , ( c r oot , y ) ∈ A ( D ), w e h av e the pair v ertex f p y in H r oot ⊆ H and f p y is uniquely matc hed to a v ertex c y . The edge { f p y , c y } implies the existence of the t w o arcs ( f p , c y ), ( c y , y ), hence we can p erform step 5.5 p r op erly . Since the vertex f p is conta ined in the ou t-tree ro oted at c x ∈ C m , the addition of these arcs d o es not create a cycle. As a result w e start at the step 5.5 with | d + T ( c r oot ) | out-trees in the b eginning and eac h time we carry out step 5.5.2, the num b er of out-trees in T ′′ decreases b y 1. Therefore at the end of step 5.5, we end up with a single out-tree T ′′ ro oted at c x . During the construction of T ′′ , w e added at least one v ertex c pq for eac h in ternal v ertex c i of t yp e (b) as an in ternal v ertex of T ′′ . Also we added at least one ve rtex as the ro ot or an in ternal vertex of T ′′ if c r oot ∈ C . Hence the n umber of in tern al v ertices in C for T ′′ is at least a s large as the n um b er of in ternal v ertices in C for T . Therefore what remains is to see that ev ery v ertex f of F which is internal in T can b e mad e to r emain inte rnal. The only case w e need to consider is a v ertex f ∈ V ( F ) whose c h ildren in T are lea v es and all b elong t o C . S u pp ose f is a le af in T ′ . Since f ∈ N ( C ) = H , w e c an uniquely determine a vertex c f ∈ C m suc h that { f , c f } b elongs to the p erfect matc hing M . By the construction of T ′′ in the ab ov e argumen t, the ve rtex c f is not con tained in T ′′ for eac h such v ertex f ∈ V ( F ) and th us, w e may add c f and an arc ( f , c f ) to T ′′ while k eeping T ′′ as an out-tree. After this p ro cedure eac h such v ertex f is an in ternal ve rtex in T ′′ , a nd thus T ′′ has as many in ternal v ertices as T . F or an y vertex c of C m whic h do es not participate in T ′ constructed so far, 11 w e simply add it to T ′′ with the arc ( f , c ) ∈ A ( D ). Therefore T ′′ is an out- branc hing of D − C u with as man y in tern al v ertices as T . Th is completes the pro of. In ligh t of Lemma 4.4, we ha v e a reduction rule b elo w. Reduction rule 1. Giv en a d igraph D with a v ertex co v er U of D and W = V ( D ) \ U , construct the asso ciated bip artite g raph B . If B has a cro wn ( H , C = C m ∪ C u ) with C u 6 = ∅ , remo ve the vertic es of C u from D . W e need the follo wing theorem to pr o v e our kernelizati on lemma. Theorem 4.5. [8] Any gr aph G with an indep endent set I , wher e | I | ≥ 2 n 3 , has a cr own ( H, C ) , wher e H ⊆ N ( I ) , C ⊆ I and C u 6 = ∅ , that c an b e found in time O ( nm ) given I . Lemma 4.6 (Kernelizatio n Lemma) . L et D b e irr e ducible. If | V ( D ) | > 8 k 2 + 6 k then D h as an out-br anching with at le ast k internal vertic es. Pr o of. Supp ose that D is redu ced with | V ( D ) | > 8 k 2 + 6 k , and that D do es not hav e an o ut-bran ching with at least k in ternal vertic es. S ince the in ternal n umb er of D is the same as the in tern al num b er of the original digraph, w e ma y assume that D h as an out-branc hing T . F or | U | < 2 k , w e ha v e | W | = | V ( D ) \ U | > 8 k 2 + 4 k and | U ′ | < 2 k + 4 k 2 . Then | W | ≥ 2 | V ( B ) | 3 whic h means w e hav e a cro wn ( H, C = C m ∪ C u ) of D with C ⊆ W and C u 6 = ∅ by Theorem 4.5. This is a con tradiction to that D is reduced. Pro ceeding from wh at has b een discussed ab ov e, we g iv e a p olynomial time algorithm which compu tes a quadr atic k ernel for the MinLOB-PBGV pr oblem. KERNELIZA TIO N 1. Build an out-branching T ro oted at r b y depth -fi rst searc h. 2. T ransf orm T in to a min im al out-branc hing using 1-c han ge. 3. If the num b er of lea ve s of T is at most n − k , return ’YES’. 4. Otherwise Reduce b y Rule 1 if p ossible. If this is n ot p ossible, return the in stance (it is irr educible). Let T b e the new out-branc hing obtained by the co nstru ction in the p ro of of Lemma 4.4. T ransf orm T into a minimal out-br anc hing u sing 1-c h ange. Go to line 3. 12 Step 1-3 tak e O ( n 2 m ) time by Lemma 4.2. At step 4, we can construct the bipartite graph B in time O ( n 3 ), and V ( B ) and E ( B ) are b ounded by n + 2 k + 4 k 2 = O ( n 2 ) and m + 4 k 2 n = O ( n 3 ) resp ectiv ely . Due to Theorem 4.5, in O ( n 5 ) time w e can reduce the in stance b y Rule 1 or decla re the instance irreducible. Since the size of an instance is s trictly decrea sed at eac h step o f the reduction, w e conclude that the algorithm K ERNELIZA TIO N r uns in O ( n 6 ) time. 5 Solving MinLOB-P BGV In order to ac hiev e a b etter run ning time we pro vide an alternativ e wa y of sho wing the fixed-parameter tractabilit y of the MinLOB-PBGV p roblem based on the notion of tr e e de c omp osition . A tr e e de c omp osition of a n (undirected) graph G is a p air ( X, U ) where U is a tree whose vertice s w e will call no des and X = { X i : i ∈ V ( U ) } is a c ollection of subsets of V ( G ) (called b ags ) such that 1. S i ∈ V ( U ) X i = V ( G ), 2. for eac h edge { v , w } ∈ E ( G ), there is an i ∈ V ( U ) suc h that v , w ∈ X i , and 3. for eac h v ∈ V ( G ) the set of no des { i : v ∈ X i } form a subtree of U . The width of a tree decomp osition ( { X i : i ∈ V ( U ) } , U ) equals max i ∈ V ( U ) {| X i | − 1 } . The tr e ewidth of a graph G is th e minim um width o ver all tree decomp o- sitions of G . W e use the notation t w( G ) to denote the treewidth of a graph G . By a t r e e de c omp osition of a digr aph D we will mean a tree decomp osition of the un derlying graph U G ( D ). Also, tw( D ) = tw( U G ( D )) . Theorem 5.1. Ther e is an p olynomial time algorithm that, given an i nstanc e ( D , k ) of the MinLOB- PBGV pr oblem, either finds a solution or establishes a tr e e de c omp osition of D of width at most 2 k − 2 . Pr o of. By Lemma 4.2, there is a p olynomial time algorithm which either fi n ds a solution or sp ecifies a v ertex co v er C of D of size at most 2 k − 2. Let I = { v 1 , . . . , v s } = V ( D ) \ C . Consider a star U with no des x 0 , x 1 , . . . , x s and edges x 0 x 1 , x 0 x 2 , . . . , x 0 x s . Let X 0 = C and X i = X 0 ∪ { v i } for i = 1 , 2 , . . . , s and let X j b e the bag corresp onding to x j for every j = 0 , 1 , . . . , s . Obs er ve that ( { X 0 , X 1 , . . . , X s } , U ) is a tree d ecomp osition of D and its width is at most 2 k − 2 . Theorem 5.1 sho ws that an in stance ( D , k ) of th e MinLOB-PBGV p roblem can b e reduced to another instance with treewidth O ( k ). Using s tand ard dy- namic programming tec hniques w e can solve this instance in time 2 O ( k log k ) n O (1) . 13 W e can further ac celerate the solution pro cedu re using kerneliza tion. If w e first find the k ern el and then establish the tree decomposition, the resulting algo rithm will run in time 2 O ( k log k ) + n 6 . No w w e hav e the follo wing result. Theorem 5.2. The MinLOB-PBGV pr oblem c an b e solve d by an additive FPT algorithm of running time O (2 O ( k log k ) + n 6 ) . 6 Related Problems In this section w e consider transformations from MinPC and MaxIOT in tro duced in Section 1 in to MinLOB. W e start fr om MinPC. F or a digraph D , let p c( D ) b e the minim um n umber of v ertex-disjoin t di- rected paths in D . W e ha v e the follo w ing: Prop osition 6.1. L et D = ( V , A ) b e a digr aph and let ˆ D b e the digr aph obtaine d fr om D by adding a new ve rtex s and al l p ossible ar cs fr om s to V . Then p c( D ) = ℓ min ( ˆ D ) . Pr o of. Since a collection of p disjoin t directed p aths in D co vering V ( D ) corre- sp onds to an out-branc hing of ˆ D with p lea ves, we ha v e p c( D ) ≥ ℓ min ( ˆ D ). Let B b e an out-branc hing of ˆ D with p lea v es. W e sa y that a vertex x of B is br anching if d + B ( x ) > 1 . Consider a maximal d irected path Q of B n ot con taining branch- ing v ertices. Observe t hat B − V ( Q ) has p − 1 lea v es. Thus, we ca n decomp ose the vertic es of B into p disjoint directed p aths. Deleting the vertex s fr om this collect ion of p aths, w e see that p c( D ) ≤ ℓ min ( ˆ D ). Thus, p c( D ) = ℓ min ( ˆ D ). Fixed-parameter tractabilit y of MinLOB-PBGV and Prop osition 6.1 imply that the parameterized problem p c( D ) ≤ n − k is FPT, to o. F or a digraph D and a v ertex v in D , let D v denote the subgraph of D obtained from the su bgraph of D induced b y all ve rtices reac hable from v by deleting all arcs en tering v . Th e follo wing result allo w s us to redu ce MaxIOT to MinLOB. Prop osition 6.2. L et D b e a digr aph and let S b e the set of vertic es b elonging to al l str ongly c onne cte d c omp onents of D without inc oming ar cs. L et B v b e an out-br anching of D v of minimum numb er of le aves, and let s b e a vertex of S such that ℓ min ( B s ) ≤ ℓ min ( B v ) for e ach v ∈ S . Then B s is a maximum internal out-tr e e of D . Pr o of. Let T b e a solution to MaxIOT for D w ith maximum p ossible num b er of le aves and let r b e the ro ot of T . Observe that r ∈ S as otherwise we would b e able to extend T to an out-tree T ′ with more inte rn al v ertices su c h that the ro ot of T ′ is in S . O bserv e also that T is an out-branching of D r as otherwise w e w ould b e able to extend T to an o ut-bran ching T ′ of D r suc h that T ′ has 14 more either lea ves or in ternal v ertices than T . Clearly , ℓ min ( B r ) ≤ ℓ min ( B v ) for eac h v ∈ S . T ogether with the ab ov e-prov ed results, Prop osition 6.2 implies that Max- IOT for acycli c digraphs is p olynomially-time solv able and that the problem of finding a n out-tree with at lea st k in ternal ve rtices in an arbitrary digraph D is FPT. Recall that the pr oblem of findin g an out-branc hing with at least k in ternal vertice s has a quadratic k ernel. How ever, the problem of finding an out-tree with at least k in ternal v ertices d o es not ha ve a p olynomial-size k ernel unless PH=Σ 3 p . This easily follo ws f rom Lemmas 1-3 in [4 ]. 7 F urther Researc h W e ha ve pro v ed that MinLOB-PBGV is FPT . It wo uld b e in teresting to c hec k whether MinLOB-PBGV admits significantl y more efficien t FPT algorithms, i.e., algorithms of complexit y O ( c k n O (1) ), where c is a constant . Another inter- esting question is whether MinLOB-PBGV adm its a linear-size kernel or not. Ac kno wledgemen ts Researc h of Gutin and Kim w as su p p orted in part b y an EP SR C gran t. P art of th e pap er was w ritten wh en Razgo n w as visiting Departmen t of Computer Science, Roy al Hollo wa y , Universit y of Lond on. Th e researc h of Razgon at the Departmen t of Computer Science, Unive rsity College Cork wa s su pp orted by Science F oundation I r eland Gran t 05/ IN/I886. References [1] H. A lt, N. Blum, K. Melhorn, and M. Paul, Computing of maxim um cardi- nalit y matc hing in a bip artite graph in time O ( n 1 . 5 p m/ log n ). Inf. Pr o c. L etters 37 (1991 ) 237–240. [2] J. Bang-Jensen and G. Gutin, Digr aphs: The ory, Algor ithms and Applic ations . Springer, 2000; freely a v ailable online at www.cs.r hul.ac.uk /books/dbook/ [3] J. Bang-Jensen and A. Y eo, The m inim um span n ing strong sub digraph problem is fixed parameter tractable. T o app ear in Discr ete Applie d Math. [4] H.L. Bo dlaender, R.G. Do wney , M.R. F ello ws and D. Herm elin, On prob- lems without p olynomial ke rnels. T ec hnical rep ort UU-CS-2007 -046 (20 07), Utrec h t Univ ersit y . [5] B. C hor, M. F ello ws and D . Juedes, Linear Kernels in Linear T ime, or Ho w to Sa ve k Colors in O ( n 2 ) steps. Pr o c. WG’20 04 (2004 ). 15 [6] R.G. Do wney and M.R. F ello ws, Par ameterize d Com plexity , Sp ringer, 1999. [7] A. Demers and A. D o wnin g, Minim um leaf spann ing t ree. US Pa ten t no. 6,105, 018, August 2000. [8] M. F ello ws, P . Heggernes, F. R osamond , C. Slop er an d J .A. T elle, Finding k -disjoin t triangles in an arb itrary graph. Pr o c. WG’2004 (200 4). [9] H. F ern au , Par ameterize d Algorithmics: A Gr aph-the or etic Appr o ach. Ha- bilitation thesis, U. T ¨ ubingen, 2005. [10] H. F ernau, Parameteriz ed Algorithmics for L in ear Arrangemen t Pr oblems. Manscript, July 2005. [11] J. Flum and M. Grohe, Par ameterize d Complexity The ory , Sprin ger, 20 06. [12] J. Guo and R. Niedermeier, Invit ation to Data Reduction and Pr ob lem Kernelization. ACM SIGACT News 38 (2007), 31–45. [13] G. Gutin, A. Rafiey , S. Szeider and A. Y eo, The Linear Arrangemen t Prob- lem P arameterized Ab o v e Guarante ed V alue. The ory of Computing Systems 41 (2007), 521–538. [14] G. Gu tin, I. Razgo n and E.J. Kim, Minimum Leaf Out-Branc hing Problems. Pr o c. AAIM’08 LNCS 5034 (2008), 235–2 46. [15] G. Gutin, S. Szeider and A. Y eo, F ixed-Pa rameter Complexit y of M inimum Profile Problems. T o app ear in Algorithm ic a . [16] P . Heggernes, C. Paul, J.A. T elle, and Y. Villanger, Inte rv al completio n with few edge s. Pro c. STOC 2007 - 39th ACM S ymp osium on Theory of Computing, 374 – 381. [17] M. Maha jan and V. Raman, P arameterizing ab o v e guaran teed v alues: MaxSat and MaxCut. J. A lgorithms 31 (1999), 335–354. [18] R. Niedermeier. Invitation to Fixe d-Par ameter Algorithms , Oxford Univ er- sit y Pr ess, 200 6. [19] E. Prieto and C. Slop er, Either/Or: Using V ertex Co v er Structure in d e- sigining FPT-algorithms - The C ase of k -In ternal Spannin g T ree, Pr o c. W A DS’2003 LNCS 2748 (2003), 465–483. [20] E. Pr ieto and C. Slop er, Redu cing T o Ind ep endent S et Str u cture - The Case of k -Inte rn al S panning T ree, Nor dic Journal of Computing 15 (200 5), 308–3 18. 16
Original Paper
Loading high-quality paper...
Comments & Academic Discussion
Loading comments...
Leave a Comment