• Aucun résultat trouvé

A Measure & Conquer Analysis

6.3 Dominating Set

6.3.2 A Measure & Conquer Analysis

In this section we show how to apply Measure & Conquer to refine the running time analysis and to establish a running time ofO(1.2353|S|+|U|). This includes a more careful set up of the measure of an instanceS ofMSC(including various weights to be fixed later), the analysis of the reduction and branching rules of the algorithm with respect to this measure, and the computation to optimize the weights and the measure.

The type of measure we are going to describe is often useful when analysing branching algorithms to solve NP-hard problems exactly. The original motivation for this choice of the measure is the following. Removing a large set has a different impact on the “progress” of the algorithmmscthan removing a small one. In fact, when we remove a large set, we decrease the frequency of many elements. Decreas-ing elements’ frequencies pays of in the long term, since the elements of frequency one can be filtered out (without branching). A dual argument holds for the elements.

Removing an element of high frequency is somehow preferable to removing an el-ement of small frequency. In fact, when we remove an elel-ement occurring in many sets, we decrease the cardinality of all such sets by one. This is good in the long term, since sets of cardinality one can be filtered out. Both phenomena are not taken into account by the simple measure discussed in the previous subsection.

This suggests the idea to give a different “weight” to sets of different cardinality and to elements of different frequency. In particular, let ni denote the number of subsetsS∈ Sof cardinalityi. Moreover letmjdenote the number of elementsu∈ U

6.3 Dominating Set 117 of frequency j. The following is the measurek=k(S)of the size of an instanceS ofMSC:

k(S) =

i≥1

wini+

j≥1

vjmj,

where the weightswi,vj∈[0,1]will be fixed later. Note thatk(S)≤ |S|+|U |. This guarantees that a running time bound with respect to the measure k(S) directly translates into one with respect to|S|+|U |and to 2n, since for allα ≥1,αk(S)≤ α|S|+|U|≤α2n.

Theorem 6.10.Algorithmmscsolves theMINIMUM SETCOVERproblem in time O(1.2353|U|+|S|).

Proof. As usual in branching algorithms the correctness of the algorithm follows from the correctness of all reduction and branching rules and is easy to obtain. The following assumptions simplify the running time analysis and they are an important part of the definition of the measure.

(a)wi≤wi+1andvi≤vi+1fori≥1;

(b)w1=v1=0;

(c)wi=vi=1 fori≥6.

The first assumption says that the weights are non-decreasing with the cardinality (frequency). Intuitively, this makes sense: the smaller the cardinality (frequency) the closer is the subset (element) to the state when it will be filtered out (without branching). The second assumption is due to the fact that sets of cardinality one and elements of frequency one can be removed without branching. The last assumption is simply due to the fact that in this analysis weights are chosen to be of value at most 1. It also avoids dealing with an unbounded number of weights in the computations to be described later.

The following quantities turn out to be useful in the analysis:

∆wi=wi−wi−1,i≥2 and ∆vi=vi−vi−1,i≥2,

Intuitively,∆wi(∆vi) is the reduction of the size of the problem corresponding to the reduction of the cardinality of a set (of the frequency of an element) fromito i−1. We make one last assumption

(d)∆wi≥∆wi+1, fori≥2,

that is the wi’s are increasing at decreasing speed. On the one hand, experiments have shown that this is a reasonable choice, on the other hand the assumption sim-plifies the subsequent analysis significantly.

Having chosen the measure with 8 weights still to be fixed, we now analyse all reduction and branching rules of the algorithm mscwith respect to this measure, similar to the analysis of branching algorithms in Chap.2.

Let`(k)be the number of leaves in the search tree generated by the algorithm to solve a problem of measurek. Clearly,`(0) =1. Consider the casek>0 (which

impliesS 6=/0). If one of the conditions of lines 3 and 4 holds, one setSis removed fromS. Thus we get`(k)≤`(k−w|S|), wherew|S|≥0 by assumptions (a) and (c).

