Algorithms for Binary

T K Sarkar Institute of Statistics and Operations Research Victoria University of Wellington New Zealand [email protected]

Abstract

This paper describes the implicit enumeration method of Balas for solving linear binary integer programming problems. Surrogate constraints and constraint reduction techniques are also described. The dual problem is used to derive the surrogate constraint and to accelerate the implicit enumeration method.

1. Introduction

We will consider a linear problem minZ = V n c. x. j J

subject to a., x. < b., i e M = [1 ,2 ,..., m]

j = i U 1

x. = Oor 1, j e N = [1 ,2 ...... n].

We assume that each c. > 0. The RHS bj can have any sign. Any pure 0-1 linear problem can be put into this format. There are broadly two classes of methods of solution for the above. The first, simplex method with , is the popular one. Excellent surveys are given in [10] and [11]. The second method is called implicit enumeration method and was proposed by Balas [1] in 1965. Branch and bound can be incorporated in implicit enumeration. Simplex method to solve a dual problem can also be added to make the algorithm more efficient

190 The idea of incorporating a surrogate constraint with implicit enumeration was first proposed by Glover [6 ]. A surrogate constraint is a non-negative linear combination of the constraints of the problem. Any trial solution which is infeasible for the surrogate constraint is also infeasible for the whole problem and can be discarded from consideration. In addition, sometimes the surrogate constraint can be used to fix some of the variables to 0 or 1 , thereby reducing the dimension of the problem. Frequently the constraints of the problem can be reduced to make them "tighter". Such tighter constraints reduce the number of iterations in the algorithm for both simplex method with branch and bound and implicit enumeration method. In the following sections we will describe the implicit enumeration method along with surrogate constraints and constraint reduction.

2. Constraint Reduction This method is usually called preprocessing and has been used successfully by Crowder et al [3] and Johnson et al [9] along with simplex method and branch and bound. A constraint of the form ^ a^ x. < b (each x^ = 0 or 1) is called a type II je N constraint. Sometimes it can be reduced to a constraint Y al x. < b1 such that both J j jeN have the same feasible solution set and the second constraint reaches equality more often than the first one. Let S., i s= 1 ,..I be a partition of N. We can consider a type II constraint along with special ordered set constraints ^ x. £ 1 , i = 1 , I. jeS i J Considerable reduction in the type II constraint can be achieved if special ordered set constraints are present. Methods of reduction will be shown at the time of presentation. Reduction accelerates simplex method with branch and bound.

3. Implicit Enumeration Method

