Spanning Trees with Node Degree Dependent Costs and Knapsack Reformulations

8
Spanning Trees with Node Degree Dependent Costs and Knapsack Reformulations Lu´ ıs Gouveia 1,2 Faculty of Sciences University of Lisbon Lisbon, Portugal Pedro Moura 3 Faculty of Sciences University of Lisbon Lisbon, Portugal Abstract The Degree constrained Minimum Spanning Tree Problem (DMSTP) consists in finding a minimal cost spanning tree such that every node has a degree no greater than a fixed value. We consider a generalization of the DMSTP with a more general objective function that includes modular costs associated to the degree of each node. We show how the problem can be viewed as the intersection of a spanning tree problem and a knapsack problem. We present several linear programming models, based on the previous decompositions, together with some valid inequalities and compare their respective linear programming relaxations using random instances. Keywords: Spanning Trees, Discretized Reformulation, Knapsack Reformulation. 1 Sponsored by FCT, research grants POCTI-ISFL-1-152 and POSI/CPS/41459/2001 2 Email: legouveia.fc.ul.pt 3 Email: [email protected] Electronic Notes in Discrete Mathematics 36 (2010) 985–992 1571-0653/$ – see front matter © 2010 Elsevier B.V. All rights reserved. www.elsevier.com/locate/endm doi:10.1016/j.endm.2010.05.125

Transcript of Spanning Trees with Node Degree Dependent Costs and Knapsack Reformulations

Spanning Trees with Node Degree DependentCosts and Knapsack Reformulations

Luıs Gouveia 1,2

Faculty of SciencesUniversity of LisbonLisbon, Portugal

Pedro Moura 3

Faculty of SciencesUniversity of LisbonLisbon, Portugal

Abstract

The Degree constrained Minimum Spanning Tree Problem (DMSTP) consists infinding a minimal cost spanning tree such that every node has a degree no greaterthan a fixed value. We consider a generalization of the DMSTP with a more generalobjective function that includes modular costs associated to the degree of each node.We show how the problem can be viewed as the intersection of a spanning treeproblem and a knapsack problem. We present several linear programming models,based on the previous decompositions, together with some valid inequalities andcompare their respective linear programming relaxations using random instances.

Keywords: Spanning Trees, Discretized Reformulation, Knapsack Reformulation.

1 Sponsored by FCT, research grants POCTI-ISFL-1-152 and POSI/CPS/41459/20012 Email: legouveia.fc.ul.pt3 Email: [email protected]

Electronic Notes in Discrete Mathematics 36 (2010) 985–992

1571-0653/$ – see front matter © 2010 Elsevier B.V. All rights reserved.

www.elsevier.com/locate/endm

doi:10.1016/j.endm.2010.05.125

1 Introduction

Consider an undirected graph G = (V,E) with V = {1, . . . , n} and let ce ≥ 0denote the cost of edge e ∈ E. In this paper, we consider a generalization of thewell studied Degree constrained Minimum Spanning Tree Problem - DMSTP -(see [3], and the references inside) which is known to be NP-hard. This gener-alization has an objective function that, besides the usual link costs, considerscosts on the nodes which depend on the value of the corresponding degree,motivated in the context of a telecommunications network. This equipmentconsists of a switch matrix, responsible for the rerouting of incoming packetsand interface modules (with a fixed number of ports, B) to support all thelinks at that node. The degree cost of any non-leaf node is a function of theswitch matrix cost, P1, and the cost per interface module, P2, and is defined as,φk = P1+k·P2, ∀ k ≥ 1 (k is the number of modules needed to support all theconnections at the node). Let deg(i) denote the degree of node i ∈ V in a givenfeasible solution and D+1 the maximum number of links a node can support(i.e., deg(i) ≤ D + 1, ∀ i). The maximum number of modules that need tobe installed in any node i is, K =

⌈D+1B

⌉. The objective function involves the

sum of the edge costs and a term on the node degrees,∑

i∈V f(deg(i)), where:

f(deg(i)) =

