A Non-di dent Combinatorial Optimization Algorithm - CiteSeerX

13 downloads 0 Views 200KB Size Report
A Non-di dent Combinatorial Optimization Algorithm .... tics did not make ndo a de nite winner over b&b. Given the cost interval and ... Figure 3: nding a non-di dent upper bound ..... Schiex 95] Thomas Schiex, H l ne Fargier, G rard Ver- faillie.
A Non-dident Combinatorial Optimization Algorithm Gilles Trombettoni, Bertrand Neveu, Pierre Berlandier, Maria-Cristina Ri and Mouhssine Bouzoubaa INRIA-CERMICS B.P.93 06902 Sophia-Antipolis Cedex France

Abstract Branch and bound is a well known, allpurpose optimization strategy. It relies on the availability of a search tree evaluation function and maintains an upper bound cost as a reference for the pruning. This upper bound is updated each time a better solution is encountered. In this paper, we propose a non-dident optimization strategy that imposes this value. The computation of the bound is based on some heuristics that use probabilistic knowledge of the problem. Setting an arbitrary upper bound enables a faster convergence towards the best solution. The counterpart is that the search tree might be traversed more than once. However, we show in an experimental evaluation that our approach remains benecial.

1 Introduction

Constraint satisfaction problems (csp) have proved useful in the encoding of various instances of combinatorial problems such as planning or scheduling and industrial constraint solvers such as Chip [Chip 91] or Ilog Solver [IlogSolver 94] have been developed. However, in many cases, one looks for the optimal solution with respect to the minimization of some given criterion. An optimization strategy such as the branch and bound (b&b) should then be adopted. Basically, b&b uses a heuristic function that, given a position in the search tree, yields an underestimation1 of the cost of every solution that could be reached from this position. If the returned underestimation is greater than the current upper bound, the b&b strategy simply abandons the exploration from this position. Applications of b&b generally use a heuristic function that is nely tuned to the considered problem [Malik 93; Lee 91; Yeong-Dae 93]. Unfortunately, for some problems and criteria, the approximation This is in the case where we want to minimize the criterion, which will be the default assumption in the rest of the paper. 1

provided by the heuristic function is not sucient to prune the search tree eciently. We propose an optimization strategy that uses an upper bound that can be smaller than the cost of the current solution so that the search might converge more quickly. However, we guarantee that the algorithm does not miss the best solution since we allow ourselves to traverse the search tree several times. As proposed in [André 92], that uses a heuristics for the SAT problem based on the expected number of solutions, the computation of the upper bound will also use some probabilistic knowledge about the problem and the criterion.

2 The ndo algorithm

The algorithm we are presenting is based on a depth rst traversal of the search tree (dfs). The memory space used by dfs is linear in the number of variables of the problem, which allows to tackle real life problems. We suppose that we initially know the interval [cl ; cu ] in which the possible costs are ranging. The ndo algorithm works in several steps corresponding to the dierent iterations of the while loop (see gure 1). Each step searches for a solution whose cost belongs to the interval [cl ; b]. b is an upper bound between cl and cu that will allow pruning more branches than cu . cl and cu are updated according to the result of the search step : function ndo([cl , cu ]); 1 while cu  cl do 2 b choose-upper-bound([cl , cu ]); 3 (solution ; c) nd-solution([cl , b]); 4 if solution 6= ? then 5 [cl ; cu ] [cl ; c[; 6 else [cl ; cu ] ]b; cu ]. 7 return (solution ; c).

Figure 1: the ndo algorithm 1. A solution with cost c in [cl ; b] is found. The next step can continue to explore the current search tree by concentrating on the new cost interval [cl ; c[. This case is illustrated on gure 2.c and

handled by line 5 of the algorithm. It is the standard action taken by the b&b strategy. 2. No solution is found. The entire search tree has been explored with the cost interval [cl ; b] without nding a solution. The new possible cost interval is thus ]b; cu ] (gure 2.d and line 6 of the algorithm) and in the next step, a new upper bound will be chosen within that interval. We can also remark that the new lower bound of the cost interval will allow, in some cases, to prune more branches in future explorations. Note that the conventional b&b is an instance of ndo, where cu is always chosen as upper bound during the search. Cl

Cu

Cl

Cu

(a)

(b)

function choose-upper-bound([cl , cu ]); 1 if a rst solution has been found then 2 return cu 3 else return max(b1 ; b2 ) 4 with #sol(cl ; b1 ) = #sol-min and 5 b2 ? cl = segment-rate  (cu ? cl ).

B Cl

Cu

(c) C

