Design by Measure and Conquer, A Faster Exact Algorithm for Dominating Set
The measure and conquer approach has proven to be a powerful tool to analyse exact algorithms for combinatorial problems, like Dominating Set and Independent Set. In this paper, we propose to use measure and conquer also as a tool in the design of al…
Authors: Johan M. M. Van Rooij, Hans L. Bodlaender
Symposium on Theoretical Aspects of Computer Science 2008 (Bordeaux), pp. 657-668 www .stacs-conf .org DESIGN BY MEASURE AND CONQUER A F ASTER EXACT ALGORITHM F OR DOMINA TING SET JOHAN M. M. V AN ROOIJ AND HA NS L. BODLAENDER Institute of Information and Computing Sciences, Utrech t Universit y , P .O.Box 80.089, 3508 TB Utrech t, The Neth erlands E-mail addr ess : jmmrooij@c s.uu.nl E-mail addr ess , Hans L. Bodlaender: hansb@cs.uu .nl URL : http://w ww.cs.uu.nl Abstra ct. The me asur e and c onquer approach has prov en to b e a p ow erful tool to analyse exact al gorithms for com binatorial problems, lik e Domina ting Set and Indepe ndent Set . In th is pap er, we prop ose to use measure and conqu er also as a to ol in the design of algorithms. In an itera tive process, w e ca n obtain a serie s of br anch and r e duc e alg orithms. A mathematical a nalysis of an algori th m in the series with m easure and conquer results in a quasiconv ex p rogramming p roblem. The solution by computer to t his problem not only giv es a b ound on the running time, b ut also can giv e a n ew reduction rule, th us giving a new, p ossibly fas ter algorithm. This makes design by me asur e and c onquer a form of c omputer aide d algorithm design . When we apply the method ology to a Set Co ver mo delling of the Domina ting Set problem, w e obtain the curren tly fastes t known exact algorithms for Domina ting Set : an al gorithm th at uses O (1 . 5134 n ) time and polyn omial space, and an algorithm that u ses O (1 . 5063 n ) time. 1. In tro duction The design of fast exp onential time algorithms for finding exact solutions to NP-hard problems su c h as In dependen t Set and Domina ting Set has b een a topic for r esearc h for o v er 30 y ears, see e.g., the results on Inde pendent Set in the 1970s b y T arjan and T ro jano wski [18, 19]. A num b er of different tec hniques h av e b een us ed f or these and other exp onent ial time algorithms [5, 21, 22]. An imp ortant paradigm for the design of exact alg orithms is br anch and r e duc e , p i- oneered in 1960 by Da vis and Pu tn am [1 ]. T ypically , in a br anc h and redu ce algo rith m , 1998 ACM Subje ct Classific ation: F.2.2. [Analysis of Algorithms and Problem Complexit y]: N on- numerical Algorithms and Problems—computations on d iscrete stru ct ures; G.2.2 . [Discrete Mathematics]: Graph Theory—graph algorithms; I.2.2. [Artificial In telligence]: Automatic Programming—automatic anal- ysis of algorithms. Key wor ds and phr ases: exact algorithms, exp onential time algorithms, b ranc h and reduce, measure and conquer, dominating set, comput er aided algorithm design. c Johan M. M. van Rooij and Hans L. Bodlaender CC Crea tive Commons Attribution-NoDer ivs License 658 JOHAN M. M. V AN R OOIJ AND HANS L. BODLAE N DER a collection of r eduction ru les and branching rules are giv en. Each reduction rule simpli- fies the instance to an equiv alen t, sim p ler ins tance. If no ru le applies, the branc hing rules generate a collectio n of t wo or more instances, on which the algo rithm recurses. An imp ortan t recent develo pm en t in the analysis of branch and reduce algorithms is me asur e and c onquer , w hic h has b een in tro du ced by F omin, Grand oni and Kratsc h [4]. Th e measure and conquer approac h helps to obtain go o d up p er b ounds on the running time of branc h and reduce algorithms, often impro ving up on the curren tly b est kno wn b ounds for exact a lgorithms. It has b een used successfully o n Domina t ing Se t [4], Indep endent Set [6], Domina ting Clique [15], the num b er of minim al dominating sets [9], Connected Domina ting Set [7], M inimum I ndepende nt Domina ting Set [12], and p ossibly others. In this pap er, w e show that the measure and conquer approac h can not only b e u sed for the a nalysis of exact algo r ith m s, bu t a lso for t he design of suc h alg orithms. More sp ecifically , measure and conquer uses a non-standard s ize measure for in s tances. T his measure is based on w eigh t v ectors, whic h are co mp u ted b y solving a qu asicon v ex programming pr oblem. Analysis of the solution of this q u asicon v ex program yields not o nly an upp er b ound to the runn in g time of the algorithm, bu t also shows where we should imp ro ve the algorithm. Th is can lead to a new rule, wh ic h w e add to the b ranc h and red uce algo rith m . W e apply this design by me asur e and c onquer m etho d ology to a Set Cover mo delling of the Domina ting Set problem, identic al to the setting in whic h measure and conquer w as first in tro d uced. If we s tart with the trivial algorithm, then, we can obtain in a num b er of steps the original algorithm of F omin et al. [4], b ut with additional steps , w e obtain a faster algorithm, u sing O (1 . 5134 n ) time and p olynomial space, with a v ariant that us es exp onent ial memory and O (1 . 5063 n ) time. W e also sho w that at this p oin t w e cannot impro ve this measur e and conqu er computed run ning time, unless we choose a d ifferen t measure or c hange the branc hing rules. While for sev eral classic com binatorial problems, the first non-trivial exact algorithms date man y y ears ago, for the Domina ting Set problem, th e first algorithms w ith running time O ∗ ( c n ) with c < 2 are from 2004, with three ind ep endent pap ers: by F omin et al. [10], b y Randerath and Schiermey er [16], and b y Grandoni [13]. The so far fastest algorithm for Domina ting Se t w as found in 2005 b y F omin, Grandoni, and Kratsc h [4]: this algorithm uses O (1 . 5260 n ) time and p olynomial space, or O (1 . 5137 n ) time and exp onential space. 2. Preliminaries Giv en a collection of non-empty sets S , a set c over of S is a su b set C ⊆ S suc h that ev ery elemen t in an y of the sets in S o ccurs in some set in C . In the Set Cover pr oblem w e are given a collec tion S and are ask ed to compute a set co v er of minim um cardinalit y . The univ erse U S of a Set Cover problem instance is the set o f all elemen ts in any set in S ; U S = S S ∈S S . Th e frequency f ( e ) of an ele ment e ∈ U S is the n umb er of sets in S in whic h this element occur s. Let S ( e ) = { S ∈ S | e ∈ S } b e the set of sets in S in wh ich the elemen t e occur s. W e define a connected comp onen t C in a Set Cover problem ins tance S in a n atural w a y: a minimal non-empty s u bset C ⊆ S for wh ich all e lements in the sets i n C o ccur only in sets con tained in C . T he d imension d S of a Set Cover pr oblem instance is the sum of the num b er of sets in S and the num b er of elemen ts in U S ; d S = |S | + |U S | . Let G = ( V , E ) b e an undirected graph. A subset D ⊆ V of no des is called a do minating set if ev ery no de v ∈ V is either in D or adjacen t to some no de in D . The Domina ting Set problem is to compute for a giv en graph G a dominating set of minim u m cardinalit y . DESIGN BY MEASURE AN D CONQUER: A F ASTER ALGORITHM FOR DOMINA TING SET 659 W e can reduce the minim um dominating set pr oblem to the S et Cover problem by in tro du cing a set for eac h nod e of G whic h con tains the no d e itself an d its neigh b ours; S := { N [ v ] | v ∈ V } . Thus w e can solv e a Domina ting Set problem on a graph of n n o des b y a min imum set co v er algo r ith m running on an instance of dimension d = 2 n . Both problems are long kno wn to b e NP-co mp lete [11, 14], whic h motiv ates the searc h for fast exp onentia l time alg orithms. 3. A F aster Exact Algor ithm for Dominating Set In this section, w e give our new algorithm for Domina ting Set . The algorithm is an impr o v ement to the algorithm b y F omin et al. [4]; it is obtained from this algorithm b y adding some additional redu ction ru les. These rules w ere deriv ed usin g the design b y measure and conquer approac h, see Section 4. After in tro du cing our algorithm, we recall the necessary bac kground of the measure and conquer metho d [4]. 3.1. The Algorithm Our algorithm for the Domina ting Set problem uses the Se t Cover m o delling of Domina ting S et sho wn in Section 2. It is a branch a n d reduce algo r ith m on this mo delling consisting of four simple reduction ru les, one base case f or the recurs ion and a b ranc hing rule. See Algorithm 1 . F or a giv en problem instance we first apply the follo wing r eduction rules: (1) Base c ase . If a ll set s in the instance are of size at most tw o then fin ding a minim u m set cov er is equiv alen t to fin ding a maximum matc hin g in a graph. Introduce a n o de for eac h elemen t and an ed ge for eac h set of size t wo . No w the maxim um matc hing joined with some sets co ntaining the unm atched no des form a minim um set co v er. This matc hing can b e co mp uted in p olynomial time [2]. (2) Splitting c onne cte d c omp onents . If th e instance con tains m ultiple connected co mp o- nen ts, compute the minim um set co v er in eac h connected comp onen t separately . (3) Subset rule . If the instance cont ains s ets S 1 , S 2 with S 1 ⊆ S 2 , then we remov e S 1 from the in stance. Namely , in eac h minimum set cov er that con tains S 1 , we can replace S 1 b y S 2 and obtain a minimum set co v er without S 2 . (4) Subsumption rule . If the set of sets S ( e ′ ) in whic h an elemen t e ′ o ccurs is a su bset of the set of s ets S ( e ) in which anot h er element e occurs, we r emov e the elemen t e . F or an y set co ver, co v ering e ′ also co v ers e . (5) Unique element or singleton rule . If any set of size one remains in the instance after application of the p r evious ru les, we add this set to the set co v er. F or the elemen t in t h is set m ust o ccur uniquely in this set, otherwise it w ould ha ve b een a su bset of another set and ha ve b een remo v ed b y rule 3. (6) A voiding unne c essary br anchings b ase d on fr e qu e ncy two elements . F or an y set S in the problem instance let r 2 b e the n umber of frequency t w o elemen ts it con tains. Let m b e the num b er of elemen ts in the union of s ets con taining the other o ccurr ences of these frequency t wo eleme nts, excluding any elemen t already in S . If for an y set S : m < r 2 then include S in the set co v er. This r u le is correct since if w e w ould branc h o n S and includ e it in the set co v er w e w ould cov er | S | elements with one set. If the set cov er do es not use S , it must use all sets co ntaining the other o ccurrence of t h e frequency tw o elemen ts, since they ha v e 660 JOHAN M. M. V AN R OOIJ AND HANS L. BODLAE N DER b ecome unique elemen ts now. Not ice that by Rule 4 all other o ccurr ences of the frequency t w o elements must b e in different sets and th us w e would co ve r | S | + m elemen ts w ith r 2 sets. So if m < r 2 the first case can b e pr eferred o v er the second: w e can ju st add S to th e co ve r and hav e r 2 − 1 ≤ m sets left to co v er at lea st this m uch ele ments. F or the branching r ule, we select a set of maxim um c ard in alit y and create t w o subproblems b y either includin g it in the min im um set co v er and r emo ving all newly co v ered elemen ts from the problem instance or removing it. Algorithm 1 Algorithm Designed by Measure and Conquer MSC( S ) = { if max {| S | | S ∈ S } ≤ 2 then return minimum set co v er of S b y computing a matc hin g else if ∃ C ⊆ S : C 6∈ {∅ , S } , { S ( e ) | e ∈ S, S ∈ C } = C then return MSC( C ) + MSC ( S \C ) else if ∃ S, S ′ ∈ S : S 6 = S ′ , S ⊆ S ′ then return MSC( S \{ S } ) else if ∃ e, e ′ ∈ U S : e 6 = e ′ , S ( e ) ⊇ S ( e ′ ) then S ′ = MSC ( { S \{ e }| S ∈ S } ) return { S ∪ { e }| S ∈ S ′ , S ∪ { e } ∈ S } ∪ { S | S ∈ S ′ , S ∪ { e } 6∈ S } else if ∃ { e } ∈ S then return {{ e }} ∪ MSC( S \{{ e } } ) else if ∃ S : | S { S ′ \ S | e ∈ S, f ( e ) = 2 , S ′ ∈ S ( e ) }| < |{ e ∈ S | f ( e ) = 2 }| then return S ∪ MSC( { S ′ \ S | S ′ ∈ S \{ S }} ) else Let S := argmax S ′ ∈S ( | S ′ | ) P = { MSC( S \{ S } ) , S ∪ MSC( { S ′ \ S | S ′ ∈ S \{ S }} ) } return argmin P ∈P ( | P | ) end if } 3.2. Running time analysis by Measure and Conquer The basic id ea of me asur e and c onquer is the usage of a non-standard measure f or the complexit y of a pr oblem in s tance in com bination w ith an extensiv e sub case analysis. I n the case of Se t Co ve r , w e giv e w eights to set sizes and element frequencies, and sum these w eigh ts ov er all items and sets. W e en umer ate man y sub cases in whic h the algorithm can branc h and d eriv e recurr ence r elations f or eac h of these ca ses in terms of these wei ghts. Finally w e obtain a large n u merical optimisatio n problem which computes the weigh ts corresp onding to the smallest solution to all recurren ce relations, giving an u p p er b ound on the run ning time of our algo r ithm. T his analysis is similar to [4]. W e let v i , w i ∈ [0 , 1] be the weigh t of an element of frequency i and a set of size i resp ectiv ely , and set our variable me asur e of c omplexity k S to: k S = X S ∈S w | S | + X e ∈U S v f ( e ) notice : k S ≤ d S DESIGN BY MEASURE AN D CONQUER: A F ASTER ALGORITHM FOR DOMINA TING SET 661 Sets of differen t sizes and elemen ts of different frequencies con tribute equally to th e dimen- sion of th e instance, bu t now larger sets and higher frequ en cy elements can contribute more to the measur ed complexit y of the ins tance. F urthermore we set v i = w i = 0 , i ∈ { 0 , 1 } since all frequency one ele ments and size one sets are remo v ed b y the reduction r ules. F or later use w e introdu ce quan tities repr esen ting the reduction in problem complexit y when the size of a set or the frequency of an element is redu ced b y one. F or tec hnical reasons, these quant ities m ust b e non-negativ e. ∆ w i = w i − w i − 1 ∆ v i = v i − v i − 1 ∀ i ≥ 1 : ∆ v i , ∆ w i ≥ 0 The next s tep will b e to deriv e rec u rrence relati ons r ep resen ting problem in stances the algorithm branc h es on. Let N ( k ) b e the num b er of subp roblems generated in ord er to sol ve a problem of measured complexit y k . And let ∆ k in (include S ) and ∆ k out (discard S ) b e the difference in measured complexit y of b oth sub problems compared to the p roblem instance we branc h on. Finally let | S | = P ∞ i =2 r i , wh ere r i the num b er of elemen ts in S of frequency i . If we add S to the set cov er, S is remo ved together with all its elements. Th is re- sults in a redu ction in size o f w | S | + P ∞ i =2 r i v i . Because of the remo v al of these ele- men ts, other sets are redu ced in size; this leads to an add itional complexit y redu ction of at least min j ≤ | S | { ∆ w j } P ∞ i =2 ( i − 1) r i . T o kee p the formula (and the n ext) linear, w e set min j ≤ | S | { ∆ w j } = ∆ w | S | and k eep the formula correctly mo d elling the algorithm b y in tro du cing the follo wing constraints on the w eigh ts: ∀ i ≥ 2 : ∆ w i ≤ ∆ w i − 1 One can sho w that includ in g t h ese in the n umerical optimisation pr oblem do es not c hange the solution, as it giv es the same w eigh ts. The constrain ts help to considerably sp eed up this optimisation pro cess. If w e discard S , we also remo ve it fr om th e p roblem instance, and hence all its elemen ts are reduced in frequency by one. So w e hav e a complexit y reduction of w | S | + P ∞ i =2 r i ∆ v i . Besides this redu ction, the sets whic h conta in the second o ccurrences of any frequency t wo elemen t are in cluded in the set co ve r. Notice that these must b e differen t sets due to reduction Rule 4 . Because of Ru le 6 we know t h at at least r 2 other elemen ts m ust b e in these sets as well, and these also must o ccur somewhere else in the instance, hence ev en more sets are reduced in size. Summation leads to an additional size red u ction of r 2 ( v 2 + w 2 + ∆ w | S | ). Here w e also use Rule 2 to mak e sure that not all these fr equency t w o eleme nts o ccur in t h e same set, b ecause in that case all considered sets form a connecte d comp onen t of at most fiv e sets wh ic h thus can be solve d in O (1) time. This leads to the follo wing set of recurrence relations: ∀ 3 ≤ | S | = P ∞ i =2 r i : N ( k ) ≤ N ( k − ∆ k out ) + N ( k − ∆ k in ) where ∆ k out = w | S | + ∞ X i =2 r i ∆ v i + r 2 ( v 2 + w 2 + ∆ w | S | ) ∆ k in = w | S | + ∞ X i =2 r i v i + ∆ w | S | ∞ X i =2 ( i − 1) r i W e mak e the problem finite b y setting for some large enough p all v i = w i = 1 for i ≥ p , and only consider the sub cases | S | = P p i =2 r i + r >p , where r >p = P ∞ i = p +1 r i . No w 662 JOHAN M. M. V AN R OOIJ AND HANS L. BODLAE N DER w e h av e a finite set of recurr ences whic h mo del our algorithm since the r ecurrences for the cases wh ere | S | > p + 1 are dominated b y those where | S | = p + 1. The b est v alue for p follo ws from the optimisation, for if chosen too small th e no w constant r ecurrences (w eigh ts equal 1) will dominate all others in the optim um , and if c hosen too large the extra v i and w i are optimised to 1 (and the o p timisation problem was un necessarily h ard). Here p equals 7. A solutio n to this set of recurrence rela tions will b e of the fo r m N ( k ) = α k , where α is the smallest solution of the set of in equalities: α k ≤ α k − ∆ k out + α k − ∆ k in Since k ≤ d where d the dimension of the pr oblem, w e kno w that t h e a lgorithm w ill h a v e a runn in g t ime of O (( α + ǫ ) d ), for an y ǫ > 0: O ( pol y ( d ) N ( k )) = O ( poly ( d ) α k ) ≤ O ( pol y ( d ) α d ) ≤ O (( α + ǫ ) d ) F r om here on w e let ǫ b e the error in the upw ard decimal rounding of α . So for an y giv en vecto r ~ v = (0 , v 2 , v 3 , v 4 , . . . ) and ~ w = (0 , w 2 , w 3 , w 4 , . . . ) we can now compute the runn ing time measured with these we ights. As a r esult w e hav e obtained a n um erical optimisati on problem: c ho ose the b est weigh ts so that the upp er b ound on th e runn in g t ime is minimal. The numerical solution to this p r oblem can b e found in the last cell of T able 1, r esulting in an upp er b oun d o n th e runn ing time of the algo rith m of O (1 . 2302 d ): 3.3. Quasicon v ex programming The sort of n umerical optimisation problems arising from measure and conqu er analyses are quasic onvex pr o g r ams , named after the kind of function w e are o ptimisin g: a quasic onvex function , whic h is a f unction with con v ex lev el sets { ~ x | q ( x ) ≤ λ } . T o our kn o wledge there are cu rren tly t wo d ifferen t tec hniqu es in u se to solve these quasicon v ex programs: rand omised searc h , and E ppstein’s sm o oth quasic onvex pr o gr amming algorithm [3]. W e ha v e implemented a v ariant of the second tec hnique; f or details see [20]. 3.4. Results As discussed, w e ha v e n o w obtained the follo wing result. Theorem 3.1. Algorithm 1 solves a Set Cover pr oblem instanc e of dimension d in O (1 . 2302 d ) time and p olynomial sp ac e. Using the minimum set co v er mo d elling of Domina ting S et this results in: Corollary 3.2. Ther e exists an algorithm that solves the Domina ting Set pr oblem in O (1 . 5134 n ) time and p olynomial sp ac e. W e can further reduce the time complexit y of the algorithm at the cost of exp onential space. Th is ca n b e done by dynamic programming; the alg orithm k eeps trac k of all solutions to sub problems solv ed and if the same subproblem tur ns up more than ones it is looked up. Notice th at qu erying and storing the subproblems ca n b e im p lemen ted in p olynomial time. W e compute the new time complexit y based on [8, 17] and obtain: Theorem 3.3. Algorithm 1, mo difie d as ab ove, solves a Set Co ve r pr oblem of dimension d in O (1 . 2273 d ) time and sp ac e. DESIGN BY MEASURE AN D CONQUER: A F ASTER ALGORITHM FOR DOMINA TING SET 663 Corollary 3.4. Ther e exists an algorithm that solves the Domina ting Set pr oblem in O (1 . 5063 n ) time and sp ac e. 4. Design b y Measure and Conquer The b eaut y of our algorithm lies in the fact that it h as b een designed us in g a form of c omputer aide d algo rithm design w hic h w e call design by me asur e and c onquer . Giv en a v ariable measure of complexit y as in the analysis in S ection 3.2 and a set of branc hin g rules, all p olynomial time computable reduction rules relativ e to this measur e and branc hing rules follo w b y the metho d . W e start with a trivial branc h and reduce algorithm, i.e. one without any reduction r ules and only consisting of the bran ching rule and a trivial base case (if the problem is empty , return ∅ ). Next we exhaustiv ely apply an improv emen t step, whic h comes u p w ith a n ew reduction r ule and hence a p ossib ly faster algorithm. This c hanges the algorithm analysis tec hnique measure and conquer in to a tec h nique for algorithm design. Th u s, this giv es a v ery nice p ro cess, wh ere a human inv en ts additional reduction ru les, and the compu tational p o w er of our co mp uter does the exte ns iv e measure and co n q u er analysis and p oin ts to all p ossible p oin ts of dir ect imp ro v ement. This combinatio n has pro ven to be su ccessful as we s ee from the results of S ection 3 . While constructing our algorithm, the previously fastest algorithm for Domina ting Set b y F omin et al. [4] has b een obtained as an intermediate step. It has no w been impro v ed up to a p oin t wh ere w e need to either change the branc hing rule (or add new br anc hing rules) or mo dify the measure and conquer analysis, i.e. u se a differen t v ariable measure or p erform a more elab orate sub case analysis. See T able 1 for information on the analysis and added ru les for all algorithms, from the starting trivial algorithm without an y redu ction ru les till we obtain Algorithm 1. 4.1. A Single Iteration: impro ving the previously fastest algorithm W e now demonstrate ho w th e improv emen t step w orks, by giving one such impro ve - men t as elaborate example, namely an impro v ement w e can make when w e start with the algorithm by F omin et al. [4]. Th is step is marked with a star in T able 1. Firs t w e p erform a measure and conquer analysis on th e curr en t algorithm giving us the optimal instan tiation of the v ariable measure, and an upp er b ound on the runn ing time of the algorithm. Next w e examine th e quasiconv ex fun ction we ha v e j ust optimised. The quasicon ve x function has the follo wing form: q ( ~ v , ~ w ) = max c ∈C q c ( ~ v , ~ w ) = max c ∈C n α ∈ R > 0 | 1 = α − ∆ k c out + α − ∆ k c in o where C is the set of all p ossib le ins tances the algorithm can branc h on and ∆ k c in , ∆ k c out are the d ifferences in m easured complexit y b et ween the generated subprob lems and b ranc hing sub case c . Eac h one of the functions q c is qu asicon v ex (see [3]), i.e. it has con v ex leve l sets. Th e situation is v ery similar to fin ding th e p oin t x of minim um maxim u m d istance to a set of p oint s P in N dimensional space: only a few p oin ts in P ha ve distance to x tight to this maxim um, and mo ving a wa y from x alw a ys results in at lea st one of th ese distances to increase. If one suc h tight point is mov ed or remo v ed, this directly influen ces the optim um x and the minimum ma ximum distance. 664 JOHAN M. M. V AN R OOIJ AND HANS L. BODLAE N DER W e no w consider the eigh t case s that are tigh t to the v alue of the quasicon v ex function q in the optim um. These are: | S | = r 2 = 3 , | S | = r 3 = 3 , | S | = r 4 = 3 , | S | = r 5 = 4 | S | = r 6 = 4 , | S | = r 6 = 5 , | S | = r 7 = 5 , | S | = r 7 = 6 No w, if w e can formulate a reduction rule that either further reduces the size of an y sub- problem generated in these cases, or remo ve s any of these cases complete ly , th en we lo w er the v alue of the corresp onding q c , or remo ve this q c resp ectiv ely , resu lting in a new optim um corresp onding to a faster run ning time. W e tak e the simplest case for impr o v ement; | S | as small as p ossible, and with as lo w frequency elemen ts as p ossible. This corresp ond s to an instance with: S = { 1 , 2 , 3 } existing next to: { 1 , 2 , 4 } , { 3 , 4 } W e emphasize that this is not an ent ire instance, but just a fr agmen t of an ins tance con- taining the s et S used f or branc hing and th e collect ion of sets in whic h the e lements from S also o ccur. In an instance corresp ond in g to this sub case the eleme nt 4 can b e of frequency t wo or higher, but all sets are of size three or smaller. W e note that w e do not need to branc h on this particular sub case: elemen ts 1 and 2 o ccur in e xactly the same sets, and t hus if a set co v er co vers one of these, the other is co vered as well. W e generalise this and formulate the subsump tion r ule (Rule 4 of Algorithm 1). No w we ha ve a new algorithm, for w hic h we can adjust the measure and conquer analysis, and rep eat this pr o cess. 4.2. The Pro cess Halts Ab o ve, w e discus s ed ho w to p erform one step of the design by measur e and conquer pro cess. F or a complete o v erview of the construction of Algorithm 1 s ee T able 1, with the relev ant data for eac h improv emen t step. Note from T able 1 that after eac h new step, the example wo rs t case instance part is no longer a v alid w orst case for the next step. As a result, at eac h step either some sub cases are remov ed b y using a larger smallest set S or b y removing small sets or elemen ts (setting v 1 = 0 or w 1 = 0), or the size reduction in the formula for ∆ k out is increased. After eac h step we refactored the reduction rules an d remo v ed p ossible sup erfluous ones. W e h a v e n ot included the formula for ∆ k in in this table, since it do es not c hange except that r 1 6 = 0 in early stages. It app ears that we m ust use a different appr oac h to obtai n a faster algorithm. Consid- ered the follo wing problem: Problem 4.1. Giv en a S et Co ver in stance S and a set S ∈ S with the pr op erties: (1) Non of the reduction rules of Algorithm 1 apply to S . (2) All sets in S ha ve ca r d inalit y at m ost three; | S | = 3. (3) Ev ery elemen t e ∈ S has fr equ ency t w o. Question: Does there exist a minimum set co v er of S contai n ing S ? Prop osition 4.2. Pr oblem 4.1 is NP-c omplete. Prop osition 4.2 implies that we cann ot formulate a p olynomial time reduction rule that remo v es the cur r en t simp lest w orst case of our algo r ith m by deciding on wh ether S is in a minim u m s et co v er or not, unless P = N P . DESIGN BY MEASURE AN D CONQUER: A F ASTER ALGORITHM FOR DOMINA TING SET 665 Latest new reduction rule Runnin g times for Set Cover and current formula for ∆ k out Domina ting Set sub cases considered instance part of the simp lest w orst case; w eigh ts v ectors ~ v and ~ w S − other o ccurrences of element s of S T rivial algorithm O (1 . 4519 d ) O (2 . 1080 n ) w | S | + P ∞ i =1 r i ∆ v i 1 ≤ | S | = P p i =1 r i + r >p ≤ p + 1 = 3 { 1 } − ∅ ~ v = (0 . 880 8 , 0 . 990 1 , . . . ) ~ w = (0 . 978 2 , . . . ) Stop when all sets of size one O (1 . 3380 d ) O (1 . 7902 n ) w | S | + P ∞ i =1 r i ∆ v i 2 ≤ | S | = P p i =1 r i + r >p ≤ p + 1 = 4 { 1 , 2 } − ∅ ~ v = (0 . 728 9 , 0 . 963 8 , 0 . 9964 , . . . ) ~ w = (0 . 461 5 , 0 . 9229 , . . . ) Include all frequency one elements O (1 . 2978 d ) O (1 . 6842 n ) w | S | + P ∞ i =2 r i ∆ v i + δ r 2 > 0 w 1 + δ | S | = r 2 =2 ∆ w 2 2 ≤ | S | = P p i =2 r i + r >p ≤ p + 1 = 5 { 1 , 2 } − { 1 , 2 } ~ v = (0 , 0 . 4818 , 0 . 8357 , 0 . 9636 , . . . ) ~ w = (0 . 424 0 , 0 . 8480 , 0 . 9676 , . . . ) Subset rule O (1 . 2665 d ) O (1 . 6038 n ) w | S | + P ∞ i =2 r i ∆ v i + δ r 2 > 0 ( w 2 + v 2 ) + δ | S | = r 2 =2 ∆ w 2 2 ≤ | S | = P p i =2 r i + r >p ≤ p + 1 = 7 { 1 , 2 } − { 1 , 3 } , { 1 , 4 } , { 2 , 3 } , { 2 , 4 } ~ v = (0 , 0 . 3900 , 0 . 7992 , 0 . 9318 , 0 . 9808 , . . . ) ~ w = (0 , 0 . 6973 , 0 . 909 3 , 0 . 9800 , . . . ) Compute matc hing for size t wo sets ∗ O (1 . 2352 d ) O (1 . 5258 n ) w | S | + P ∞ i =2 r i ∆ v i + δ r 2 > 0 ( w 2 + v 2 ) + δ | S | =3 ,r 2 ≥ 2 (∆ w 3 + δ r 2 =3 w 2 ) + δ | S | = r 2 =4 w 4 3 ≤ | S | = P p i =2 r i + r >p ≤ p + 1 = 7 { 1 , 2 , 3 } − { 1 , 2 , 4 } , { 3 , 4 } ~ v = (0 , 0 . 3978 , 0 . 7650 , 0 . 9263 , 0 . 9842 , . . . ) ~ w = (0 , 0 . 3787 , 0 . 757 5 , 0 . 9103 , 0 . 9763 , . . . ) Subsumption rule O (1 . 2339 d ) O (1 . 5223 n ) w | S | + P ∞ i =2 r i ∆ v i + δ r 2 > 0 ( r 2 w 2 + v 2 ) + δ | S | = r 2 =3 ∆ v 3 3 ≤ | S | = P p i =2 r i + r >p ≤ p + 1 = 7 { 1 , 2 , 3 } − { 1 , 4 } , { 2 , 4 } , { 3 , 4 } ~ v = (0 , 0 . 3545 , 0 . 7455 , 0 . 9203 , 0 . 9818 , . . . ) ~ w = (0 , 0 . 3755 , 0 . 751 0 , 0 . 9061 , 0 . 9745 , . . . ) Av oid unnecessary branc hings O (1 . 2313 d ) O (1 . 5160 n ) w | S | + P ∞ i =2 r i ∆ v i + r 2 ( w 2 + v 2 ) + δ r 2 > 1 ( r 2 − 1)∆ w | S | 3 ≤ | S | = P p i =2 r i + r >p ≤ p + 1 = 8 { 1 , 2 , 3 } − { 1 , 4 } , { 2 , 5 } , { 3 , 6 } ~ v = (0 , 0 . 2699 12 , 0 . 689810 , 0 . 892666 , 0 . 965849 , 0 . 992140 , . . . ) ~ w = (0 , 0 . 376088 , 0 . 752176 , 0 . 907558 , 0 . 974394 , 0 . 999212 , . . . ) Connected comp onents (final) O (1 . 2302 d ) O (1 . 5134 n ) w | S | + P ∞ i =2 r i ∆ v i + r 2 ( w 2 + v 2 + ∆ w | S | ) 3 ≤ | S | = P p i =2 r i + r >p ≤ p + 1 = 8 { 1 , 2 , 3 } − { 1 , 4 } , { 2 , 5 } , { 3 , 6 } ~ v = (0 , 0 . 2194 78 , 0 . 671386 , 0 . 876555 , 0 . 956850 , 0 . 988195 , . . . ) ~ w = (0 , 0 . 375418 , 0 . 750835 , 0 . 905768 , 0 . 971965 , 0 . 998158 , . . . ) ∗ Algorithm b y F omin, Grand on i and K ratsc h [4]. T able 1: Th e iterati ons of the design by measure and conquer pro cess. 666 JOHAN M. M. V AN R OOIJ AND HANS L. BODLAE N DER W e can construct simila r NP-complete problems for all other w orst cases of Algorithm 1. Therefore Al gorithm 1 is optimal in some sense: we cannot s traigh tforw ardly improv e it b y p erforming another iteration. In order to obtain a f aster b ranc h and redu ce algorithm u sing p olynomial time reduction r ules with a smaller measure and conquer p ro ve d time b ound, it is necessary to either c han ge the v ariable measure, the branc hin g r u le(s), or p erform a more extensiv e su b case analysis. V er y recen tly , w e pursued the last option with little result. W e t ried to f urther sub divide the frequency tw o elemen ts in the branc h set d ep ending on the size of the set con taining their second o ccur en ce (t wo or larger) and if this is a set of size t wo, on th e frequency of the other elemen t in this set. This resulted in a set of very tec hnical r eduction rules and a small sp eedup for the case where w e us e only p olynomial space. This sp eedu p, ho wev er, w as almost completely lost when using exp onentia l s pace b ecause some of the w eight s in v olv ed b ecame almost zero. 5. Conclusion and F urther Researc h In this pap er, w e hav e g iven the curren tly fastest exact algo rithm for the Domina ting Set problem. Besides setting the current record for this central graph theoretic problem, w e also hav e sho wn that measure and conquer can b e used as a tool for the design of algorithms. W e ha v e s ho wn that there exists a strong r elation b etw een the c h osen v ariable measure, the br anc hing r ule(s) and the r eduction ru les of a measure and conquer based algorithm. W e in tend to furth er inv estiga te this relation and examine to wh at p oin t we can deduce not only reduction rules, bu t also branc hing rules from the giv en measure. W e plan to apply th e design by me asur e and c onque r method to a num b er of other com binatorial problems, and hop e and exp ect th at in a num b er of cases, suc h a computer aided algorithm d esign will give further impr ov emen ts to the b est kn o wn exact alg orithms for these problems. In this pap er, w e observ e that measure and conquer can b e used as a form of c omputer aide d algorithm design . Another intriguing question is whether we can automate some additional steps in the design pro cess, e.g., can w e automatically obtain red u ction ru les from the solution of the qu asicon v ex program? References [1] M. David and H. Putnam. A computing pro cedure for quantification theory . J. ACM , 7:201–21 5, 19 60. [2] J. Edmond s. Paths, trees, and flow ers. Canad. J. Math. , 17:445–467 , 1965. [3] D. Eppstein. Quasicon vex analysis of bac ktracking algorithms. In Pr o c e e dings of the 15th Annual A CM- SIAM Symp osium on Discr ete Algorithms, SODA 2004 , pages 781–790 , 2004 . [4] F. V. F omin, F. Grandoni, and D. Kratsch. Measure and conquer: Domination — a case stu dy . In Pr o c e e dings of the 32nd International C ol lo quium on Automata, L anguages and Pr o gr amming, ICALP 2005 , pages 191–203. Sp ringer V erlag, Lecture Notes in Compu t er S cience, vol. 3580, 2005. [5] F. V. F omin, F. Grandoni, and D. Kratsc h. Some new techniques in design and analysis of ex act (exp onential) algori th ms. Bul letin of the EA TCS , 87:47–77, 2005. [6] F. V. F omin, F. Grandoni, and D. Kratsc h . Measure and conq uer: a simple O (2 0 . 288 n ) indep end ent set algorithm. In Pr o c e e dings of the 16th Annua l A CM-SIAM Symp osium on Discr ete Algorithms, SODA 2006 , pages 18–25, 2006. DESIGN BY MEASURE AN D CONQUER: A F ASTER ALGORITHM FOR DOMINA TING SET 667 [7] F. V. F omin, F. Grand oni, and D. Kratsch. Solving connected dominating set faster than 2 n . In S. Arun- Kumar and N. Garg, editors, Pr o c e e di ngs 26th International Com fer enc e on F oundations of Softwar e T e chnolo gy and The or etic al Computer Scienc e, FSTTCS 2006 , pages 152 –163. Springer V erlag, Lecture Notes in Computer Science, vol. 4337, 2006. [8] F. V. F omin, F. Grandoni, and D. Kratsc h. A measure & conq uer approac h for the analysis of exact algorithms. T ec h n ical Report 359, Department o f Informatics, Un iver sity of Bergen, Bergen, Norw ay , 2007. [9] F. V. F omin, F. Grand on i, A . Pyatkin, and A. A . Stepanov. Boun d ing the number of minimal dominating sets: a measure and conquer approac h. I n Pr o c e e dings 16th Internat i onal Symp osium on A lgorithms and Computation, ISAAC 2005 , pages 192–203. Springer V erlag, Lecture N otes in Compu ter Science, vol. 3827, 2005. [10] F. V . F omin, D. Kratsch, and G. J. W oeginger. Exact (expon ential) algorithms for the dominating set problem. In J. Hromko vi˘ c, M. Nagl, and B. W estfec htel, editors, Pr o c e e dings 30th International Workshop on Gr aph-The or etic Conc epts in C om puter Scienc e WG’04 , page 245=256. Springer V erlag , Lecture Notes in Computer Science, vol. 3353, 2004. [11] M. R. Garey and D . S . Johnson. Com puters and Intr actability, A Guide to the The ory of NP- Completeness . W.H. F reeman and Company , N ew Y ork, 1979. [12] S . Gaspers and M. Liedloff. A branc h- and-reduce algorithm for find ing a minimum indep endent dominat- ing set in graphs. In F. V . F omin, editor, Pr o c e e dings 32nd I nternational Workshop on Gr aph-The or etic Conc epts i n Computer Scienc e WG’06 , pages 78–89. S pringer V erlag , Lecture Notes in Computer Sci- ence, vol. 4271, 2006. [13] F. Grandoni. A note on the complexity of minimum dominating set. J. Di sc. Alg. , 4:209–214, 2006. [14] R . M. Karp. Redu cibilit y among combinatori al problems. In R. E. Miller and J. W. Thatcher, editors, Complexity of Computer Computations , pages 85 – 104. Plenum Press, 1972. [15] D . Kratsch and M. Liedloff. An exact algorithm for the minimum dominating clique problem. In H. L. Bodlaender and M. A. Langston, editors, Pr o c e e dings 2nd Internat i onal Workshop on Par amete rize d and Exact Computation, I WPEC 2006 , pages 128 –139. Sprin ger V erlag, Lecture Notes in Comput er Science, vo l. 4169, 2006. [16] B. Randerath and I. Schiermey er. Exact algorithms for minimum dominating set. T echnical Rep ort zaik2005-501, Universit¨ at zu K¨ oln, C ologne, Germany , 2005. [17] J. M. Robson. Algorithms for maximum indep endent sets. J. Algorithms , 7:425–440, 1986. [18] R . E. T arjan. Finding a maxim um clique. T echnical rep ort, Department of Computer Science, Cornell Universit y , Ithaca, N Y, 1972. [19] R . E. T arjan and A. T ro jano wski. Finding a max im um indep endent set. SI AM J. C omput. , 6:537–546, 1977. [20] J. M. M. va n Ro oij. Design by measure and conquer: A n O (1 . 5086 n ) algorithm for minim um dominating set and similar problems. Master’s thesis, Institute for Informa tion and Computing Sciences, Utrech t Universit y , 200 6. [21] G. J. W o eginger. Exact algorithms for NP-hard problems: A surv ey . In Combinatorial Optimiza- tion: ”Eur eka, you shrink” , pages 185–207, Berlin, 2003. Springer Lecture Notes in Computer Science, vol . 2570. [22] G. J. W oeginger. Space a n d time complexit y of e x act algorithms: some open problems (in vited tal k) . In R. G. Downey and M. R. F ello ws, editors, Pr o c e e dings 1st International Workshop on Par amete rize d and Exact Computation, I WPEC 2004 , pages 2 81–290, Berlin, 2004. Springer Lecture N otes i n Computer Science, vo l. 3162. 668 JOHAN M. M. V AN R OOIJ AND HANS L. BODLAE N DER This wor k is licensed under the Cre ative Co mmons Attribution-No Derivs License. T o view a copy of this license, visit http:/ /creativecommons.org/licenses/by- nd/3.0/ .
Original Paper
Loading high-quality paper...
Comments & Academic Discussion
Loading comments...
Leave a Comment