It was first proposed by Balas [1] in 1965 and subsequently modified by Glover [6 ], Geoffrion [4,5] and Balas [2]. It does not require any simplex tableau. The only operations performed are addition, subtraction, multiplication and comparison. Division is used only at one step. A partial solution is denoted for example by a set J = [5, - 2, 3]. It means that three variables have been fixed at x5 = x3 = 1 and x2 = 0 (in the order given by J) and the remaining variables are free to take any values 0 or 1. A completion of J means assigning specific values to the free variables. A partial solution J is fathomed if none of its completions can lead to a better solution. After a partial solution is fathomed we backtrack. In the above example it means that we take the rightmost element and reduce it to 0. Then J becomes the new partial solution [5, -2, -31. We try to fathom this new J. If we succeed then the next partial solution is [-5] i.e. x5 = 0 and x2, x3 becomes free. If we cannot fathom J then we go forward. This means that we select a free variable x. and set it to 1. Then new J = [-5, j]. We try to fathom this new J.

191 Suppose we have reached a partial solution J = [-k, -1]. If we can fathom this J then we have to backtrack. Since we cannot backtrack (no fixed variable has value 1) we stop. The partial feasible solution with the smallest value of Z that we have found so far is optimal. If no feasible solution has been found then the problem is infeasible. It can be shown that the iterations will stop in a finite number of steps. For the efficiency of the algorithm the fathoming tests are crucial. At the t-th iteration let J{ be the current partial solution and let S‘ =b i-|, a„-M; z‘= £ c .. Xj>0 Xj>0

Here S \ is the value of the slack variable for the i-th constraint and Zl is the value of the objective function. If S j < 0 then Jt is not feasible for constraint i. Let Zm be the smallest feasible value of Z found so far. We will now describe the fathoming tests of Balas. TEST 1: Find A = [x. free : a.. > 0 for all i such that S \ < 0]. If x. e At then it is no t j ij 1 j t longer free. TEST 2: If there are no more free variables left then backtrack. Otherwise find Bt = [x. free : Zl + a ^ Zm]. If x. e Bt then it is no longer free. TEST 3: If there are no free variables left then backtrack. Otherwise find C( = [ie M : S | < 0, Y a..>Sj]. Xjfree *ij<°

If i g Ct then no completion of the partial solution will make constraint i feasible and we must backtrack. If Ct is empty, then there is a danger that a completion will give a Z £ Zm. Glover and Zionts [8] suggested that we find D( = [ Xj free : Cj/1 a;j I > (Z m -Z ‘ )/IS|l, S | < 0, a;j < 0]. If all free variables are in Dt then all completions of Jt lead to Z > Zm and we must backtrack. TEST 4: For each free variable x. let j v .= £ min [0, S j - a..] and vk = max [v.]. J ieM U j The quantity v. gives a measure of infeasibility by setting x. = 1. In case of a tie for vk we select according to the smallest ck. Now k is added to Jt on the right to get J j, If vk = 0 then we have a feasible solution. We put Zm = Zt+1 and then backtrack. If vk < 0 then we go back to test 1 with Jt+r Suppose Jt = [1, -2, 3, 4, -5, -6] and we must backtrack. Tuan [13] has suggested that we take the last set of consecutive non-negative indices and calculate w = £ min[0, s|+a..], j = 3,4 ieM

192 and select wk = max [w.]. In case of a tie we choose according to largest ck. If

k = 3 then Jt + 1 = [ l,- 2 , 4, -3]. As an example we consider the following 10 variable, 7 constraint problem, [12].

c = [ 1 0 , 7, 1, 1 2 , 2 , 8 , 3, 1,5 , 3]

" 3 - 1 2 - 8 1 0 0 0 0 -7 2 1 0 1 - 1 0 0 -5 1 7 1 0 0 (aij) = 5 -3 - 1 0 0 0 0 - 2 0 1 -5 3 1 0 0 0 0 2 0 - 1 0 0 -4 - 2 0 -5 1 -9 - 2 0 0 9 0 •1 2 -7 6 0 2 -15 3 - 8 5 2 -7 - 1 0 -5 0 - 1 0 0

b = [- 2 , - 1 ,- -1 , 1 ,- -3, -7 ,-- 1 ] Using implicit enumeration method we found JQ = <|>, J., ..., Jg. This problem has

2 10 = 1024 possible solutions to enumerate. We explicitly enumerated only 9 and found that J2 = [9, 3] was optimal. Solving by branch and bound using simplex method with upper bounding needed 17 simplex iterations.

4. Dual Problems and Surrogate Constraint

The concept of surrogate constraints was proposed by Glover [6 ] and was further developed by Glover [7], Balas [2] and Geoffrion [5]. Any non-negative linear combination of the m constraints gives a single surrogate constraint such that any feasible solution to the m constraints is also feasible for the surrogate constraint and any solution which does not satisfy the surrogate constraint will not be feasible for the m constraints. A surrogate constraint can be incorporated into the implicit enumeration method to accelerate the algorithm. So far duality has been used to develop this constraint. Suppose at any stage we have a finite value of Zm and a partial solution Jt, which we want to fathom. We introduce dual variables ^ ^ 0 for the constraint i, i = 1 ,..., m and y. > 0, corresponding to the bounds x. < 1. Then the dual corresponding to the free variables can be written as minw‘= £ S‘ni+ £ ^ + A ieM jfree

subject to - £ a.. \i. - y. < c. i€M 1J J J 1

\i. >0,y.^ 0 , 1€ M, j free.

Here A = Zm - Zl - p, p = 1cm [cr c2, ..., c j if each c. is a non-negative integer. Otherwise p = 0. If min wl < 0, then no completion of Jt can give a value of Z better than Zm and we must backtrack. If min wl > 0, then Jt is not fathomed but the optimal p/s can be used to find a surrogate constraint which may fix some of the free x's. Then the tests of Balas can be applied.

193 In our example of section 3, we have used this idea at J3 = [9, -3] and J4 = [-9]. At

J3, w3 < 0 and it is fathomed. At J4 the dual solution is w4 = 1.58 > 0, Jij = 0.13, H3 = 1.16, p.6 = 0 .6 6 , |JLj = 0 .6 , the remaining fi's are 0 . The surrogate constraint is

X ^ [b,- X aij xi] + (Zm - p ~ X c, xj)2 ° ieM jeN jeN

i.e. 15.71 Xj + 10.9 x2 - 3.22 x5 + 11.96 x6 + 3.18 x J0 < - 1.64. We immediately get x5 = 1 and xx = x2 = x6 = x1Q = 0. Then J5 = [-9, -1, -2, - 6 , -10, 5] The tests of Balas give J6 = [(-9, -1 ,- 2 , - 6 , -10, 5), 3] '

Another round of tests indicates backtracking J7 = [(-9, - 1 , - 2 , - 6 , - 1 0 , 5), -3].

Now the dual gives min w7 = -° ° . We want to backtrack. Since the variables within the parenthesis come as a group we have nowhere to go. Hence J3 is optimal. By using the dual three times we have saved one iteration. We can start with a dual at the very beginning. Balas [2] has developed this idea and calls it filter method. In this method he starts with the zero-one programming problem m i n Z = £ e x. subject to ^ a., x. > b., ieM and x. = 0 or 1, je N. jeN J J jeN J J J Using the dual variables n and y the surrogate constraint is given by a^ Xj > bQ jeN where a. = £ n. ajjt je N and b0 = ]T (i. b.. ieM ieM For our example of section 3 the surrogate constraint is - 4.18 Xj-0.17 X2+x3+3.85 x4+2.26 x5-1.94 x6+0 x7+xg+5 x9-1.84 x10>3.13. These co-efficients a^ are ordered as follows: For a^ > 0 according to increasing order of c. / a.. For a. < 0 according to decreasing order of a.. The order is 5, 3, 8 , 9, 4, 7 (a? = 0), 2, 10, 6 , 1. Using the above order the filter method is as follows (a) Generate a series of solutions to the surrogate constraint and find a lower bound to min Z. (b) Use branching to generate these solutions such that the lower bound Z changes in an increasing order. (c) If the solution is feasible for the surrogate constraint then for all the constraints test the solution for feasibility and feasible completion. (d) The first solution feasible for all constraints is optimal. In our example we start with Jj = (5). LHS = a5 = 2.26. Lower bound to Z is Zj = c5 + [(bQ - a5 )/aLj, ] c3 = 2.87, since a5 < bQ < a5 + a^ The next solution to try is J2 = (-5, 3). Then lower bound to Z is 7^ = 3.13. In this way the first set of branching is

194 (1) [5], Zx = 2.87, (2) [-5, 3], Z2 = 3.13, (3) [-5, -3, 8 ], Z3 = 3.13, (4) [-5, -3, - 8 , 9], Z4 = 5(feasible), (5) [-5, -3, - 8 , -9, 4], Z5 = 12 (feasible),

(6 ) [-5, -3, - 8 , -9, -4, 7], infeasible ignore. The solutions, marked feasible/infeasible refer to the surrogate constraint. We branch from the smallest Z viz Z^ = 2.87. The first solution found feasible for the whole problem is at Z]3 and the solution is x3 = x5 = ^ = 1, Z = 6 . It needed 30 branchings to reach there. Instead of finding the dual solution we can add all the constraints and find a surrogate constraint In our example we found an optimal solution after 26 branches. Further numerical comparisons will be given during the presentation at the conference.

References

[1] E. Balas, An Additive Algorithm for Solving Linear Programs with Zero-One Variables, JORSA, 13, (1965) pp 517-546. [2] E. Balas, Discrete Programming by Filter Method, JORSA, 15, (1967) pp 915- 957. [3] H. Cowder, E.L. Johnson, M. Padberg, Solving Large Scale Zero-One Problems, JORSA, 31, (1983) pp 803-834. [4] A.M. Geoffrion, Integer Programming by Implicit Enumeration and Balas' Method, SIAM Rev, 7, (1967), pp 178-190 [5] A.M. Geoffrion, An Improved Implicit Enumeration Approach for Integer Programming, JORSA, 17, (1969) pp 437-454.

[6 ] F. Glover, A Multi-Phase Dual Algorithm for the Zero-One Integer Programming Problem, JORSA, 13, (1965), pp 879-919. [7] F. Glover, Surrogate Constraints, JORSA, 16, (1968), pp 741-749.

[8 ] F. Glover, S. Zionts, A Note on the Additive Algorithm of Balas, JORSA, 13, (1965), pp 546-549. [9] E.L. Johnson, M.M. Kostreva, U.H. Suhl, Solving 0-1 Integer Programming Problems Arising from Large Scale Planning Models, JORSA, 33, (1985), pp 803- 819. [10] G.L. Nemhauser, L.A. Wolsey, Integer and Combinatorial Optimization, Wiley, (1988). [11] G.L. Nemhauser, A.H.G. Rinnooy Kan, M.J. Todd, (eds) Optimization, North Holland, (1989). [12] D.R. Plane, C. McMillan jnr, Discrete Optimization, Prentice Hall, (1971). [13] N.P. Tuan, A Flexible Tree Search Method for Integer Programming Problems, JORSA, 19, (1971), pp 115-119.

195