arcs then traversed is not signicantly smaller than with cu . Dierent heuristics following all of these desiderata have been tried. The best heuristics we come out with (gure 3) does not need any estimate of the #arcs quantity, but requires the user to choose the value of two parameters :  #sol-min. In order to avoid a tree traversal without nding any solution, a not too severe upper bound should maintain at least #sol-min solutions in the tree to explore.  segment-rate. The segment-rate parameter maintains a minimum rate of cost interval to explore in a step. The best results for this heuristics have been obtained by choosing a quite severe upper bound (#sol-min is small) until we nd a rst solution, which may require several steps of ndo. After this rst stage, no more risk is taken and cu is always chosen as upper bound.

B Cl

Cu

(d) B

Figure 2: management of the cost interval by ndo

3 The Upper Bound Choice Heuristics

The choose-upper-bound function yields the upper bound that is computed and used at each step of the ndo algorithm. A simple heuristics implements a dichotomy of the cost interval: it always returns the middle point cm of the segment [cl ; cu ]. At each step, its advantage is to eliminate at least half of the potential cost interval. However, the average inuence of this simple heuristics did not make ndo a denite winner over b&b. Given the cost interval and the current position in the search tree, we propose a less blind heuristics based on a probabilistic estimate of the number of expected solutions (#sol) and on an estimate of the number of arcs traversed during the search (#arcs). The design of such heuristics is then guided by the following desiderata. We want to avoid a search tree traversal without nding any solution, and to ensure that, in that unfortunate case, a sucient part of the cost interval will be pruned. Moreover, the bound should not be set below cu if the expected number of

Figure 3: nding a non-dident upper bound

4 Experimental Evaluation

We have been primarily interested in applying ndo to the optimization of constraint satisfaction problems. A constraint satisfaction system usually includes a solution search component based on domain enumeration. To simulate the search trees developed by csp solvers, we have developed a weighted tree generator, parameterized by a maximum depth d, a maximum width s, an interval [wl ; wu ] for the weight associated to every arc and a pruning factor p. At each node, a random tree is built recursively as follows. If the current depth is d, then the node is a leaf. If the current depth is smaller than d, then for each of the s potential sons of the current node, we check whether it can be developed according the pruning factor p. If so, we associate to it a random weight between wl and wu. A solution is represented by a leaf at depth d. The cost of a solution comes from the aggregation of the weights associated to each arc along the path leading to the solution. The mode of aggregation depends on the criterion to minimize. The best solution is one with the minimum cost.

4.1 Encoding a Given Criterion

Our algorithm works with any criterion to minimize. As we have seen in section 3, the two important quantities to estimate for the most general form of our

heuristics are #sol and #arcs. (Note that for the heuristics presented in gure 3, we only need #sol, an estimate of the number of solutions having a cost in a given interval ). We present here how, for our tree generator, we can compute these two quantities by using three functions. The #arcs function needs a computation at every depth of the tree. #arcs =

where:

d X i=1

#arcs-depth(i)

#arcs-depth(i) = si(1 ? p)i

CX (i) u

P (i; c; wl ; wu ) c=C (i) The two rst factors would yield the average number of arcs at depth i if the cost had no bounds. The last factor is the expected probability of occurrence of an arc at a given depth i due to the considered bounds. This computation uses three functions and their eective implementation depends on the criterion to consider :  The P function yields the probability that the current cost at depth i is c. This probability is 0 when the cost does not belong to the interval given by the two following functions.  The Cl function yields a lower bound of the cost at depth i, knowing that a lower bound for a solution at depth d is cl .  The Cu function yields an upper bound of the cost at depth i, knowing that an upper bound for a solution at depth d is cu . It may not be always realistic to use these three functions since the exact computation of the quantities may take a long time (#arcs performs a sum over the depth of the tree and P can sometimes not be computed otherwise than recursively). It will then be necessary to nd another way to obtain a reasonable estimate of these quantities. According to our denition of a solution, #sol is obviously #arcs-depth at depth d. We present now the rst experimental results of our algorithm for two criteria. l

4.2 First results on random trees

Additive criterion The aggregation of the weights is done by addition and the aim is to minimize the resulting sum. Therefore, the initial cost interval is easily computed as [wl d; wu d]. For this criterion, the probability distribution of the cost at depth d can be approximated by the normal law, when the depth is sucient. Indeed, we have a sum of independent random variables whose distribution converges towards the normal law (central limit theorem). The P function can then be approximated by the normal law.

Cl returns the value max(wli; cl ? wu(d ? i)). This means that if the cost is smaller than this value at depth i then the cost of every solution in the subtree will necessarily be smaller than cl . Symmetrically, Cu returns min(wu i; cu ? wl(d ? i)). Comparisons have been done about the number of arcs traversed by a conventional b&b approach and ndo. Results with dierent sizes of trees and a null initial minimum cost cl appear on gure 4 (average on 100 instances with #sol-min set to 100 and segmentrate set to 0:01). The results are positive (the number of arcs visited is reduced by 50% using ndo). Indeed, the analysis of the additive criterion yields an explanation. Because of the normal law, an overriding majority of the solutions have a cost around the middle cost of [cl , cu ], i.e. cm . Therefore b&b can often get a solution around cm after its rst step. Our algorithm tries rst an upper bound smaller than the median cost, so that, when it nds a solution in that rst step, cu immediately becomes smaller than cm . d

15

16

17

18

b&b 4565 6954 10521 14606 ndo 2432 3648 5714 8091 ndo/b&b .53 .52 .54 .55 Figure 4: Comparison NDO/BB for the additive criterion

Maximum weight criterion The best solution is the one for which the heaviest weight among the arcs is minimum. This criterion comes from the real-world constraint problem known as the radio link frequency problem2 . In this problem, the variables are the dierent frequencies to allocate, each with a nite possible set of values on the frequency band. One may want to minimize the highest frequency in the frequency band, considering the constraints between the frequencies. For this criterion, we can compute the three functions the following way.  The P (c; i; w) function is the probability that the cost at depth i is c when the parameter w is the number of possible values for the an arc weight : w = w u ? wl + 1 P (c; i; w) = Prob(C = c) P (c; i; w) = Prob((C  c) V(C  c)) P (c; i; w) = Prob(C  c) + Prob(C  c) ? 1 P (c; i; w) = Prob(C  c) + 1 ? Prob(C  (c ? 1)) ? 1 P (c; i; w) = Prob(C  c) ? Prob(C  c ? 1) As the probability that a given weight is less or equal to c is c=w and all the i weights are independent, the probability Prob(C  c) that the maximum of the i weights is less or equal to c is : 2 Thanks to l'Armement.

the

Centre d'Electronique de

Prob(C  c) = (c=w)i Then, we can deduce : P (c; i; w) = (c=w)i ? ((c ? 1)=w)i

depth

 Cl and Cu are respectively cl and cu .  cl and cu are wl and wu: for our tests, wl is set to 0, wu is set to 1000, #sol-min is 20 and segmentrate is 0:01.

For this criterion, both algorithms are very ecient: the number of visited arcs is very small, allowing us to make tests on greater trees. Intuitively, the upper bound can prune the search tree with the same ratio at each depth, while for the additive criterion, the pruning is more ecient when the depth is great enough. These results are also conrmed by the study [Schiex 95] which claims that CSP optimization problems with additive criterion are harder than problems with maximum criterion. The ndo results are better here than they were for the additive criterion. In the results on gure 5 (average on 100 instances), the depth of the trees varies between 50 and 80 and the width is 5.

d

50

60

70

15

16

17

18

b&b 2279 3483 5061 7434 ndo 2279 3843 5574 8726 ndo/b&b 1. 1.1 1.1 1.17

80

b&b 1797 2627 3687 4528 ndo 237 320 414 754 ndo/b&b .13 .12 .11 .17 Figure 5: Comparison NDO/BB for the maximum criterion

4.3 Comparisons with Value Ordering Heuristics

A common way to improve the results with b&b is to use value ordering (vo) heuristics in order to nd good solutions faster. For both criteria we have studied, this consists in traversing the tree by ordering the branches with respect to the increasing order of the weights. Although both algorithms should get a benet from this heuristics, the tests show that this is especially interesting for the b&b. Indeed, this heuristics is useful for the entire b&b search tree, since the global eect of this value ordering heuristics is to rapidly discover a solution with a low cost. For ndo, it is only useful in the steps where a solution is found. The tests of both algorithms with vo heuristics have been realized on the same random trees as in previous section. The results are shown on gures 6 and 7. For the additive criterion, the vo heuristics is as ecient as our algorithm and the combined use of this heuristics and our algorithm does not improve eciency. For the maximum criterion, the use of our algorithm is still interesting when using the vo heuristics.

Figure 6: Comparison NDO/BB for the additive criterion with value ordering depth

50

60

70

80

b&b 696 986 1300 1637 ndo 235 306 342 669 ndo/b&b .34 .31 .26 .41 Figure 7: Comparison NDO/BB for the maximum criterion with value ordering

4.4 Results on Random csp

The algorithm has also been implemented in a optimization problem within the csp framework. The problem is to nd the best solution of a constraint satisfaction problem, according to a specic criterion. We have tested our algorithm on random binary csp. Our random csp generator [Berlandier 92] uses the four standard parameters [Sabin 94; Prosser 94] : the number of variables n, the uniform domain size m, the density of the constraint graph p1 and the tightness of constraints p2 . The expected number of solutions E (N ) is estimated as in [Prosser 94] by the following formula : E (N ) = mn(1 ? p2 )1=2p1n(n?1) These tests have been done with a forward checking scheme, a dynamic variable ordering heuristics (smallest domain rst) and a value ordering heuristics (smallest value rst). The constraint density has been xed to 0:2, the domain size to 40. We have made vary the size of the problem (number of variables) and the tightness of the constraints. In these tests, the criterion to minimize was the maximum criterion, i.e. the maximum value of a variable in a solution assignment. In the results reported on gure 8, we measured as for random trees, the total size (number of arcs) of the search trees explored by b&b and by ndo. For that maximum criterion, the results of our ndo algorithm show an improvement on b&b. For a given problem size, the improvement we have obtained with ndo is greater on csp with many solutions, where the b&b is for this maximum criterion already very ecient.

5 Conclusion and future works

We have presented a new combinatorial optimization algorithm which manages a non safe upper bound. We have also designed a heuristics that allows a non-blind choice of this upper bound using an estimate of the number of solutions. Although the algorithm may traverse the search tree several times, a comparison with b&b on random search trees and on random csp has

size tightness

30 .2 b&b 364 ndo 113 ndo/b&b .31 size 35 tightness .3 b&b 1560 ndo 901 ndo/b&b .58

30 30 .3 .4 653 1896 298 1428 .46 .75 35 40 .4 .2 10416 827 8098 391 .78 .47

35 .2 613 235 .38 40 .3 4889 3585 .73

Figure 8: Comparison NDO/BB for random CSP optimization with the maximum criterion shown its interest. However, its eect is lowered when used conjointly with a value ordering heuristics. Tests over real life problems should show how the algorithm behaves when the quantities #sol and #arcs are less easy to estimate. Depending on the results, we could plan the continuation of our research on the rst motivation of this new optimization method which is parallelization. Indeed, existing parallel optimization approaches [Mans 92; Mans 90; Yank 94] work inside the search tree and allocate dierent processes with dierent subtrees. With ndo, the basic idea is to allocate the processes with search trees which dier each others on the upper bound chosen. The choose-upper-bound heuristics should probably be more complex.

References

[André 92] P. André, 0. Dubois. Utilisation de l'espérance du nombre de solutions an d'optimiser la résolution d'un système sat. Compte rendu à l'Académie des sciences, 315 série I:217220, 1992. [Berlandier 92] P. Berlandier. Prose : une boîte à outils pour l'interprétation de contraintes : guide d'utilisation. Rapport Technique 145, INRIA Sophia Antipolis, 1992. 50 pages. [Chip 91] Cosytec. Chip Users' Reference Manual, 1991. [IlogSolver 94] ILOG, 2 Av. Galliéni, F-94253 Gentilly. Ilog Solver Users' Reference Manual, 1994. [Lee 91] K. Lee, H. Leong. An improved lower bound for channel routing problems. In IEEE International Symposium on Circuits and Systems, 1991. [Malik 93] K. Malik, G. Yu. A branch and bound algorithm for the capaciated minimum spanning tree problem. Networks, 23(6):525532, 1993. [Mans 90] B. Mans, C. Roucairol. Concurrency in priority queues for branch and bound algorithms. Rapport de Recherche 1311, INRIA Rocquencourt, 1990. [Mans 92] B. Mans. Contribution à l'algorithmique nonnumérique parallèle : parallélisations de méthodes de recherche arborescentes. Thèse de doctorat, Université de Paris VI, 1992. [Prosser 94] P. Prosser. Binary constraint satisfaction problems : Some are harder than others. In Proc. ECAI, pages 9599, Amsterdam, the Netherlands, 1994.

[Sabin 94] D. Sabin, E. Freuder. Contradicting conventional wisdom in constraint satisfaction. In Proc. ECAI, Amsterdam, Netherlands, 1994. [Schiex 95] Thomas Schiex, Hélène Fargier, Gérard Verfaillie. Valued constraint satisfaction problems : Hard and easy problems. In Proc. IJCAI, pages 631637, Montreal, Canada, 1995. [Yank 94] M. Yank, M. Das. Evaluation of a parallel branch and bound algorithm on a class of multiprocessors. IEEE Transactions on Parallel and Distributed Systems, 5(1), 1994. [Yeong-Dae 93] K. Yeong-Dae. A new branch and bound algorithm for minimizing mean tardiness in twomachine owshops. Computers and Operation Research, 20(4):391401, 1993.

Suggest Documents