{0 if deg(i) = 1φ1 if 2 ≤ deg(i) ≤ Bφk if (k − 1) · B + 1 ≤ deg(i) ≤ k · B k = 2, . . . ,K

The cost function f(deg(i)) is typical of the so-called Network Loading Prob-lems, [2,4]. In these problems, the loading constraints are usually imposedon the arcs of the network. Problems including discrete node costs as well,are studied in [7]. In our work we focus only on discrete node costson treenetworks.

2 Integer Programming Formulations

Although the original problem is defined with symmetric edge costs, directedformulations lead, in general, to models with a tighter LP bound, [8]. To viewthe problem as a directed one, we consider the problem of finding a minimumcost arborescence rooted away, for instance, from node 1, in a directed graphG = (V,A). A is the set of arcs such that for each edge e = {i, j} ∈ E, we havetwo arcs (i, j), (j, i) ∈ A with cij = cji = ce (edges e = {1, j} ∈ E are replacedonly by a single arc (1, j) ∈ A). Let A+(i) denote the set of all arcs divergingfrom node i and X(S) =

∑(i,j)∈S xij . With respect to a generic model (P ),

let (P ) and V (P ) be, respectively, the LP relaxation and the optimal value of

L. Gouveia, P. Moura / Electronic Notes in Discrete Mathematics 36 (2010) 985–992986

model (P ).

2.1 Integer Non-Linear Programming Formulation

Let 〈DST1〉 denote the convex hull of incidence vectors of directed spanningtrees rooted at node 1. Consider variables xij = 0/1 indicating whether arc(i, j) is in the solution and integer variables ui such that ui = deg(i)−1 inthe solution. The problem can be modeled as the integer non-linear program(NLF ) in Figure 1. Constraints (2), given in a generic form, indicate that

(NLF ) min∑

(i,j)∈A

cij xij +∑i∈V

f(ui + 1) (1)

s.to : x ∈ 〈DST1〉 (2)

i ∈ V \{1} (3a)X(A

+

(i)) = ui +

{0

1 i = 1 (3b)

ui ≤ D i ∈ V (4)

ui ∈ N0 i ∈ V (5)

Fig. 1. Non-linear Formulation

the set of arcs (i, j) such that xij = 1 is a directed spanning tree. They canbe represented by several equivalent sets of linear constraints, [8], that eitherinvolve only the xij variables (leading, in general, to exponential sized sets ofinequalities) or involve other variables as well (leading, in general, to compactformulations). One formulation is the so-called multicommodity flow (MCF)formulation. In the results reported in section 3, we used instead a single-commodity flow (SCF) formulation augmented with the 2-subtour eliminationconstraints

xij + xji ≤ 1 (i, j) ∈ A, i �= 1 (6)

It is know that the projection of the feasible set of the LP relaxation of thisformulation into the space of the xij variables does not describe the convex hullof spanning trees. However, the results given in [10], show that using a (SCF)formulation we obtain LP bounds equal to (or rather close to) the LP boundsobtained with a (MCF) formulation. This is not surprising since the objectivefunction contains an extra term that does not depend on the arc variables.The advantage of using the (SCF) model is obvious since it uses much fewervariables and the integer optimal is obtained in a much faster way. Constraints(3a) and (3b) define the outdegree of every node. Since the solution is directedaway from node 1 and one single arc is incident into every node, except theroot node, the given constraints differentiate the two cases (root node andnon-root nodes). Constraints (4) are upper bound degree constraints and

L. Gouveia, P. Moura / Electronic Notes in Discrete Mathematics 36 (2010) 985–992 987

constraints (5) define the domain of the ui variables. Clearly, the formulationis non-linear and in the next sections we describe two reformulation techniquesto obtain ILP models.

2.2 Integer Linear Programming Formulations

2.2.1 Discretized Formulations Part I: Discretizing the Node Variables

This formulation uses ”new” binary variables ydi , (i ∈ V, d ∈ {1, . . . , D}) in-dicating whether node i has degree equal to d + 1 in the tree solution. Weobtain the discretized model from the (NLF ) model, by using

ui =

D∑d=1

d · ydi , i ∈ V (7)

to replace each occurrence of the ”old” variables ui and by including the con-sistency constraints (10). The non-linear term, f(

∑D

d=1 d · ydi + 1), in theobjective function can be rewritten as the linear term on the objective func-tion (8) (with hd = f(d+ 1)). The new model (DNV ) is shown in Figure 2.

(DNV ) min∑

(i,j)∈A

cij xij +∑i∈V

D∑d=1

hd · ydi (8)

s.to : x ∈ 〈DST1〉 (2)

i ∈ V \{1} (9a)X(A

+

(i)) =

D−1∑d=1

d · ydi +

{0

1 i = 1 (9b)D∑

d=1

ydi ≤ 1 i ∈ V (10)

ydi ∈ {0, 1} i ∈ V, d = 1, . . . , D (11)

Fig. 2. Linear Formulation - Discretizing the Node Variables

Constraints (9a) and (9b) are the new coupling constraints and guarantee thatfor nodes i with deg(i) = 1 we have ydi = 0, ∀ d. Together with the consistencyconstraints (10) these constraints guarantee that if the degree of a node i isequal to d∗ + 1 > 1, then yd

i = 1 and ypi = 0, ∀ p �= d∗.The idea of replacing an integer variable with a set of binary variables with anindex has already been applied to other problems, [1,5,6,11].In these works,the main reason for performing this change of variable set is to create newand effective sets of valid inequalities. However, as noted in [5] and then usedin [6], the new variables allow us to model versions of the original problemwith non linear costs, which is the case in our work. Note also that due tothe degree upper limit, the (DNV ) model has fewer discretized variables thanthe discretized models in the referred works (which was a drawback of the

L. Gouveia, P. Moura / Electronic Notes in Discrete Mathematics 36 (2010) 985–992988

approach in these cases).The LP relaxation of the (DNV ) model is, in general, quite weak. However,it can be significantly improved by the following set of valid inequalities sug-gested by the structure of constraints (9a):

xij ≤D∑

d=1

ydi (i, j) ∈ A, i �= 1 (12)

Note that the intuition for adding the new constraints to (DNV ) is similar toadding so-called strong location cuts in capacitated location models. We willdenote by (DNV+) the (DNV ) model with the new set of constraints.

2.2.2 Spanning Tree/Knapsack reformulation

Consider again the formulation (NLF ). Summing up constraints (3a) and(3b) and using

∑(i,j)∈A xij = n− 1 (which is implied by 〈DST1〉) we obtain:∑

i∈V

ui = n− 2 (13)

Adding this redundant constraint to model (NLF ) allows us to decomposethe problem in two subproblems: a directed spanning tree problem in the xvariables, and a bounded knapsack problem with an equality constraint, [9], inthe u variables. Constraints, (3a) and (3b), link the two subproblems. Wecan replace the set of constraints of the knapsack subproblem by an extendedformulation obtained by writing the shortest path equations of the underlyingdynamic program and combining it with the discretized formulation. LetG = (V , A) be the extended graph associated with this path representation.The path variables, wst

i , represent the decision of setting the degree of node ito t−s+1 and are related to the degree variables ui as follows:

ui =∑

(is,t)∈A

(t− s) · wsti , i ∈ V (14)

Let 〈K/P0〉 = {(u, w) satisfying w-path system, (14) and (5)} be the set offeasible solutions of the knapsack subproblem stated in terms of paths inG. The path variables give information on the value of the degree of node ihence, the objective function (1) can be rewrtitten in a linear way leading tothe Spanning Tree/Knapsack reformulation depicted in Figure 3.

(ST/K0) min∑

(i,j)∈A

cij xij +∑i∈V

∑(is,t)∈A

ht−s · wsti (15)

s.to : (2), (3a), (3b)

(u,w) ∈ 〈K/P0〉 (16)

Fig. 3. Spanning Tree/Knapsack Reformulation of model (NLF )

Our computational results will show that the LP bounds of the knapsack

L. Gouveia, P. Moura / Electronic Notes in Discrete Mathematics 36 (2010) 985–992 989

model (ST/K0) are never worse (better in several cases) than the LP boundsproduced by the (DNV ) model. In fact, we can prove that,

Proposition 2.1 V (ST/K0) ≥ V (DNV )

To prove this result we consider a spanning tree/knapsack reformulation, de-rived from the model (DNV ). If we sum up all constraints (9a) and constraint(9b) of model (DNV )) we obtain the redundant constraint:∑

i∈V

D∑d=1

d · ydi = n− 2 (17)

Adding this equality to model (DNV ) we can decompose the problem into twosubproblems: a directed spanning tree problem in the x variables, as before,and a multiple choice knapsack problem with an equality constraint, [9], in they variables. Constraints, (9a) and (9b), link the two subproblems. Follow-ing the same reasoning used for the (ST/K0) model we can use an extendedformulation that is obtained by writing the shortest path equations of the un-derlying dynamic program and combining it with the discretized formulationusing the following set of linking constraints between the path variables andthe discretized variables:

ydi =∑

(is,s+d)∈A

ws,s+di i ∈ V, d = 1, . . . , D (18)

Let (ST/K1) denote this new spanning tree/knapsack reformulation on thediscretized space. It can be easily shown that some of the extreme points of theset of feasible solutions of the LP relaxation of the multiple-choice knapsacksubproblem defined by constraints (17), (10) and (11), are fractional. Thus,we may conclude that V (ST/K1) ≥ V (DNV ).It can be shown, [10], that model (ST/K1)) gives the same LP bound asmodel (ST/K0) and, as a consequence, we can conclude that V (ST/K0) ≥V (DNV ). Model (ST/K1) is only used to prove Result 2.1 and will not betested, since it has more variables and constraints than the model (ST/K0).The LP bound of model (ST/K0) by adding the following constraints:

xij ≤

D∑d=1

∑(is,s+d)∈A

ws,s+di (i, j) ∈ A, i �= 1 (19)

We denote by (ST/K0+) the model (ST/K0) with this new set of valid in-equalities. In a certain sense, these new inequalities are the same as theinequalities (12) presented earlier. A similar dominance relationship arisesbetween the models (ST/K0+) and (DNV+) and thus, we also have that,

Proposition 2.2 V (ST/K0+) ≥ V (DNV+)

L. Gouveia, P. Moura / Electronic Notes in Discrete Mathematics 36 (2010) 985–992990

3 Computational Results

In this section we present some of the computational results we have per-formed in order to evaluate the quality of the models that were presented inthe previous section. All the results were obtained on a INTEL CORE 2,2.4 GHz computer with 3.327 Gb of RAM within the CPLEX 11.0 environ-ment. The models are evaluated in two related ways: i) value of the optimalLP solutions and CPU time to obtain it and ii) CPU time to obtain the op-timal integer solution. We have solved the LP relaxation of models (DNV ),(DNV+), (ST/K0) and (ST/K0+) using the (SCF) system augmented withconstraints (6). This last model was used to obtain the optimal integer solu-tions within the branch-and-cut algorithm of CPLEX because in most of thecases, it has a better LP relaxation value and smaller corresponding averageCPU times. Here we present tests with instances with |V | = 50 nodes and|E| = 300 edges. The nodes are randomly located in a grid of 22x22. Wetested 2 types of networks: Cable and Wireless. In Cable networks, the costsare obtained by multiplying the integer rounded euclidean distance betweenits extreme nodes by 10 (the unit cost of the cable); in Wireless networksthe edge costs are fixed for any pair of nodes whose euclidean distance is in aspecific range, i.e., for an edge e = {i, j},

