scieee AI-readable full text Open interactive document viewer

Algorithms for the minimum spanning tree problem with resource allocation

Kataoka, Seiji,Yamada, Takeo

Abstract

EconStor is a publication server for scholarly economic literature, provided as a non-commercial public service by the ZBW.

Full text

Kataoka, Seiji; Yamada, Takeo Article Algorithms for the minimum spanning tree problem with resource allocation Operations Research Perspectives Provided in Cooperation with: Elsevier Suggested Citation: Kataoka, Seiji; Yamada, Takeo (2016) : Algorithms for the minimum spanning tree problem with resource allocation, Operations Research Perspectives, ISSN 2214-7160, Elsevier, Amsterdam, Vol. 3, pp. 5-13, https://doi.org/10.1016/j.orp.2015.12.001 This Version is available at: https://hdl.handle.net/10419/178266 Standard-Nutzungsbedingungen: Die Dokumente auf EconStor dürfen zu eigenen wissenschaftlichen Zwecken und zum Privatgebrauch gespeichert und kopiert werden. Sie dürfen die Dokumente nicht für öffentliche oder kommerzielle Zwecke vervielfältigen, öffentlich ausstellen, öffentlich zugänglich machen, vertreiben oder anderweitig nutzen. Sofern die Verfasser die Dokumente unter Open-Content-Lizenzen (insbesondere CC-Lizenzen) zur Verfügung gestellt haben sollten, gelten abweichend von diesen Nutzungsbedingungen die in der dort genannten Lizenz gewährten Nutzungsrechte. Terms of use: Documents in EconStor may be saved and copied for your personal and scholarly purposes. You are not to copy documents for public or commercial purposes, to exhibit the documents publicly, to make them publicly available on the internet, or to distribute or otherwise use the documents in public. If the documents have been made available under an Open Content Licence (especially Creative Commons Licences), you may exercise further usage rights as specified in the indicated licence. http://creativecommons.org/licenses/by-nc-nd/4.0/ Operations Research Perspectives 3 (2016) 5–13 Contents lists available at ScienceDirect Operations Research Perspectives journal homepage: www.elsevier.com/locate/orp Algorithms for the minimum spanning tree problem with resource allocation Seiji Kataoka ∗, Takeo Yamada Department of Computer Science, National Defense Academy, Yokosuka, Kanagawa 239-8686, Japan a r t i c l e i n f o Article history: Received 22 September 2014 Revised 9 December 2015 Accepted 30 December 2015 Available online 13 January 2016 Keywords: Minimum spanning tree problem Resource allocation Trade-off analysis Branch-and-bound method a b s t r a c t We formulate the minimum spanning tree problem with resource allocation (MSTRA) in two ways, as discrete and continuous optimization problems (d-MSTRA/c-MSTRA), prove these to be N P-hard, and present algorithms to solve these problems to optimality. We reformulate d-MSTRA as the knapsack constrained minimum spanning tree problem , and solve this problem using a previously published branch-and-bound algorithm. By applying a ‘peg test’, the size of d-MSTRA is (significantly) reduced. To solve c-MSTRA, we introduce the concept of f - f ractional solution , and prove that an optimal solution can be found within this class of solutions. Based on this fact, as well as conditions for ‘pruning’ subproblems, we develop an enumerative algorithm to solve c-MSTRA to optimality. We implement these algorithms in ANSI C programming language and, through extensive numerical tests, evaluate the performance of the developed codes on various types of instances. ©2016 The Authors. Published by Elsevier Ltd. This is an open access article under the CC BY-NC-ND license ( http://creativecommons.org/licenses/by-nc-nd/4.0/ ). 1. Introduction Numerous applications have been published on the minimum spanning tree problem (MST) [1,2] on an undirected graph [3] , where each edge is associated with a non-negative distance . Here, ‘distance’ may be cost, time, toll or penalty of each edge in specific applications. In this article we are concerned with a variation of this problem, where each edge may have different ‘modes’ associated with different pair of distance and ‘cost’. Or, we may have edges which can be ‘strengthened’ by increasing the amount of resources added to these edges. For example, in a city transportation network, we may take a bus or a train to go from one train station to the other, each with respective fare and traveling time. Or, while driving a car we may put more fuel to run faster. We formulate such a combination of the MST and the resource allocation problem (RA) [4] as discrete/continuous combinatorial optimization problems, prove these to be NP-hard, develop both of approximate and exact algorithms to solve these problems, and conduct a series of numerical experiments to evaluate the performance of the developed algorithms. To describe the problem, let G = (V, E) be a connected undirected graph, where V is a finite set of vertices and E ⊆V ×V is the set of edges. By n and m we denote the numbers of nodes and ∗Corresponding author. E-mail addresses: sei[email protected] (S. Kataoka), yamada.14[email protected] (T. Yamada). edges, i.e., n = | V | and m = | E| . Associated with each edge e ∈ Eis a cost function c e (·) , which relates r e , the amount of resource allocated to e , to the cost of this edge. Given a fixed amount R of total resources, our problem is to find a spanning tree of G and a resource allocation on that tree, such that the total cost incurred is minimized over all possible solutions. We formulate this as a discrete, as well as a continuous, optimization problem. In discrete optimization framework, edges can be either one of ‘normal’ or ‘priority’ modes, and the resource requirement and cost of each edge take different values depending on the mode of that edge. If edge e is in normal mode, the amount of resource required is r 0 e , with the corresponding cost c 0 e , while in priority mode these are r 1 e and c 1 e , respectively. These are related through a binary function c(·) as c 0 e = c e (r 0 e ) , c 1 e = c e (r 1 e ) (1) and, we assume c 0 e ≥c 1 e , r 0 e ≤r 1 e , ∀ e ∈ E . (2) That is, in priority mode cost is smaller than in normal mode with an expense of increased resource allocation at that edge. Let T denote the set of all the spanning trees in G , and by T ∈ T we mean a spanning tree as well as the set of edges constituting T . Resource allocation over T is represented by a binary vector r = (r e ) e ∈ T with r e ∈ { r 0 e , r 1 e } , ∀ e ∈ T . Then the problem is formulated as the following ‘discrete’ minimum spanning tree problem with resource allocation http://dx.doi.org/10.1016/j.orp.2015.12.001 2214-7160/© 2016 The Authors. Published by Elsevier Ltd. This is an open access article under the CC BY-NC-ND license ( http://creativecommons.org/licenses/by-nc-nd/4.0/ ). 6 S. Kataoka, T. Yamada / Operations Research Perspectives 3 (2016) 5–13 Fig. 1. Graph G = (V, E) for the proof of NP -hardness of c-MSTRA. d-MSTRA : minimize z(T , r) :=  e ∈ T c e (r e ) (3) subject to  e ∈ T r e ≤R , (4) r e ∈ { r 0 e , r 1 e } , ∀ e ∈ T , (5) T ∈ T . (6) Alternatively, the problem may be formulated as a continuous optimization problem. Here, the cost c e of edge e ∈ Eis a nonincreasing function of r e defined on the continuous interval [ r 0 e , r 1 e ] as c e = c e (r e ) . Specifically, we assume this to be linear c e (r e ) := s e −θe r e , (7) and put c 0 e := c e (r 0 e ) and c 1 e := c e (r 1 e ) for simplicity. From (2) , we have θe ≥0 . Thus, the ‘continuous’ minimum spanning tree problem with resource allocation is as follows. c-MSTRA : minimize z(T , r) =  e ∈ T c e (r e ) (8) subject to  e ∈ T r e ≤R , (9) r 0 e ≤r e ≤r 1 e , ∀ e ∈ T , (10) T ∈ T . (11) To prove N P - hardness of these problems, we first note that the standard 0–1 knapsack problem KP : maximize n  j=1 p j x j subject to n  j=1 w j x j ≤R , ∀ x j ∈ { 0 , 1 } , is N P -hard. Theorem 1. d-MSTRA and c-MSTRA are both N P -hard. Proof ( N P -Hardness of d-MSTRA) . Corresponding to the knapsack problem let G = (V, E) be with V = { v 0 , v 1 , . . . , v n } and E = { (v 0 , v 1 ) , . . . , (v n −1 , v n ) } . For each edge e = (v j−1 , v j ) ∈ Ewe set r 0 e = 0 , c 0 e = p j , and r 1 e = w j , c 1 e = 0 . Then, d-MSTRA is identical to KP, and thus N P -hard. ( N P -hardness of c-MSTRA) Given the knapsack problem above, let G = (V, E) be a graph with V = { v 0 , v 1 , . . . , v n , t} and E = { e 1 , e  1 , e 2 , e  2 , . . . , e n , e  n , f} . Here, e j and e  j both connect v j−1 and v j , and f = (v n , t) (see Fig. 1 ). The resource and cost are r 0 (e j ) = r 1 (e j ) = w j and c 0 (e j ) = c 1 (e j ) = M −p j for e j , r 0 (e  j ) = r 1 (e  j ) = 0 and c 0 (e  j ) = c 1 (e  j ) = Mfor e  j , and r 0 f = 0 , r 1 f = R , c 0 f = c 1 f = 0 for f, where Mis a constant satisfying M > max 1 ≤j≤n p j . For a solution (T , r) of c-MSTRA on this graph, we introduce a 0–1 variable x j such that x j = 1 if e j ∈ T and x j = 0 otherwise ( j = 1 , 2 , . . . , n ). Note that x j = 0 implies e  j ∈ T . Then, this particular c-MSTRA can be rewritten as minimize n  j=1 (M −p j ) x j subject to n  j=1 w j x j ≤R , ∀ x j ∈ { 0 , 1 } . This is equivalent to KP, and thus c-MSTRA is N P -hard.  The problems formulated above may be regarded as a sort of trade-off analysis of spanning trees with respect to two criteria, the amount of resource consumed r(T ) =  e ∈ T r e and the cost c(T ) =  e ∈ T c e of the tree, provided that r e and c e are a priori given constants. Hassin and Levin [5] gave a polynomial time approximation scheme, and Yamada et al. [6] gave a branch-and-bound algorithm for such a problem. Trade-off analysis in general is quite standard in scheduling [7–9] and resource allocation [4] problems. If r(T ) is regarded as a second objective function, rather than a constraint, we have a multi-objective minimum spanning tree problem [10,11] . An important feature that distinguishes d- and c-MSTRAs from the previous researches is the fact that the coefficient c e is a function of r e , thus it can be enhanced by allocating larger amount of resources. To our knowledge, trade-off analysis in this framework is new in this paper. In Section 2 , we discuss d-MSTRA: how this can be reduced to the knapsack constrained minimum spanning tree problem (KCMST [6] , see also [12] ), and how computation can be speeded up by reducing the size of the problem. Sections 3 and 4 explore c-MSTRA and develop solution algorithm to solve this problem to optimality. Finally, in Section 5 a series of numerical experiments are done, both for d- and c-MSTRAs, to examine the behavior of the developed algorithms. Throughout theoretical development in these sections, KCMST plays a key role. Thus, KCMST and its solution algorithm are briefly reviewed in the Appendix for readers’ convenience. 2. Solution algorithm for d-MSTRA with problem reduction In this section we show that d-MSTRA can be reformulated as a KCMST on a ‘doubly edged graph’. Furthermore, by applying the ‘peg test’ the problem is substantially reduced in size. The reduced problem can be solved by SOLVE_KCMST routine [6] much faster than solving the unreduced problem directly. 2.1. d-MSTRA as KCMST We introduce ¯ G = ( ¯ V , ¯ E ) as the graph which is obtained from G by doubling each edge e ∈ Einto edges e 0 and e 1 ∈ ¯ E , corresponding to normal and priority modes, respectively. Thus, these edges are incident to the identical pair of nodes as e ∈ E, and the resource allocation and cost at e 0 ( e 1 , resp.) are r 0 e and c 0 e ( r 1 e and c 1 e , resp.). We have ¯ V = V and | ¯ E | = 2m . These graphs are illustrated in Fig. 2 for a planar example. Here we employ the following simplified notation for edges and trees in graph ¯ G . Superscripts in the edges of ¯ E are usually omitted, unless otherwise needed. Therefore, by e ∈ Ewe mean either e 0 or e 1 , and c e may refer to either c 0 e or c 1 e . T denotes the set of all the spanning trees in ¯ G . Thus, d-MSTRA can be rewritten as the following KCMST : minimize z(T ) :=  e ∈ T c e (12) subject to  e ∈ T r e ≤R , (13) T ∈ T . (14) S. Kataoka, T. Yamada / Operations Research Perspectives 3 (2016) 5–13 7 Fig. 2. Graphs G and its duplicate ¯ G . 2.2. Peg test for d-MSTRA Making use of SOLVE_KCMST [6] to solve KCMST, we can solve d-MSTRA, at least to some extent. However, by reducing the problem size through some preprocessing procedures, we may expect to solve larger instances more quickly. We show here a ‘peg test’ [13] for this purpose. We employ the following notations for simplicity’s sake: P is equivalently used to denote KCMST, and overbars in ¯ V , ¯ E , etc. are abbreviated, although we are concerned with ¯ G = ( ¯ V , ¯ E ) throughout this subsection. In the process of SOLVE_KCMST we obtain a (Lagrangian) lower bound z , a (local search) upper bound ¯ z , and the optimal Lagrangian multiplier λ† (see Appendix and [6] ). Let gap := ¯ z −z . (15) For an arbitrary edge f ∈ E, by P (f = 1) we denote the subproblem of P with a constraint f ∈ T added, i.e., P (f = 1) : minimize  e ∈ T c e subject to  e ∈ T r e ≤R , f ∈ T , T ∈ T . Furthermore, z (f = 1) denotes a lower bound to this subproblem, and P (f = 0) and z (f = 0) are defined analogously with respect to an additional constraint f / ∈ T . Then, the following peg test theorem is obvious. Proposition 1. Let T  denote an optimal solution to P. Then, (i) z (f = 1) > ¯ z implies f / ∈ T  , and (ii) z (f = 0) > ¯ z implies f ∈ T  . In case of (i) or (ii), respectively, fis said to be fixed-out or fixed-in . Fixed-out edges can never be included in any optimal solution, while those fixed-in must be included in any optimal solution of P. Then, eliminating these fixed edges we obtain a problem of reduced size. To obtain a lower bound z (f = 1) for f ∈ E, we make use of λ† obtained previously, and introduce the relaxation of P (f = 1) as follows. LP (λ† ;f = 1) : minimize  e ∈ T c e + λ† (  e ∈ T r e −R ) subject to f ∈ T , T ∈ T . Similarly, LP (λ† ;f = 0) is defined, and we obtain a lower bound z (f = 0) . These are minimum spanning tree problems (with an additional constraint f ∈ T or f / ∈ T ), and can be solved easily as LP (λ) . However, to compute z (f = 1) and z (f = 0) quickly for all f ∈ E, we propose the following approach. Let T † be the optimal solution to the Lagrangian relaxation LP (λ† ) (see Appendix ). Then, we have z =  e ∈ T † c † e −λ† R , where for e ∈ Ewe define c † e := c e + λ† r e . (16) Optimal solutions to LP (λ† ;f = 1) and LP (λ† ;f = 0) can be obtained by modifying T † as follows. For an arbitrary tree edge f in T † , by eliminating ffrom T † the set of nodes are partitioned into two disjoint subsets, say V 1 and V 2 ( V = V 1 ∪ V 2 , V 1 ∩ V 2 = 08 ), which are connected to each of the incident nodes of fthrough T † , respectively. By Cut (T † , f) , we denote the set of edges ranging over V 1 and V 2 . If we replace fwith an edge e ∈ Cut (T † , f) \ { f} , we obtain another tree T † −f + e with cost z(T † −f + e ) = z + c † e −c † f . Then, by cut optimality property [3] of T † −f + e , LP (λ† ;f = 0) is solved by finding an edge e , and replacing it with f, such that c † e is minimized over Cut (T † , f) \ { f} . Thus, with the minimum of this margin defined as (T † , f) := min { † c e | e ∈ Cut (T † , f) , e  = f} −c † f , (17) we obtain the following optimal objective value to LP (λ† ;f = 0) z (f = 0) = z + (T † , f) . (18) In case of f / ∈ T † , adding fto T † produces an elementary cycle Cycle (T † , f) with Cycle (T † , f) \ { f} ⊂T † . Then, replacing f / ∈ T † with an edge e ∈ Cycle (T † , f) \ { f} , we obtain another tree with cost z(T † + f −e ) = z + c † f −c † e , and due to cycle optimality property [3] of T † + f −e , LP (λ† ;f = 1) is solved by finding an edge e such that c † e is maximized over Cycle (T † , f) \ { f} . We define (T † , f) := c † f −max { † c e | e ∈ Cycle (T † , f) , e  = f} , (19) and obtain the following optimal value to LP (λ† ;f = 1) z (f = 1) = z + (T † , f) . (20) To sum up, we have the following peg test theorem for problem P. Theorem 2. Let T  be an optimal solution of P. Then, (i) f ∈ T † and (T † , f) > ¯ z −z implies f ∈ T  ( fis fixed-in), and (ii) f / ∈ T † and (T † , f) > ¯ z −z implies f / ∈ T  ( fis fixed-out). 3. A Characterization of Optimality for c-MSTRA We now turn to c-MSTRA. For a spanning tree T of G , r = (r e ) e ∈ T is said to be a resource allocation vector over T . A pair of a spanning tree T and such a vector rover T is a feasible solution of c-MSTRA if constraints (9) –(10) are all satisfied. A feasible solution (T  , r  ) is optimal if z(T  , r  ) ≤z(T , r) for any feasible solution (T , r) of c-MSTRA. We introduce the following. 8 S. Kataoka, T. Yamada / Operations Research Perspectives 3 (2016) 5–13 Definition 1. For edge f ∈ E, a feasible (T , r) is said to be an ffractional solution if f ∈ T and all edges of T other than fare extremal , i.e., r e ∈ { r 0 e , r 1 e } , ∀ e ∈ T ( e  = f). In f-fractional solution only r f can take intermediate value in [ r 0 f , r 1 f ] , with all other tree edges either fixed-low (i.e., r e = r 0 e ), or fixed-high ( r e = r 1 e ). To avoid excessive complication due to ties, we assume that θe ’s are distinct each other for all e ∈ E, i.e., θe  = θe  for all e  = e  in E . Then, we have the following characterization of optimality of c- MSTRA. Theorem 3. There exists an optimal solution (T  , r  ) of c-MSTRA that is f-fractional for some f ∈ E. Furthermore, tree edges other than fare either fixed-low or fixed-high depending on θe < θf or θe > θf , respectively, i.e., r  e = r 1 e , if θe > θf , r 0 e , if θe < θf . (21) Proof. Let (T  , r  ) be an optimal solution of c-MSTRA. We note that for an arbitrary pair of edges e and e  in T  with θe > θe  , either one of these is extremal, i.e., r  e = r 1 e or r  e  = r 0 e  , since otherwise by modifying these to r  e → r  e + and r  e  → r  e  −for sufficiently small > 0 , the objective value would be improved by (θe −θe  ) . Thus, if there exist more than one fractional edges, say e and e  in T  , we must have θe = θe  . In this case, let δ:= min { r 1 e −r  e , r  e  −r 0 e  } , and modify the solution to r  e → r  e + δand r  e  → r  e  −δ. By doing this, the number of fractional edges is decreased at least by one, and repeating this we will obtain an optimal solution with at most one fractional edge. If no fractional edge remains, we pick up f := arg max e ∈ T  { θe | e isfixed-low } as a degenerate fractional edge. Thus, we have an optimal f-fractional solution for some f ∈ T  . Finally, if θe > θf and r  e < r 1 e , we obtain an improved solution by changing these to r  e → r  e + and r  f → r  f −. For optimal (T  , r  ) this is impossible, and thus the former part of (21) is proved. The latter is proved analogously.  4. An exact algorithm for c-MSTRA 4.1. Initial feasible solution and an upper bound We note that c-MSTRA is feasible if and only if d-MSTRA is feasible. Indeed, any feasible solution of d-MSTRA is itself feasible to c-MSTRA. On the other hand, if (T , r) is feasible to c- MSTRA, we obtain a feasible solution of d-MSTRA by rounding off all the fractional elements to the corresponding lower bounds, i.e., r e ∈ (r 0 e , r 1 e ) ⇒ r e ← r 0 e . Then, our strategy to solve c-MSTRA starts with the optimal solution (T D , r D ) of d-MSTRA as obtained in Section 2 . This solution is feasible to c-MSTRA, but in d-MSTRA the amount of resources actually consumed in optimality is usually smaller than R . Let the residual amount of resource be R res := R − e ∈ T D D r e . (22) We note the following. Proposition 2. In (T D , r D ) , if e ∈ T D is fixed-low, i.e., r D e = r 0 e , we have 0 ≤R res < r 1 e −r 0 e . (23) Proof. From (4) , 0 ≤R res is obvious. If R res ≥r 1 e −r 0 e , we can increase the value of r e from r D e = r 0 e to r 1 e and obtain an improved solution to d-MSTRA. This violates the optimality of (T D , r D ) , and thus Proposition 2 is proved.  This means that the residual R res can be put in full to any edge e of T D if e is fixed-low, without violating the resource limit of e . This gives an improved initial feasible solution to c-MSTRA. Particularly, we pick up f := arg max e ∈ T D { θe | e isfixed-low } , and denote the solution of c-MSTRA obtained this way as (T C , r C ) with the corresponding upper bound ¯ z C := z(T C , r C ) . 4.2. Decomposition We decompose c-MSTRA into m subproblems and examine these, one by one, for better solutions. For each f ∈ E, let F f denote the set of all the f-fractional solutions of c-MSTRA, and we introduce subproblem P f : minimize z(T , r) =  e ∈ T c e (r e ) subject to (T , r) ∈ F f ,  e ∈ T r e ≤R . By Theorem 3 , an optimal solution of c-MSTRA can be obtained as a solution of one of these m subproblems, and to solve P f we introduce the following auxiliary graph G f . Definition 2. Graph G f is obtained from G by contraction of edge f , i.e., by eliminating f and identifying two incident nodes of f . Furthermore, edge e  = fis associated with the following values, (r e , c e ) = (r 1 e , c 1 e ) , if θe > θf , (r 0 e , c 0 e ) , if θe < θf . (24) We note that, due to Theorem 3 , if (T , r) is an optimal ffractional solution of P f with resource r f allocated to edge f, the non-fractional part T \ { f} needs to be an optimal solution of KCMST on graph G f with total amount of resource R −r f . We write this problem K(G f , R −r f ) , and z  K (G f , R −r f ) denotes the optimal objective value of this problem. Then, since the cost for fis c f (r f ) and the optimal objective value from G f is z  K (G f , R −r f ) , the objective value for P f is z  f (r f ) := c f (r f ) + z  K (G f , R −r f ) . (25) We also note that c f (r f ) is a linear, non-increasing function, and z  K (G f , R −r f ) is a non-decreasing step function of r f ∈ [ r 0 f , r 1 f ] as depicted in Fig. 3 , and thus P f is equivalent to finding the optimal allocation of resources between fand G f , i.e., solving the following. P  f : minimize z  f (r f ) subject to r 0 f ≤r f ≤r 1 f . 4.3. Exact algorithm We start with an incumbent solution (T  , r  ) of c-MSTRA and the corresponding upper bound ¯ z  := z(T  , r  ) of c-MSTRA. This is usually the initial feasible solution obtained earlier, and thus (T  , r  ) := (T C , r C ) and ¯ z  := ¯ z C . Now, we investigate P f one by one for all f ∈ E. First of all, if for a lower bound z K (G f , R −r 0 f ) of K(G f , R −r 0 f ) c f (r 1 f ) + z K (G f , R −r 0 f ) ≥¯ z  (26) S. Kataoka, T. Yamada / Operations Research Perspectives 3 (2016) 5–13 9 Fig. 3. Function z  f (r f ) (bold) as a sum of c f (r f ) (dotted) and z  K (G f , R −r f ) (thin). Fig. 4. Larger step-sizes in increasing r. holds, we can terminate P f , since in this case z  f (r f ) ≥¯ z  for all r f ∈ [ r 0 f , r 1 f ] , and no better solutions than the incumbent can be expected in this subproblem. If (26) is not met, we consider a general case of resource allocation (r f , R −r f ) with r f ∈ [ r 0 f , r 1 f ] allocated to the fractional edge fand the remaining R −r f to graph G f . We start with r f = r 0 f , and repeat the following process until r f > r 1 f . We solve K(G f , R −r f ) and obtain an optimal solution T  K (G f , R −r f ) and the optimal z  K (G f , R −r f ) . Correspondingly, we obtain an optimal resource allocation vector r  K (G f , R −r f ) . Note that the actual amount of resources consumed in G f is the sum of r e over T  K (G f , R −r f ) , so the residual ¯ r f := R − e ∈ T  K (G f ,R −r f ) r e (27) can be put on the fractional f. We see that r f ≤¯ r f , T  K (G f , R −r  f ) ≡T  K (G f , R −¯ r f ) and z  K (G f , R −r  f ) ≡z  K (G f , R −¯ r f ) for all r  f ∈ [ r f , ¯ r f ] , since throughout this interval T  K (G f , R −¯ r f ) remains optimal. Furthermore, the pair of fand T  K (G f , R −¯ r f ) , together with resource allocation r[ f, ¯ r f ] := ( ¯ r f , r  K (G f , R −¯ r f )) , gives an f-fractional solution of c-MSTRA. This is hereafter denoted as (T f , r[ f, ¯ r f ]) . At this stage if c f (r 1 f ) + z  K (G f , R −¯ r f ) ≥¯ z  , (28) we can terminate P f , as in (26) . On the other hand, if z  f ( ¯ r f ) < ¯ z  , (29) (T f , r[ f, ¯ r f ]) is better than the incumbent solution. Thus, we update the incumbent and the corresponding upper bound as (T  , r  ) ← (T f , r[ f, ¯ r f ]) and ¯ z  ← z  f ( ¯ r f ) . Finally, we increase r f beyond ¯ r f to move to the next interval of the step function z  K (G f , R −r f ) by putting r f ← ¯ r f + for sufficiently small > 0 , and repeat the above process all over again. However, in case of z  f ( ¯ r f ) > ¯ z  , r f can be increased more, because of the following. Let r + f := ¯ r f + (z  f ( ¯ r f ) −¯ z  ) /θf . (30) Then, we have z  f (r  f ) ≥¯ z  for all r  f ∈ [ ¯ r f , r + f ] , since z  f (r  f ) = c f (r  f ) + z  K (G f , R −r  f ) and z  K (G f , R −r  f ) is a non-decreasing function of r  f (see Fig. 4 ). Thus, r f can be increased to max { r + f , ¯ r f + } . To sum up, our algorithm is as follows. Algorithm SOLVE_MSTRA 5. Numerical experiments We have implemented the algorithms to solve both of d- and c-MSTRAs in ANSI C language to optimality, using a DELL Precision T7500 (CPU: Intel Xeon X5680(3.33 GHz) ×2, RAM: 96 GB) with RedHat Enterprise Linux v5.5 and Intel C++ compiler. 5.1. Design of experiments We prepare planar and complete graphs to represent sparsely and densely edged graphs, respectively. All computations were carried out on instances with edge data generated randomly on these graphs of various sizes. By P n,m we denote a planar graph with n nodes and m edges. For example, graph G of Fig. 2 is actually a planar P 8 , 11 . K n,n (n −1) / 2 (usually denoted as K n ) is the complete graph with n nodes and n (n −1) / 2 edges. Resource requirements at each edge are distributed uniformly random over the integer interval [1 , L ] , where L is an experimental parameter which takes either 10 2 , 10 3 or 10 4 . More precisely, for each e ∈ Ewe pick up two integers ξe and ξ e at random in [1 , L ] , 10 S. Kataoka, T. Yamada / Operations Research Perspectives 3 (2016) 5–13 Fig. 5. Correlation types of instances. Table 1 d-MSTRA experiments: UNCOR ( L = 10 3 , α= 0 . 4 ). Graph z ¯ z %fix0 %fix1 #unfix z  CPU P 100 , 260 20 138 .5 20 176 .8 76 .4 15 .0 44 .4 20 156 .5 0 .02 P 200 , 560 37 676 .5 37 711 .1 78 .2 14 .5 81 .6 37 688 .8 0 .48 P 400 , 1120 76 098 .8 76 122 .8 79 .6 15 .5 110 .1 76 105 .6 0 .93 P 600 , 1680 113 489 .5 113 505 .2 80 .4 16 .2 113 .0 113 495 .3 3 .22 P 800 , 2240 154 108 .5 154 124 .1 80 .5 16 .3 144 .6 154 113 .8 7 .86 P 10 0 0 , 280 0 190 701 .2 190 715 .1 80 .7 16 .4 162 .4 190 704 .1 12 .29 K 40 , 780 1134 .8 1145 .3 96 .7 1 .7 25 .0 1140 .6 0 .02 K 80 , 3160 1282 .8 1286 .8 98 .4 1 .0 35 .8 1284 .8 0 .17 K 120 , 7140 1339 .0 1341 .7 99 .0 0 .7 48 .0 1339 .9 0 .46 K 160 , 12 720 1373 .4 1375 .1 99 .4 0 .5 53 .8 1373 .9 1 .12 K 20 0 , 19 90 0 1368 .9 1369 .7 99 .4 0 .5 41 .4 1369 .0 4 .07 Table 2 d-MSTRA experiments: Correlation compared ( L = 10 3 , α= 0 . 4 ). Graph UNCOR WEAK STRONG Gap %unfix CPU Gap %unfix CPU Gap %unfix CPU P 100 , 260 38 .3 8 .54 0 .02 26 .6 11 .33 0 .08 234 .4 64 .69 1 .93 P 200 , 560 34 .6 7 .29 0 .48 12 .8 5 .11 0 .25 366 .6 73 .71 61 .04 P 400 , 1120 24 .0 4 .92 0 .93 18 .5 6 .71 1 .30 961 .1 87 .54 109 .47 P 600 , 1680 15 .7 3 .36 3 .22 12 .5 5 .23 5 .25 1505 .4 99 .99 1734 .38 P 800 , 2240 15 .6 3 .23 7 .86 10 .7 4 .26 4 .23 2206 .8 94 .83 1675 .32 P 10 0 0 , 280 0 13 .9 2 .90 12 .29 10 .0 3 .99 6 .50 2763 .9 100 .00 – K 40 , 780 10 .5 1 .60 0 .02 5 .7 0 .72 0 .01 1 .1 0 .38 0 .01 K 80 , 3160 4 .0 0 .57 0 .17 2 .9 0 .27 0 .08 0 .5 0 .18 2 .53 K 120 , 7140 2 .7 0 .34 0 .46 2 .9 0 .14 0 .20 0 .8 0 .25 26 .99 K 160 , 12 720 1 .7 0 .21 1 .12 1 .5 0 .09 0 .22 0 .8 0 .27 191 .80 K 20 0 , 19 90 0 0 .8 0 .10 4 .07 2 .4 0 .13 2 .25 0 .8 0 .26 1703 .53 –No instances solved within 1800 s. and put r 0 e := min { ξe , ξ e } and r 1 e := max { ξe , ξ e } . Two more integers c 0 e and c 1 e are related to r 0 e and r 1 e as follows representing uncorrelated, weakly correlated and strongly correlated cases, respectively, i.e., (a) UNCOR: For each e ∈ Ewe pick up c 0 e and c 1 e at random from [1 , L ] . (b) WEAK: We put c k e = 0 . 8 r k e +  ηk e / 5  ( k = 0 , 1 ). (c) STRONG: We put c k e = 0 . 8 r k e + 0 . 1 L +  ηk e / 100  ( k = 0 , 1 ). Here ηk e ( k = 0 , 1 ) are distributed uniformly random over [1 , L ] , independent of each other, as well as from other random variables. In all cases, c 0 e and c 1 e are rounded to the nearest integers, and if necessary these are swapped such that c 0 e ≥c 1 e is always satisfied. Fig. 5 plots (r 1 e −r 0 e , c 0 e −c 1 e ) for P 100 , 260 . We note that if tree edges are picked up randomly, expected resource requirement for a spanning tree is E{  e ∈ T r e } = L (n −1) / 2 . Thus, we set the total amount of resource at R = Lnα, where αis another parameter that takes either 0.2, 0.4 or 0.6 in our experiments. 5.2. Result of experiments: d-MSTRA Tables 1 and 2 give the results of experiment for d-MSTRA. Table 1 is the case of UNCOR with L = 10 3 and α= 0 . 4 , and Table 2 compares the effect of correlation. Here each row represents the average over 10 randomly generated instances, and the columns stand for the following. z : Lower bound by Lagrangian relaxation. ¯ z : Upper bound improved through local search. %fix0 (%fix1) : Percentage of edges fixed out (in, resp.) by peg test. #unfix (%unfix) : Number (Percentage, resp.) of edges left unfixed. z  : Optimal objective value. CPU : CPU time in seconds to obtain optimal solution. S. Kataoka, T. Yamada / Operations Research Perspectives 3 (2016) 5–13 11 Fig. 6. Objective value z  of c-MSTRA as a function of n . We were able to solve all the instances of Table 1 within a few CPU seconds. From this table we observe the following. • For the cases tested, we usually have approximate solutions with the objective value close to the lower bounds. For complete graphs optimal solution is often obtained by the heuristic methods, without calling SOLVE_KCMST, especially for large n . Findings from Table 2 include: • In UNCOR and WEAK cases, gap ( = ¯ z −z ) decreases with the size of instances. As a consequence, the peg test works effectively to fix many edges either in or out. The ratio (%unfix) of the unfixed edges to the total number of (normal and priority) edges (2 m) is less than 12%, while this is less than 2% in complete graphs. In these cases, the reduced problem is solved within a few seconds. • However, in planar graphs with STRONG correlation, gap increases rapidly with the problem size, and the peg test is less effective in such a case. 5.3. Result of experiments: c-MSTRA Tables 3–5 give the result of experiments for each correlation type with L = 10 3 and α= 0 . 4 , each row again as average over 10 randomly generated instances. The columns stand for the following. z  : Optimal objective value of c-MSTRA, # P f : Number of subproblems ( P f ’s) not terminated either by (26) or (28) at r f = r 0 f , %term : Percentage of subproblems terminated ( 100 ·(m −# P f ) /m ), #K : Total number of KCMSTs solved in solving c-MSTRA, CPU : CPU time in seconds to obtain an optimal solution of c-MSTRA, including the CPU time to solve d-MSTRA. From these tables we observe the following. • Irrespective to the size or the correlation type of instance, more than 85% of subproblems are terminated by (26) without solving KCMST. This ratio is often more than 90% in planar graphs, and more than 98% in complete graphs. In complete graphs, the number of remaining P f ’s is much smaller than in planar Table 3 c-MSTRA experiments: UNCOR ( L = 10 3 , α= 0 . 4 , R = αLn ). Graph z  # P f %term #K CPU P 100 , 260 20 140 .74 25 .3 90 .3 74 .8 2 .23 P 200 , 560 37 678 .31 37 .2 93 .4 130 .7 26 .40 P 400 , 1120 76 099 .86 46 .5 95 .8 188 .7 180 .53 P 600 , 1680 113 490 .15 63 .0 96 .3 294 .9 752 .40 P 800 , 2240 154 109 .80 73 .3 96 .7 366 .6 1929 .40 K 40 , 780 1136 .40 15 .5 98 .0 29 .7 0 .39 K 80 , 3160 1283 .95 21 .4 99 .3 38 .8 5 .84 K 120 , 7140 1339 .21 21 .1 99 .7 33 .8 27 .89 K 160 , 12 720 1373 .43 24 .7 99 .8 34 .3 99 .79 K 20 0 , 19 90 0 1368 .59 30 .0 99 .8 35 .2 304 .63 Table 4 c-MSTRA experiments: WEAK ( L = 10 3 , α= 0 . 4 ). Graph z  # P f %term #K CPU P 100 , 260 25 054 .43 27 .8 89 .3 79 .8 1 .73 P 200 , 560 45 487 .58 34 .0 93 .9 121 .0 13 .89 P 400 , 1120 91 612 .93 44 .4 96 .0 182 .8 134 .22 P 600 , 1680 137 051 .04 55 .7 96 .7 291 .2 636 .71 P 800 , 2240 183 928 .86 64 .0 97 .1 308 .6 1039 .86 K 40 , 780 2628 .55 4 .5 99 .4 7 .0 0 .12 K 80 , 3160 3696 .54 2 .1 99 .9 4 .2 2 .56 K 120 , 7140 4688 .30 2 .3 99 .9 3 .8 14 .81 K 160 , 12 720 5320 .90 1 .8 99 .9 3 .3 49 .83 K 20 0 , 19 90 0 6033 .00 1 .4 99 .9 3 .7 133 .22 Table 5 c-MSTRA experiments: STRONG ( L = 10 3 , α= 0 . 4 ). Graph z  # P f %term #K CPU P 100 , 260 28 251 .38 26 .9 94 .2 77 .2 1 .93 P 200 , 560 51 495 .78 32 .3 96 .6 114 .3 61 .04 P 400 , 1120 103 681 .39 38 .6 97 .0 182 .9 109 .47 P 600 , 1680 155 091 .17 49 .7 97 .2 298 .7 1734 .38 P 800 , 2240 208 458 .69 61 .7 99 .8 375 .9 1675 .32 K 40 , 780 4659 .00 1 .7 99 .9 3 .1 0 .11 K 80 , 3160 8821 .20 1 .2 99 .9 1 .8 2 .53 K 120 , 7140 12 991 .80 1 .2 99 .9 1 .9 26 .99 K 160 , 12 720 17 128 .10 1 .1 99 .9 1 .3 191 .80 K 20 0 , 19 90 0 21 278 .00 1 .6 99 .9 2 .3 1703 .53 graphs, as well as the number of KCMSTs solved at each instance. This is especially the case in WEAK and STRONG instances. • Both in planar and complete graphs, the objective value z  increases commensurately with n . Correlation between r e and c e has little effect on z  in planar case, while in the case of 12 S. Kataoka, T. Yamada / Operations Research Perspectives 3 (2016) 5–13 Table 6 c-MSTRA: Sensitivity analysis on L (UNCOR, α= 0 . 4 ). Graph L = 10 2 L = 10 3 L = 10 4 z  CPU z  CPU z  CPU P 100 , 260 2048 .66 0 .96 20 140 .74 2 .23 201 099 .23 2 .52 P 200 , 560 3839 .79 6 .49 37 678 .31 26 .31 376 127 .38 28 .44 P 400 , 1120 7752 .10 41 .28 76 099 .86 183 .86 759 673 .91 266 .77 P 600 , 1680 11 560 .11 177 .12 113 490 .15 767 .69 1 132 909 .67 1153 .13 P 800 , 2240 15 689 .80 387 .66 154 109 .80 1946 .32 1 538 421 .63 2989 .04 K 40 , 780 130 .97 0 .19 1136 .40 0 .40 11 189 .40 0 .47 K 80 , 3160 164 .90 3 .74 1283 .95 5 .86 12 482 .59 8 .64 K 120 , 7140 191 .08 22 .94 1339 .21 29 .33 12 842 .73 52 .11 K 160 , 12 720 215 .09 85 .49 1373 .43 104 .86 13 011 .32 181 .27 K 20 0 , 19 90 0 238 .45 2743 .46 1368 .59 292 .04 12 783 .14 1639 .51 Table 7 c-MSTRA: Sensitivity analysis on α(UNCOR, L = 10 3 , R = αLn ). Graph α= 0 . 2 α= 0 . 4 α= 0 . 6 z  CPU z  CPU z  CPU P 100 , 260 39 628 .31 1 .47 20 140 .74 2 .26 12 517 .86 0 .20 P 200 , 560 76 023 .37 22 .21 37 678 .31 26 .91 23 363 .35 1 .96 P 400 , 1120 153 959 .10 183 .90 76 099 .86 180 .88 46 975 .47 23 .13 P 600 , 1680 229 814 .34 740 .04 113 490 .15 756 .33 69 640 .77 52 .04 P 800 , 2240 309 794 .64 2784 .88 154 109 .80 1922 .89 94 517 .33 140 .81 K 40 , 780 3266 .57 0 .81 1136 .40 0 .40 646 .43 0 .07 K 80 , 3160 3727 .89 13 .58 1283 .95 6 .31 711 .02 2 .22 K 120 , 7140 4169 .93 61 .84 1339 .21 29 .56 722 .35 14 .05 K 160 , 12 720 4522 .27 199 .19 1373 .43 101 .75 735 .80 255 .68 K 20 0 , 19 90 0 4677 .59 505 .21 1368 .59 309 .51 747 .61 584 .91 complete graphs this makes the objective value increase more rapidly with n (see Fig. 6 ). • CPU time to solve c-MSTRA increases rapidly with the problem size. Usually the time to solve d-MSTRA to obtain an initial feasible solution of c-MSTRA is negligible, but in STRONG case solving KCMST becomes hard, as observed in [6] , which makes both d- and c-MSTRAs even harder to solve. Table 6 investigates the sensitivity of the range L of random integers on the optimal value z  and CPU time in UNCOR type instances with αfixed at 0.4. Objective value increases commensurately with L , and the increase of CPU time is mostly attributed to the increase of the search space of z  . Next, Table 7 gives the result of sensitivity analysis on the capacity parameter α, with UNCOR type and L = 10 3 fixed. Here the objective value naturally decreases with increasing α. The case of α= 0 . 2 appears to take longer CPU time than the cases of α≥0 . 4 . 6. Conclusion In this article, we formulated the minimum spanning tree problem with resource allocation (d- and c-MSTRAs), and gave algorithms to solve these problems to optimality. We proved these to be N P -hard. We showed that d-MSTRA can be reformulated as a KCMST, which can be solved by the branch-and-bound algorithm we presented previously [6] . Here, we gave a peg test to reduce the problem size of d-MSTRA, often significantly. Using this solution as an initial feasible solution to c-MSTRA, we also gave a solution algorithm for c-MSTRA. This is based on the concept of f-fractional solution. We proved that an optimal solution of c-MSTRA can be found within this class of solutions. Then, the problem was decomposed into a series of subproblems, and we gave an algorithm to examine these subproblems by solving KCMSTs for better f-fractional solutions. In actual computation, many subproblems were eliminated without solving KCMST at all. We implemented these algorithms in ANSI C language and conducted numerical tests to evaluate the performance of these algorithms on various types of instances. Our algorithm solved instances of considerable size defined on planar as well as on complete graphs exactly. However, to solve larger instances with strong correlation between resource and cost data, more efficient algorithm is required to solve KCMST, since this plays a key role in the algorithm of Section 4 . Appendix. Knapsack constrained minimum spanning tree Let G = (V, E) be a connected undirected graph with each edge e ∈ Eassociated with two numbers, cost c e and weight w e , and given W > 0 we consider the following knapsack constrained minimum spanning tree problem . KCMST : minimize z(T ) :=  e ∈ T c e (A.1) subject to  e ∈ T w e ≤W , (A.2) T ∈ T . (A.3) The maximization version of this problem, as discussed in [6] , is equivalent to this problem, since for an arbitrary real Mand for any spanning tree T of G we have  e ∈ T (M −c e ) = (n −1) M −  e ∈ T c e . In this Appendix, [6] is briefly outlined for readers’ convenience. A.1. Lagrangian relaxation For a fixed λ≥0 , the Lagrangian relaxation problem LR (λ) : minimize  e ∈ T (c e + λw e ) −λW subject to T ∈ T is simply the minimum spanning tree (MST) problem, which is easily solved [1,2] . Let z (λ) denote the optimal objective value to this