European Journal of Operational Research 122 (2000) 166±172
www.elsevier.com/locate/orms
Theory and Methodology
A note on splitting of variables in integer programming models A. Volgenant
*
Institute of Actuarial Science and Econometrics, Operations Research Group, Faculty of Economics and Econometrics, University of Amsterdam, Roetersstraat 11, 1018 WB Amsterdam, The Netherlands Received 20 July 1998; accepted 18 November 1998
Abstract The splitting of variables in an integer programming model is a tool to obtain a more constrained (tighter) linear programming relaxation. A known general method for knapsack constraints, the partial network reformulation method, produces an equivalent set of constraints that has only integer solutions. We show how to modify this method to reduce substantially the number of split variables and in most cases, the number of disaggregated constraints. Further, the modi®ed method can implicitly handle upper bounds on as well as ®xed charges for at least two variables of the considered constraint. Ó 2000 Elsevier Science B.V. All rights reserved. Keywords: Integer programming; Modeling; Tighter reformulation; Knapsack constraint
1. Introduction The splitting of variables in the formulation of an integer programming model is a tool to obtain a more constrained (tighter) linear programming relaxation. As one of the examples of variable splitting in the literature, we mention a multiperiod lot-sizing problem. The variable yt de®ned as the production in period t, can be split up into yt yt t yt; t1 yt T
t 1; 2; . . . ; T
with yts the production in period t for the demand in period s. Eppen and Martin (1987) have shown
*
Tel.: +31 20 525 4219; fax: +31 20 525 4349. E-mail address:
[email protected] (A. Volgenant).
that a reformulation based on this split up of variables together with a corresponding disaggregation of constraints guarantees an integer solution for the LP-model, i.e., a (re)formulation that cuts o fractional solutions of the LP-relaxation. Escudero and Mu~ noz (1998) have considered model tightening for 0±1 optimization problems, based on increasing and reducing coecients of knapsack constraints. Dantzig and Eaves (1973) have considered a more general reformulation for knapsack constraints denoted as Partial network reformulation by Williams and Brailsford (1997). The method represents a single knapsack constraint as a network ¯ow model, resulting in an equivalent set of constraints with all coecients and right-hand sides equal to one. The set has only integer solutions, a property that is lost at least partly
0377-2217/00/$ - see front matter Ó 2000 Elsevier Science B.V. All rights reserved. PII: S 0 3 7 7 - 2 2 1 7 ( 9 9 ) 0 0 0 6 5 - X
A. Volgenant / European Journal of Operational Research 122 (2000) 166±172
when applied to more than one constraint. Nevertheless, such an application, also in combination with a branch and bound approach is useful as the reformulation cuts o fractional solutions of the LP-relaxation. We will show for this network reformulation how the number of new variables can be reduced substantially, while the number of disaggregated constraints can be reduced in most cases. The reformulation contains less redundancy, an advantage for use in a branch and bound solver. Further, the method can implicitly handle upper bounds on and ®xed charges for at least two variables for each considered constraint. 2. Partial network reformulation We denote the constraint with positive integer coecients in a general form by a1 x1 a2 x2 an xn b: Reformulation of the constraint according to Dantzig and Eaves (1973) leads to an equivalent set of in general b equality constraints with all coecients and right-hand sides equal to 1, so that an integer solution is obtained when solving it. Each variable xi is split up into
b ÿ ai 1 0±1 variables which appear in
b ÿ ai 1 successive constraints; Pnso the total number of new variables is nb n ÿ i1 ai . The reformulation can be easily explained by considering a network consisting of b 1 vertices with vertex 0 as the source and vertex b as the sink.
167
Each original variable xi is split up into split variables that correspond to arcs with length ai , the coecient in the original constraint. Each feasible solution of the constraint corresponds to a directed path from source to sink, with the value of each variable given by the number of related arcs in the path. We illustrate the reformulation method and the improvements to come on an (extended) example of Dantzig and Eaves (1973) 4x 3y 2z u 6 with x; y; z and u non-negative and integer variables. For example, see Fig. 1, the path 0±1±4±5±6, with one arc of length 3 and 3 arcs of length 1, corresponds to the solution
x; y; z; u
0; 1; 0; 3. The equivalent constraints are as follows, with 0±1 split variables x1 ; x2 and x3 with x x1 x2 x3 , variables y1 ; . . . ; y4 with y y1 y2 y3 y4 , and so on for variables z1 ; . . . ; z5 for z and u1 ; . . . ; u6 for u: x1 y1 z1 u1 1; x1 x2 y1 y2 z1 z2 u2 1; x1 x2 x3 y1 y2 y3 z2 z3 u3 1; x1 x2 x3 y2 y3 y4 z3 z4 u4 1; x2 x3 y3 y4 z4 z5 u5 1; x3 y4 z5 u6 1: Williams and Brailsford (1997) consider conservation of ¯ow and some reshuing to obtain these constraints; they can be derived more directly by observing that one unit of ¯ow has to go through each of the b cuts given by the pairs of vertex sets f0; . . . ; i ÿ 1g and fi; . . . ; bg for i 1; . . . ; b. The splitting procedure is not polynomial as the number of vertices of the shortest path network
Fig. 1. The shortest path network for 4x 3y 2z u 6.
168
A. Volgenant / European Journal of Operational Research 122 (2000) 166±172
depends on the right-hand side coecient b and the number of arcs depends on b as well as on the ai -coecients. 3. Reduced network reformulation The number of split variables in the network reformulation can be reduced substantially as a consequence of the observation that there is redundancy in it, i.e., each solution of the considered constraint generally corresponds to more than one path from source to sink in the related network. In the example path 0±3±4±5±6 (among others) corresponds to the same solution
x; y; z; u
0; 1; 0; 3 as mentioned above. We de®ne the redundancy factor q of a network as the quotient of the number of sources to sink paths in the network and the number of solutions of the considered constraint; the ideal reformulation has q 1. The network of Fig. 1 has q 3:2, as the number of paths from source to sink is 29, while the considered constraint has 9 solutions. The redundancy can be exploited in general for the reduction of the number of variables. It is sucient to relate each solution to a path from source to sink with the property that arcs in the path corresponding to the same original variable are neighbors. As a consequence, the variable x1 has to be split up into b=a1 instead of b ÿ a1 1 variables, reducing the number of split variables unless a1 1. We can inductively determine the number of split variables for variables x2 ; x3 ; . . . ; xn . Given the network representation of the splitting of the variables up to xiÿ1 , ®rst the arc
0; ai has to be
added; then for each vertex v
v 1; 2; . . . ; b ÿ ai that has arc(s) coming in, an arc
v; v ai has to be added. By an induction reasoning, it is easy to understand that this network contains paths that correspond to the solutions of the constraint; compared to the unreduced approach, a number of paths have been disappeared with the property that arcs corresponding to one variable are no neighbors. For the example constraint 4x 3y 2z u 6 we ®nd as variable splitting: x with 1 split variable (saving 2 variables), y with 2 split variables (saving 2 variables), z with 4 split variables (saving 1 variable) and u with 6 split variables. The reformulation ± see Fig. 2 for the corresponding network ± is then: x1 y1 z1 u1 1; x1 y1 z1 u2 1; x1 y1 z2 u3 1; x1 y2 z2 z3 u4 1; y2 y3 z4 u5 1; y2 z4 u6 1: By the reduction of the number of variables, the number of paths from source to sink in the network is now 18 instead of 29 and the redundancy factor q 2 instead of 3.2. Clearly, there are still solutions of the constraint remaining that correspond to more than one path from source to sink in the network, e.g., the paths 0±2±3±4±6 and 0±1±2±4±6 correspond both to the solution
x; y; z; u
0; 0; 2; 2. It is in general dicult to say which sequence of the variables gives the smallest number of split variables and a network with minimal redundancy. Some observations are straightforward:
Fig. 2. The shortest path network for 4x 3y 2z u 6 with a reduced number of arcs.
A. Volgenant / European Journal of Operational Research 122 (2000) 166±172
· for a variable with ai 1 the number of split variables remains b=1 b ÿ 1 1 b; a sequence of the variables with a1 1 produces the largest number of split variables ± see the (unreduced) network of the example constraint in Fig. 1; · the sequence of the variables with a1 P a2 P P an can be a good heuristic choice, although it is not always optimal; for the example constraint, this choice x; y; z; u results in q 2 and the sequence x; z; y; u with az
2 < ay
3 in q 1:9; · suppose a pair of variables x and x0 with coecients a and a0 have gcd
a; a0 a with gcd short for greatest common divisor. For such a pair, it is best to place variable x after x0 in the sequence. The number of split variables is maximally reduced if the gcd
ai1 ; ai ai for all i as then b=ai split variables (the minimum number) have to be introduced instead of b ÿ ai 1 split variables (the maximum number). In the last section, we will illustrate the eect of this gcd-property. In Section 5 we will show how to reduce further the number of split variables and the redundancy. It is possible to exploit other constraints that hold for the variables. Escudero and Mu~ noz (1998) de®ne a cover C for a given integer kC as a set of indices of 0±1 variables such that at most kC variables can take the value 1, while a clique is a cover with kC 1. In the network reformulation, such a clique can be exploited. For the example constraint and the clique x z 6 1 we can modify the earlier described construction of the network. Given the network for the x-arcs and the y-arcs, we add the z-arcs as follows: an arc
v; v 2 has to be added for each vertex v
v 0; 1; . . . ; 4 that has arcs coming in that are not x-arcs or z-arcs. As a result, arcs (2, 4) and (4, 6) as well as variables z2 and z4 are super¯uous in Fig. 2, resulting in a network with q 5=3. 4. Reduction of the number of constraints The reduction of variables can lead to less than b disaggregated (dierent) constraints. Suppose that for some value b0 6 b the considered constraint has no solutions. This holds in general for
169
any vertex b0 without ingoing arc as then there is no path from the source to sink b0 . We consider as example 4x 3y b, that has solutions for b 7, and no solution for b 1; 2 and 5. The reduced reformulation for the case b 7 is (x x1 and y y1 y2 y3 ): x1 y 1 1 x1 y 2 1 y2 y3 1 y3 1
from the cuts corresponding to the vertices 1; 2 and 3;
from the cut corresponding to vertex 4;
from the cut corresponding to vertices 5 and 6;
from the cut corresponding to vertex 7:
So the improved method reduces the number of split variables from
4 5 9 to
1 3 4 and the number of constraints from 7 to 4. As the example is small, the solution follows from direct substitution: y3 1; y2 0; x1 1 and y1 0, so in original variables
x; y
1; 1. In general, one can ®rst analyze the network by calculating iteratively the number of solutions of the constraint for each relevant value of the righthand side. With s(j) de®ned as the number of solutions for right-hand side value j, and start values s
0 1 and s
j 0 for all values of j P 1, the quantity s(j) can be determined during the construction of the network by setting s
j : s
i s
j if arc (i, j) is added. After completing the network, each vertex i with s
i 0 corresponds to a disaggregated constraint that is already known, so there are jfi: s
i > 0gj disaggregated (dierent) constraints. For a constraint with ai 1 for variable i there are always b disaggregated constraints, as s
j P 1 for j 1; . . . ; b. Nearly always, the number of disaggregated constraints can be reduced by introducing split variables that correspond to more than one split variable so far. We introduce for a variable x, a cumulative variable Xi and a semi-cumulative variable Xi;j ; the corresponding arcs in the network have a length of i. ax for Xi and a length of
j ÿ i 1. ax for Xi;j . The value of x can be found as x i Xi
or
x x1 xiÿ1
j ÿ i 1Xi;j xj1
170
A. Volgenant / European Journal of Operational Research 122 (2000) 166±172
or a combination of these expressions. In applying the reformulation in a linear programming model, the original criterion coecient c of x has to be replaced by Ci i c for variable Xi and by Ci;j
j ÿ i 1c for Xi;j . As a consequence of the use of the (semi-) cumulative variables nodes can occur in the network with in and/or outdegree equal to zero. One can eliminate the constraints corresponding to these nodes as well as the split variables corresponding to the arcs incident to these nodes. For a vertex in the network that has only one arc outgoing and arcs ingoing that correspond to the same original variable, one can combine each ingoing arc with the outgoing arc to one arc corresponding to a semi-cumulative variable, e.g., for the example constraint vertex 2 is such a vertex and the variables u1 and u2 can be combined to U2 ± see Fig. 2. This result follows immediately from the ¯ow conservation that holds for such a vertex. In the example for paths using vertex 2 we ®nd u1 u2 with as a consequence U2 0 or 1 with an arc length a of 2. Using U2 , the constraint following from vertex 1
x1 y1 z1 U2 1 is the same as for vertex 2, so one of the two constraints can be omitted. In general the vertices 1; . . . ; a0 ÿ 1 obey this property, with a0 the subminimal a-coecient of the considered constraint, so the number of disaggregated constraints is at most b ÿ a0 1. In the next section, a further reduction of the number of constraints in the reformulation is introduced. 5. Variables with upper bounds and/or ®xed charges For the case with an upper bound, say l1 , on variable 1 this bound is obeyed if the variable is the ®rst in the chosen ordering of the variables, so that only m(1) split up variables are necessary, corresponding to arcs
0; a1 ;
a1 ; 2a1 ; . . . ;
l1 ÿ 1a1 ; l1 a1 with as a consequence that all solutions of the reduced network reformulation obey this upper bound. In the case that l1 P 3 the use of cumulative variables gives the advantage that redundant solutions in the network are suppressed, namely
paths from source to sink violating the neighborhood property for variable 1. The main advantage is that a ®xed charge can be treated by adding up this charge to the criterion coecient(s) of the related split variable(s). This approach of ®xed charges is attractive, as modeling a ®xed charge needs otherwise an (arti®cial) 0±1 variable and an extra constraint with a large coecient in it, often disturbing the accuracy of the linear programming computations. The reformulation as stated can be extended. Up to now, it is source oriented and the network is constructed forwardly. A similar reformulation can be given that is sink oriented, constructing the network starting in the sink and de®ning arcs backwards, i.e., given the network representation of the splitting of the variables from xn down to xi1 , ®rst an arc
b ÿ ai ; b has to be added; then for each vertex v
v b ÿ ai ; b ÿ 2ai ; . . . that has arc(s) going out, an arc
v ÿ ai ; v has to be added. Given an ordering of the source-oriented variables and also an ordering of the remaining sinkoriented variables, we can observe that a solution corresponds to a path that uses either source-oriented arcs or sink-oriented arcs or uses ®rst sourceoriented arcs followed by sink-oriented arcs. (Semi-) cumulative variables can also be applied for the sink-oriented variables. It is a free choice which variables are source oriented and which ones are sink oriented. So, one can combine the source and the sink approach, thus obtaining a formulation that obeys an upper bound and/or a ®xed charge for two variables, i.e., for the ®rst source-oriented and for the ®rst sink-oriented variable. For the example constraint 4x 3y 2z u 6 we give a reformulation with the variables x and y source oriented and z and u sink oriented; the variable splitting is then: x x1 ; y y1 2Y2 ;
z z1 2Z2 3Z3 ; u 2U2 u3 u4 2U5;6
(saving 4 2 8 split variables) and the reformulation ± Fig. 3 gives the corresponding network: x1 y1 Y2 Z3 U5;6 1; x1 y1 Y2 Z2 Z3 u4 1; x1 Y2 Z2 Z3 u3 1; Y2 z1 Z2 Z3 U2 1;
A. Volgenant / European Journal of Operational Research 122 (2000) 166±172
171
Fig. 3. The network for 4x 3y 2z u 6 with cumulative variables, eliminating all the redundancy.
having 10 variables and 4 disaggregated constraints with 9 solutions, the number of solutions for the example constraint, so q 1. The reformulation of the constraint 4x 3y 7 (see previous section) with x source oriented and y sink oriented is simply x 1 and y 1. 6. Some results and ®nal remarks The described alternative reformulation gives a reduction in split variables and disaggregated constraints that depends on the coecients of the considered constraint. Table 1 illustrates the effects of constraints with coecient values up to 6 and right-hand side values up to 12. The variables are ordered in subsequences with decreasing avalue and the gcd-property, while the last two variables are used with the sink-oriented approach; cumulative split variables are used when
the in and outdegree of a node are equal to 1. Especially for the second constraint the reduced approach is very successful, due to the gcd-property of the variables. We see that the reduced network has always a lower redundancy and that for the ®rst constraint, the redundancy grows much slower with the value of b in the reduced network than in the standard one. We note that the number of constraints in the reformulation can be reduced further if one uses mixed semi-cumulative split variables, i.e., cumulative variables that correspond to more than one original variable. For vertices with at most 4 incident arcs, these variables reduce both the number of disaggregated constraints and the number of variables with one, except for the case of vertices with 4 arcs (2 in and 2 out) as then the eect is only the reduction of 1 constraint. For vertices with 5 or more incident arcs the number of constraints can be reduced at the price of more variables.
Table 1 The number of split variables and disaggregated constraints and the redundancy factor for the standard and the reduced reformulation Constraint coecients
Standard reformulation
Reduced reformulation
a
b
# Sol.
# Var.
# Constr.
q
# Var.
# Constr.
q
(4, 3, 2, 1)
6 7 8 9 10 8 9 10 11 12
9 11 15 18 23 5 4 7 5 11
18 22 26 30 34 21 25 29 33 37
6 7 8 9 10 8 9 10 11 12
3.2 5.1 7.2 11.6 17.4 2.0 3.3 3.1 6.0 4.5
10 11 13 15 17 8 7 7 9 11
4 5 5 6 7 3 4 3 5 4
1.2 1.2 1.3 1.3 1.7 1 1 1 1 1
(6, 4, 3, 2)
172
A. Volgenant / European Journal of Operational Research 122 (2000) 166±172
Fig. 4. The network for 4x 3y 2z u 6 using mixed semi-cumulative variables.
We explain the approach for a vertex with 3 arcs; say xa and xb correspond to incoming arcs and xc to the outgoing arcs with corresponding coecients aa , ab and ac . Then combine xa and xc to V 0 and xb and xc to V 00 with a0 aa ac and a00 ab ac . Applied to the example constraint 4x 3y 2z u 6 as in the previous section and Fig. 3 we obtain: for vertex 2: for vertex 3:
V 0 : U5;6 Z2 ; V 00 : y1 u3 ;
U4;6 : u4 U5;6 ; U3;6 : u3 U4;6 ;
and the reformulation with 2 constraints and 8 variables ± see Fig. 4 for the network: x1 V 00 Y2 Z3 V 0 U4;6 1; Y2 z1 V 0 Z3 U2 1: Constraints can be trivially reformulated by introducing a mixed semi-cumulative split variable considered constraint, ni for each solution i of the P replacing the constraint by i ni 1 with a corresponding transformation of the original variables in the n-variables. This reformulation is only practical for constraints with a small number of solutions. We can conclude that it is possible to substantially suppress redundancy in the network reformulation with as a consequence a reduction of the number of split variables and the number of dis-
aggregated constraints; for ®xed charge problems, it is attractive as for two such variables per constraint the solutions of the reformulation automatically obey the ®xed charge for these variables. Because of the lower redundancy as a consequence of the smaller number of variables and constraints in general the described reformulation deserves consideration for use in branch and bound based solvers, e.g., MINTO of Nemhauser et al. (1994), especially for problems with upper bounds and ®xed charges for some variables. References Dantzig, G.B., Eaves, B.C., 1973. Fourier±Motzkin elimination and its dual. Journal of Combinatorial Theory A 14, 288± 297. Eppen, G.D., Martin, R.K., 1987. Solving multi-item capacitated lot-sizing problems using variable rede®nition. Operations Research 35, 832±848. Escudero, L.F., Mu~ noz, S., 1998. On characterizing tighter formulations for 0±1 programs. European Journal of Operational Research 106, 172±176. Nemhauser, G.L., Savelsbergh, M.W.P., Sigismondi, G.C., 1994. MINTO, a Mixed INTeger Optimizer. Operations Research Letters 15, 47±58. Williams, H.P., Brailsford, S.C., 1997. The splitting of variables and constraints in the formulation of integer programming models. European Journal of Operational Research 100, 623±628.