ce =

{5 if distij ≤ 59 if 5 < distij ≤ 1512 if distij > 15

For each instance, we tested different combinations of (P1, P2) – first columnin Table 1 – and D+1 – second column (whereas parameter B was set to 3).Next, the table is divided in two parts: for each type of network, we presentthe gaps between the optimal value and the LP bound in the first 4 columnsand the CPU time to obtain the optimal integer solution in the last column.

Wireless Cable

(P1, P2) D (DNV ) (ST/K0) (DNV +) (ST/K0+) (DNV ) (ST/K0) (DNV +) (ST/K0+)

3 0,1 0,1 0,1 0,1 46 5,8 5,8 2,3 2,3 2554 1,1 1,1 0,1 0,1 8 12,3 12,3 3,0 3,0 327(100, 10)5 2,4 2,4 0,2 0,2 43 18,3 18,3 2,3 2,3 1416 6,7 3,6 3,2 0,4 80 24,4 23,3 3,4 3,4 902

3 0,1 0,1 0,1 0,1 21 4,8 4,8 2,0 2,0 3234 0,7 0,7 0,1 0,1 7 8,1 8,1 2,2 2,2 317(100, 50)5 1,6 1,6 0,2 0,2 21 16,2 16,2 3,2 3,2 17066 5,8 2,4 3,5 0,2 137 23,0 21,5 4,7 4,7 10093

Table 1

As expected, the CPU time to obtain the optimal integer solutions increaseswhen the value of the maximum degree increases (the CPU times to obtain theLP bounds are not presented since they were all lower than 10 seconds). The

L. Gouveia, P. Moura / Electronic Notes in Discrete Mathematics 36 (2010) 985–992 991

gaps were greater for the Cable networks and also increased with the value ofD+1. When comparing the models in terms of gaps, we note that the knapsackmodels improve the gaps produced from the corresponding discretized modelsonly for the scenarios with D+1 = 6. The use of the valid inequalities (12)(or (19) for the (ST/K0) models) reduced considerably the gaps.

References

[1] Correia, I. , L. Gouveia and F. Saldanha da Gama, Discretized formulations forcapacitated location problems with modular distribution costs, EJOR 204(2)(2010), 237–244.

[2] Croxton, K. , B. Gendron and T. Magnanti. A comparison of Mixed-IntegerProgramming Models for Non-Convex Piecewise Linear Cost MinimizationProblems, Management Science 49 (2003), 1268–1273.

[3] Cunha, A., and A. Lucena. Lower and upper bounds for the Degree-constrainedMinimum Spanning Tree Problem, Networks 50(1) (2007), 55–66.

[4] Frangioni, A., and B. Gendron, 0-1 Reformulations of the Network LoadingProblem, Discrete Applied Mathematics 157(6) (2009), 1229–1241.

[5] Gouveia, L., A 2n constraint formulation for the capacitated minimal spanningtree problem, Operations Research 43 (1995), 130–141.

[6] Gouveia, L., and F. Saldanha da Gama, On the capacitated concentrator locationproblem: a reformulation by discretization, C & OR 33 (2006), 1242–1258.

[7] Holler, H., B. Melian and S. Voß, Applying the pilot method to improve VNS andGRASP metaheuristics for the design of SDH/WDM networks, EJOR 191(3)(2008), 691–704.

[8] Magnanti, T., and L. Wolsey, Handbooks in Operational Research andManagement Science: Optimal Trees, M.O. Ball, T.L. Magnanti, C.L. Monma,G.L. Nemhauser, 1995.

[9] Martello, S., and P. Toth, Knapsack Problems: Algorithms and ComputerImplementations, John Wiley & Sons, 1990.

[10] Moura, P., ”Problema da Arvore de Suporte de Custo Mınimo com Restricaode Grau e Custos Associados aos Nodos,” Ph.D. thesis, Faculty of Sciences,University of Lisbon, Portugal,December,2009.

[11] Uchoa, E., R. Fukasawa, J. Lysgaard, A. Pessoa, M. Poggi de Aragaoand D. Andrade, Robust Branch-Cut-and-Price for the Capacitated MinimumSpanning Tree Problem over a Large Extended Formulation, MathematicalProgramming 112(2) (2008), 443–472.

L. Gouveia, P. Moura / Electronic Notes in Discrete Mathematics 36 (2010) 985–992992