











Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!












Branch and bound algorithms are methods for global optimization in nonconvex prob- lems [LW66, Moo91]. They are nonheuristic, in the sense that they maintain a provable upper and lower bound on the (globally) optimal objective value; they terminate with a certificate proving that the suboptimal point found is ǫ-suboptimal. Branch and bound al- gorithms can be (and often are) slow, however. In the worst case they require effort that grows exponentially with problem size, but in some cases we are lucky, and the methods converge with much less effort. In these notes we describe two typical and simple examples of branch and bound methods, and show some typical results, for a minimum cardinality problem.
The material in this section is taken from [BBB91]. The branch and bound algorithm we describe here finds the global minimum of a function f : Rm^ → R over an m-dimensional rectangle Qinit, to within some prescribed accuracy ǫ. We let f ⋆^ denote the optimal value, i.e., f ⋆^ = infx∈Qinit f (x). For a rectangle Q ⊆ Qinit we define
Φmin(Q) = inf x∈Q f (x),
so f ⋆^ = Φmin(Qinit). The algorithm will use two functions Φlb(Q) and Φub(Q) defined for any rectangle Q ⊆ Qinit. These functions must satisfy the following conditions. First, they are lower and upper bounds on Φmin(Q), respectively: for any Q ⊆ Qinit,
Φlb(Q) ≤ Φmin(Q) ≤ Φub(Q).
The second condition is (roughly) that the bounds become tight as the rectangle shrinks to a point. More precisely, as the maximum half-length of the sides of Q, denoted by size(Q), goes to zero, the difference between upper and lower bounds uniformly converges to zero, i.e., ∀ǫ > 0 ∃δ > 0 ∀Q ⊆ Qinit, size(Q) ≤ δ =⇒ Φub(Q) − Φlb(Q) ≤ ǫ.
Figure 1: Branch and bound example in R^2 , after 3 iterations. The partition of the original rectangle is shown at left; the associated binary tree is shown at right.
We mention a third condition, which is not needed to prove convergence of the branch and bound algorithm, but is needed in practice: The functions Φub(Q) and Φlb(Q) should be cheap to compute. We now describe the algorithm. We start by computing
L 1 = Φlb(Qinit), U 1 = Φub(Qinit),
which are lower and upper bounds on f ⋆, respectively. If U 1 − L 1 ≤ ǫ, the algorithm terminates. Otherwise we partition Qinit into two rectangles Qinit = Q 1 ∪ Q 2 , and compute Φlb(Qi) and Φub(Qi), i = 1, 2. Then we have new lower and upper bounds on f ⋆,
L 2 = min{Φlb(Q 1 ), Φlb(Q 2 )} ≤ Φmin(Qinit) ≤ U 2 = min{Φub(Q 1 ), Φub(Q 2 )}.
If U 2 − L 2 ≤ ǫ, the algorithm terminates. Otherwise, we partition one of Q 1 and Q 2 into two rectangle, to obtain a new partition of Qinit into three rectangles, and compute Φlb and Φub for these new rectangles. We update the lower bound L 3 as the minimum over the lower bounds over the partition of Qinit, and similarly for the upper bound U 3. At each iteration we split one rectangle into two, so after k iterations (counting the evaluation of Φlb(Qinit) and Φub(Qinit) as the first one), we have a partition of Qinit into k rectangles, Qinit = ∪ki=1Qi. This partition can be represented by a partially filled binary tree, with the root node corresponding to the original rectangle, and the children of a node corresponding to the subrectangles obtained by partitioning the parent rectangle. This is illustrated in figure 1. The original rectangle corresponds to the root of the tree. We first partition Qinit vertically. At the next iteration, we horizontally partition the lefthand child; at the third iteration, we vertically partition the bottom child. After three iterations, we have a partition of the original rectangle into 4 rectangles, which correspond to the leaves in the tree. The associated lower and upper bounds on f ⋆^ are
Lk = min i=1,...,k Φlb(Qi), Uk = min i=1,...,k Φub(Qi).
We first show that after a large enough number of iterations, the partition Lk must contain a rectangle of small volume. We then show that this rectangle has small size, and this in turn implies that Uk − Lk is small. The number of rectangles in the partition Lk is k, and the total volume of these rectangles is vol(Qinit), so
min Q∈Lk vol(Q) ≤
vol(Qinit) k
Thus, after a large number of iterations, at least one rectangle in the partition has small volume. Next, we show that small volume implies small size for a rectangle in any partition. We define the condition number of a rectangle Q =
i[li, ui] as
cond(Q) =
maxi(ui − li) mini(ui − li)
Our splitting rule, which requires that we split rectangles along a longest edge, results in an upper bound on the condition number of rectangles in our partition: for any rectangle Q ∈ Lk, cond(Q) ≤ max{cond(Qinit), 2 }. (2)
To prove this it is enough to show that when a rectangle Q is split into rectangles Q 1 and Q 2 , we have
cond(Q 1 ) ≤ max{cond(Q), 2 }, cond(Q 2 ) ≤ max{cond(Q), 2 }.
Let νmax be the maximum edge length of Q, and let νmin be the minimum edge length of Q, so cond(Q) = νmax/νmin. When Q is split into Q 1 and Q 2 , the maximum edge length of the children is no more than νmax. The minimum edge length of the children, by our splitting rule, is no smaller than the minimum of νmax/2 and νmin. It follows that the condition number of the children is no more than the maximum of 2 and cond(Q). We note that there are other splitting rules that also result in a uniform bound on the condition number of the rectangles in any partition generated. One such rule is to cycle through the index on which we split the rectangle. If Q was formed by splitting its parent along the ith coordinate, then when we split Q, we split it along the (i + 1) modulo m coordinate. We can bound the size of a rectangle Q in terms of its volume and condition number, since
vol(Q) =
i
(ui − li)
≥ max i (ui − li)
min i (ui − li)
)m− 1
(2 size(Q))m cond(Q)m−^1
≥
2 size(Q) cond(Q)
)m .
Thus,
size(Q) ≤
cond(Q)vol(Q)^1 /m. (3)
Combining equations (1), (2) and (3) we get
min Q∈Lk size(Q) ≤
max{cond(Qinit), 2 }
vol(Qinit) k
) 1 /m
. (4)
Thus the minimum size of the rectangles in the partition Lk converges to zero. By assumption 2, there exists a δ such that any rectangle of size δ or smaller satisfies Φub(Q) − Φlb(Q) ≤ ǫ. Take k large enough that at least one rectangle in the partition has size not exceeding δ. Then at least one rectangle, say, Q, in partition calLk satisfies Φub(Q)−Φlb(Q) ≤ ǫ. It follows than when this rectangle was added to the list, the algorithm should have terminated.
2 Mixed Boolean-convex problems
In this section we consider another simple example of branch and bound, applied to a com- binatorial problem. We consider the following problem:
minimize f 0 (x, z) subject to fi(x, z) ≤ 0 , i = 1,... , m zj ∈ { 0 , 1 }, j = 1,... , n,
where x and z are the optimization variables. The variables z 1 ,... , zn are, naturally, called Boolean variables. We assume the functions fi, i = 0,... , n, are convex. This problem is called a mixed Boolean convex problem. We denote the optimal value of this problem as p⋆. One way to solve this problem is by exhaustive search. That is, we solve 2n^ convex optimization problems, one for each possible value of the (Boolean) vector z, and then choose the smallest of these optimal values. This involves solving a number of convex problems that is exponential in the size of the variable z. For n more than 30 or so, this is clearly not possible. We will use a branch and bound method to solve this problem. In the worst case, we end up solving the 2n^ convex problems, i.e., carrying an exhaustive search. But with luck, this does not occur. The convex relaxation
minimize f 0 (x, z) subject to fi(x, z) ≤ 0 , i = 1,... , m 0 ≤ zj ≤ 1 , j = 1,... , n,
with (continuous) variables x and z, is convex, and therefore easily solved. Its optimal value, which we denote L 1 , is a lower bound on the optimal value of (5). This lower bound can be +∞ (in which case the original problem is surely infeasible) or −∞.
fixing a variable that is not fixed in the parent problem. An edge in the tree corresponds to the value 0 or 1 of a particular variable zi. At the root node of the tree, none of the values of the zi are specified. A node at depth k in the tree corresponds to a subproblem in which k of the Boolean variables have fixed values. For each node, we have an upper and lower bound on the optimal value of the subproblem. After k iterations, we have a tree with exactly k leaves. The minimum of the lower bounds, over all the leaf nodes, gives a lower bound on the optimal value p⋆; similarly, the minimum of the upper bounds, over all the leaf nodes, gives an upper bound on the optimal value p⋆. We refer to these lower and upper bounds as Lk and Uk, respectively. The global lower bound Lk is nondecreasing, and the global upper bound Uk is nonincreasing, so we always have Uk+1 − Lk+1 ≤ Uk − Lk. We can terminate the algorithm when Uk − Lk ≤ ǫ. Proving convergence of the algorithm is trivial: it must terminate, with Uk = Lk, in fewer than 2n^ iterations. To see this, note that if a leaf has depth n, it means that all the Boolean variables are fixed in the subproblem, so by solving the convex relaxation we get the exact solution. In other words, for any leaf of depth n, we have U = L. The worst thing that can happen is that we develop a complete binary tree, to depth n, which requires 2n iterations, at which point every subproblem lower and upper bound is equal, and therefore the algorithm terminates. This is nothing more than exhaustive search. We can carry out pruning, to save memory (but not time), as the algorithm progresses. At iteration k we have the upper bound Uk on p⋆. Any node in the tree that has a lower bound larger than U can be pruned, i.e., removed from the tree, since all points corresponding to that node are worse than the current best point found. The choice of which leaf to split at a given stage in the algorithm is somewhat arbitrary. The primary strategy is to split the leaf corresponding to the smallest lower bound. This means we always get an improvement in the global lower bound. The drawback of this scheme is that in some situations (such as the cardinality example in the next section) we may achieve a tight lower bound before getting any optimal feasible points. The same can be said for the choice of index to use to split a leaf. It can be any index corresponding to a Boolean variable that has not yet been fixed. One heuristic is to split along a variable k for which |zk⋆ − 1 / 2 | is smallest, where z⋆k is the optimal point found in the relaxation. This corresponds to splitting a variable that is most ‘undecided’ (between 0 and 1) in the relaxation. In some problems, the opposite heuristic works well: we split a variable that is most ‘decided’. To do this, we choose k for which |z⋆k − 1 / 2 | is maximum. In most cases, many of the variables z⋆k will be 0 or 1; among these, we can choose the one with the largest associated Lagrange multiplier. (The idea here is that this is the relaxed variable that is 0 and 1, and has the highest pressure to stay there.)
z 1 = 0 z 1 = 1
z 2 = 0 z 2 = 1
Figure 2: Simple three variable example.
We illustrate the algorithm with a small example, the Boolean LP
minimize 2 z 1 + z 2 − 2 z 3 subject to 0. 7 z 1 + 0. 5 z 2 + z 3 ≥ 1. 8 zi ∈ { 0 , 1 }, i = 1, 2 , 3 ,
with variables z 1 , z 2 , and z 3. This problem is small enough to solve by exhaustive enumer- ation. Out of 8 possible 3-dimensional Boolean vectors, just one is feasible. This optimal point is z = (1, 1 , 1). Figure 2 shows the binary tree corresponding to the branch and bound algorithm, which terminates in 2 iterations, after 5 LP relaxations are solved. Each node shows the lower and upper bound, and each edge shows the variable that is fixed, and its value. At the first node we solve the relaxed problem and obtain the lower bound L 1 = − 0 .143. Rounding the z⋆i found in the relaxation does not, however, yield a feasible solution, so the upper bound is U 1 = ∞. Setting z 1 = 0 we find that the relaxed problem is infeasible, so we have L = ∞ (and therefore U = ∞). At this point we have determined that, if there is any solution, it must satisfy z 1 = 1. Now we explore the z 1 = 1 branch. Solving the associated relaxed LP we obtain the new lower bound 0.2, an improvement over the previous global lower bound − 0 .143. Once again, when we round z⋆i , we get an infeasible point, so the upper bound at this node is still ∞. At this point, two iterations into the algorithm, having solved a total of 3 LPs, we find that L 2 = 0.2 and U 2 = ∞. (This means that so far, we are not even sure the problem is feasible.) Now we split on the variable z 2. Setting z 2 = 1 we get a relaxed optimal value of 1. In the relaxed problem, we have z 3 ⋆ = 1, so (even without rounding) we obtain a feasible point with objective 1. Thus, the lower and upper bounds at this node are both 1. When we set z 2 = 0, the relaxed problem is infeasible. For this node, then, we have L = U = ∞.
which is equivalent to
minimize
∑n i=1 ((1/Ui)(xi)+^ + (−^1 /Li)(xi)−) subject to Ax b
(assuming Li < 0 and Ui > 0, for i = 1,... , n). The objective here is an asymmetric weighted ℓ 1 -norm. Minimizing the ℓ 1 -norm over a convex set is a well known heuristic for finding a sparse solution. We can improve on the lower bound found by the relaxation. Since card(x) is integer valued, if we know card(x) ≥ l, we know that card(x) ≥ ⌈l⌉, the smallest integer greater than or equal to l. (For example, if we know that card(x) ≥ 23 .4, then in fact we know that card(x) ≥ 24.) We find an upper bound on the mixed Boolean-LP (8) by simply recording the cardinality of the x obtained in the relaxed problem (9). At each iteration we split a node with the lowest lower bound. This will be the optimal strategy if we find an optimal point before proving the lower bound. Less clear is the choice of variable to split; empirical results suggest that splitting along the ‘most ambiguous’ variable in the relaxation, i.e., zj , where j = argmini(|zi − 1 / 2 |), is an efficient strategy.
A small example
We first give the results of the branch and bound algorithm for a randomly generated problem of the form (7), with x ∈ R^30 and 100 constraints. It takes 124 iterations, and the solution of a total of 309 LPs (including the 60 LPs required to compute the lower and upper bounds on each variable) to find that the minimum cardinality is 19. Figure 3 shows the tree generated by the algorithm at four different iterations. At top left is the tree after three iterations, with lower bound 12.6 and upper bound 21. At top right is the tree after five iterations, with lower bound 13.1 and upper bound 20. Note that there is a pruned node, shown with a dotted line. It had a lower bound above 20, the global upper bound at that point, and so could be eliminated from the tree. At bottom left, after 10 iterations, the lower bound is 13.9 and upper bound 19. Finally, the plot at bottom right shows the tree at the end of the algorithm, with lower bound 18.04 and upper bound 19. Figure 4 shows the evolution of the global lower and upper bounds. We can see, for example, that a point with globally minimum cardinality is obtained after only 8 iterations; however, it takes around 100 more iterations to guarantee that this point has minimum cardinality. Figure 5 shows the portion of non-eliminated or non-pruned sparsity patterns, versus iteration number. Each pruned node, at level i, corresponds to 2n+1−i^ possible values of the Boolean variable z; each active (non-pruned) node at level i corresponds to 2n+1−i^ possible values of the Boolean variable. Near termination, the fraction of non-pruned Boolean values is around 1%. This means we have eliminated around 99% of the possible Boolean values. However, the total number of Boolean values is 2^30 ≈ 109 , so 1% still represents around 10^7 possible values for z. This means that, right before the algorithm terminates, there are still
Figure 3: Tree with 30 variable problem, after 3 iterations (top left), 5 iterations (top right), 10 iterations (bottom left), and 124 iterations (bottom right).
(^100 20 40 60 80 100 )
10 -
100
iteration
portion of non-pruned Boolean values
Figure 5: Portion of solutions remaining possible (not eliminated), 30 variables.
(^00 20 40 60 80 100 )
10
20
30
40
50
60
iteration
number of leaves on tree
Figure 6: Number of leaves on tree, 30 variables.
107 possible values of z ‘in play’. Figure 6 shows the total number of active (non-pruned) leaves in the tree, which is the size of the partition, versus iteration number. After k iterations, we can have at most k leaves (which occurs only if no pruming occurs). So we can see that in this example, we have typically pruned around half of the leaves. For this example, direct enumeration of all sparsity patterns is impractical (or at least, very slow compared to branch and bound), since it would require the solution of 2^30 ≈ 109 LPs. We must count ourselves lucky to have solved the problem with (provable) global optimality by solving only a few hundred LPs.
(^100 500 1000 1500 2000 2500 3000 3500 )
10 -
10 -
10 -
10 -
100
iteration
portion of non-pruned Boolean values
Figure 8: Portion of solutions remaining possible (not eliminated), 50 variables.
(^00 500 1000 1500 2000 2500 3000 3500 )
200
400
600
800
1000
1200
1400
1600
iteration
number of leaves on tree
Figure 9: Number of leaves on tree, 50 variables.
(^1000 1000 2000 3000 4000 )
110
120
130
140
150
160
170
180
190
iteration
cardinality
upper bound lower bound ceil(lower bound)
Figure 10: Bounds with 200 variable cardinality example.
An even larger example
In the interest of honesty, we show an example where branch and bound fails (in a practical sense). The problem to be solved here is a randomly generated problem instance of the form (7) with 200 variables. Figures 10, 11, and 12 show partial results from running this algorithm for 50 hours on a Linux system with an Intel Pentium M 1.7 GHz and 1 GB of RAM. After solving around 10000 LPs, we do not know what the optimal cardinality is; we only know that it lies between 135 and 179. You could, however, report terrific progress to your boss, by pointing out that in 50 hours, you have successfully reduced the total number of possible sparsity patterns (i.e., values of the Boolean variable z) by a factor of 10^12. On the other hand, 2^200 ≈ 1. 6 · 1060 , so that still leaves a rather substantial number,
Acknowledgments
Arpita Ghosh and Alessandro Magnani helped with an earlier version of this set of notes.
References
[BBB91] V. Balakrishnan, S. Boyd, and S. Balemi. Branch and bound algorithm for com- puting the minimum stability degree of parameter-dependent linear systems. Int. J. of Robust and Nonlinear Control, 1(4):295–317, October–December 1991.
[LW66] E. L. Lawler and D. E. Wood. Branch-and-bound methods: A survey. Operations Research, 14:699–719, 1966.
[Moo91] R. E. Moore. Global optimization to prescribed accuracy. Computers and Mathe- matics with Applications, 21(6/7):25–39, 1991.