Otherwise, letS be the subset selected in line 5. If |S|=2, no subproblem is generated (`(k) =1). Otherwise (|S| ≥3),mscgenerates two subproblemsSIN= del(S,S)andSOU T=S\S.

Consider the subproblemSOU T. The size ofSOU T decreases byw|S|because of the removal ofS. Letribe the number of elements of Sof frequencyi. Note that there cannot be elements of frequency 1. Hence

i≥1

ri=

i≥2

ri=|S|.

Consider an elementu∈Sof frequencyi≥2. When we removeS, the frequency of udecreases by one. As a consequence, the size of the subproblem decreases by∆vi. Thus the overall reduction of the size ofSOU Tdue to the reduction of the frequencies is at least Swhich share at least one element of frequency 2 withS. When we discardS, we must later select all the setsRi. SupposeRisharesr2,i such elements withS. Then

|Ri| ≥r2,i+1, since otherwise we would haveR⊆S, which is excluded by line 3.

Note thatr2,i<|S|, sinceSis of maximum cardinality by algorithmmsc. Thus, by assumption (a), the reduction of the size of the problem due to the removal ofRiis w|Ri|≥wr2,i+1. We also observe that, by selecting theRi’s, we remove at least one element f ∈/S, thus gaining an extrav|f|≥v2(here we use assumption (a) again).

By a simple case analysis, which we present here in a slightly weakened form, the total reduction of the size of the problem due to the removal of theRi’s is at least

∆k0=

Consider now the subproblemSIN. The size ofSINdecreases byw|S|because of the removal ofS. Letr≥i=∑j≥irjbe the number of elements ofSof frequency at least i. Consider an elementu∈S of frequencyi(i≥2). The size ofSIN further decreases byvi because of the removal ofu. Thus the overall reduction due to the removal of the elementsuofSis

6.3 Dominating Set 119

i≥2

rivi=

6 i=2

rivi+r≥7,

where we used the fact thatvi=1 fori≥7 (assumption (c)). LetRbe a set sharing an elementuwithS. Note that|R| ≤ |S|. By removingu, the cardinality ofRis reduced by one. This implies a reduction of the size ofSINby∆w|R|≥∆w|S|(assumption (d)). Thus the overall reduction ofSIN due to the reduction of the cardinalities of the setsRis at least:

∆w|S|

i≥2

(i−1)ri≥∆w|S|

6

i=2

(i−1)ri+6·r≥7

! .

Note that this quantity is 0 for |S| ≥7. Putting it all together, for all the possible values of|S| ≥3 and of theri’s such that

6 i=2

ri+r≥7=|S|, we have the following set of recurrences

`(k)≤`(k−∆kOU T) +`(k−∆kIN), where

• ∆kOU T,w|S|+∑6i=2ri∆vi+∆k0,

• ∆kIN,w|S|+∑6i=2rivi+r≥7+∆w|S|6i=2(i−1)ri+6·r≥7 .

All that remains is to determine the best choice of the 8-tuple (w2,w3,w4,w5,v2,v3,v4,v5)

such that all simplifying assumptions are satisfied and the corresponding running time is as small as possible. Since ∆w|S|=0 for|S| ≥7, we have that each re-currence with|S| ≥8 isdominated by some recurrence with|S|=7, i.e. for each recurrence with|S| ≥8 (whatever the choice of the weights) there is a recurrence with|S|=7 having larger or equal branching factor. Hence it is sufficient to restrict ourselves to the recurrences for the cases 3≤ |S| ≤7. Thus we consider a large but finite number of recurrences. For every fixed 8-tuple (w2,w3,w4,w5,v2,v3,v4,v5) the quantity`(k)is upper bounded byαk, whereα is the largest number from the set of real roots of the set of equations

αkk−∆kOU Tk−∆kIN

corresponding to all different combinations of the values of|S|andr2, . . . ,r|S|. Thus the estimation of`(k)boils down to choosing the weights to minimizeα. This opti-mization problem is interesting in its own right and we refer to Eppstein’s work [72]

on quasi-convex programming for a general treatment of such problems.

To find the (nearly) optimal weights the authors used a computer program, based on randomized local search, which turns out to be very fast and sufficiently accurate in practice even for a large number of weights and recurrences. The outcome of the program was:

which yieldsα<1.2353, and thus`(k) =O(αk(S)). This completes the choice of the measure.

Finally we observe that the time spent on a node of the search tree (without recursive calls) is bounded by a polynomialpoly(n)ofn, since the time spent on any reduction rule is bounded by a polynomial, and since each reduction rule removes a subset ofSor stops the calculation. Hence the overall running time of the algorithm isO(n`(k)poly(n)) =O(`(k)) =O(1.2353|U|+|S|). ut As already mentioned, MDScan be reduced toMSCby imposingU =V andS= {N[v]|v∈V}. The size of theMSCinstance with respect to the measurek(S)is at most 2n. By simply combining this reduction with algorithmmscone obtains:

Corollary 6.11.The problem MINIMUM DOMINATING SET is solvable in time O(1.23532n) =O(1.5259n).

Two remarks concerning the computations needed to determine the best choice of all weights should be made. First, given the measure and all weights it is compu-tationally easy to determine the branching factors of all recurrences and verifiy that they are all bounded by a claimed solutionα.

Second, there are various ways to compute the best choice of the weights. From a mathematical point of view it is sufficient to mention the weights as a certificate for the claimed value ofα. There is no need to explain how those weights have been established.

How to apply a technique called memorization, which produces algorithms using exponential space, and improve upon the running time of a branching algorithm achieved by Measure & Conquer analysis is discussed in Chap.10.