IFAC Conference on Manufacturing Modelling, IFAC Manufacturing Management and on Control IFAC Conference Conference on Manufacturing Modelling, Modelling, IFAC Conference on Manufacturing Modelling, Management and Control June 28-30, 2016. Troyes, France Management and Control Available online at www.sciencedirect.com Management and Control France June June 28-30, 28-30, 2016. 2016. Troyes, Troyes, France June 28-30, 2016. Troyes, France
ScienceDirect
IFAC-PapersOnLine 49-12 (2016) 651–655
Linear time algorithm for Precedence Constrained Linear time algorithm for Precedence Constrained Linear time algorithm for Precedence Constrained Linear time algorithm for Precedence Constrained Asymmetric Generalized Traveling Salesman Asymmetric Generalized Traveling Salesman Asymmetric Generalized Traveling Asymmetric Generalized Traveling Salesman Salesman Problem Problem Problem Problem Alexander Chentsov ∗∗ Michael Khachay ∗∗ Daniel Khachay ∗∗ Alexander Chentsov ∗∗ Michael Khachay ∗∗ Daniel Khachay ∗∗ Alexander Alexander Chentsov Chentsov Michael Michael Khachay Khachay Daniel Daniel Khachay Khachay ∗ Krasovsky Institute of Mathematics and Mechanics, 16 S.Kovalevskoy str., ∗ ∗ Krasovsky Institute of Mathematics 16 S.Kovalevskoy Institute of and Mechanics, 16 S.Kovalevskoy str., ∗ Krasovsky Ural Federal University, 19 Mira and str.;Mechanics, Ekaterinburg Russia str., Krasovsky Institute of Mathematics Mathematics and Mechanics, 16620990, S.Kovalevskoy str., Ural Federal University, 19 Mira str.; Ekaterinburg 620990, Russia Ural Federal University, 19 Mira str.; Ekaterinburg 620990, Russia (e-mail:
[email protected],
[email protected], Ural(e-mail: Federal
[email protected], University, 19 Mira str.;
[email protected], Ekaterinburg 620990, Russia (e-mail:
[email protected],
[email protected]) (e-mail:
[email protected],
[email protected],
[email protected],
[email protected])
[email protected])
[email protected])
Abstract: We consider the combinatorial optimization problem of visiting clusters of a fixed number Abstract: We consider combinatorial optimization of visiting of a fixed number Abstract: We the combinatorial optimization problem of clusters of fixed number of nodes (cities), where, the on the set of clusters should be problem visited according to clusters some kind partial order Abstract: We consider consider the combinatorial optimization problem of visiting visiting clusters of aaof fixed number of nodes (cities), where, on the set of clusters should be visited according to some kind of partial order of nodes (cities), where, on the set of clusters should be visited according to some kind of partial order defined by additional precedence constraints. This problem is a kind of the Asymmetric Generalized of nodesby (cities), where, on the setconstraints. of clusters should be visited according to some kind of partial order defined additional precedence This problem is a kind of the Asymmetric Generalized defined by additional precedence constraints. This problem is a kind of the Asymmetric Generalized Traveling Salesman Problem (AGTSP). To find an optimal solution of the problem, we propose a defined by additional precedence constraints. This problem is a kind of the Asymmetric Generalized Traveling Salesman Problem (AGTSP). find an optimal solution of the problem, we propose Traveling Salesman Problem (AGTSP). To find an optimal solution of the problem, we propose dynamic programming based on algorithmTo extending the well known Held and Karp technique. In termsaaa Traveling Salesman Problem (AGTSP). To find an optimal solution of the problem, we propose dynamic based on algorithm extending the well known and Karpwith technique. In terms dynamic programming based algorithm extending the well Held and technique. In of specialprogramming type of precedence constraints, describe of Held the problem, polynomial (or dynamic programming based on on algorithm we extending thesubclasses well known known Held and Karp Karpwith technique. In terms terms of special type of precedence constraints, we describe subclasses of the problem, polynomial (or of special type of precedence constraints, we describe subclasses of the problem, with polynomial even linear) in n upper bounds of time complexity. of special type ofupper precedence constraints, we describe subclasses of the problem, with polynomial (or (or even linear) in n bounds of time complexity. even linear) in n upper bounds of time complexity. even linear) in n upper bounds of time complexity. © 2016, IFAC (International Federation of Automatic Control) Hosting by Elsevier Ltd. All rights reserved. Keywords: Asymmetric Generalized Traveling Salesman Problem (AGTSP), NP-hard problem, Keywords: Asymmetric Generalized Traveling Salesman Problem (AGTSP), NP-hard problem, Keywords: Asymmetric dynamic programming Keywords: Asymmetric Generalized Generalized Traveling Traveling Salesman Salesman Problem Problem (AGTSP), (AGTSP), NP-hard NP-hard problem, problem, dynamic programming dynamic dynamic programming programming 1. INTRODUCTION AND RELATED WORK On the other hand, for the classic TSP, there are many well1. INTRODUCTION AND RELATED WORK On hand, the TSP, there are 1. INTRODUCTION AND RELATED WORK On the the other other hand, for for time the classic classic TSP, there cases are many many welldescribed polynomial solvable special (seewelle.g. 1. INTRODUCTION AND RELATED WORK On the other hand, for the classic TSP, there are many welldescribed polynomial time solvable special cases (see e.g. described polynomial time solvable special cases (see e.g. (Deineko et al., 2014)). Investigating the similar cases of GTSP described polynomial time solvablethespecial cases (see e.g. (Deineko et al., 2014)). Investigating similar cases of GTSP (Deineko et al., 2014)). Investigating the similar cases of GTSP seems to be also2014)). very perspective. However, to the best of our (Deineko et al., Investigating the similar cases of GTSP seems also perspective. However, to best of our The generalized traveling salesman problem (GTSP) extends knowledge, seems to to be be there also very very perspective. However, to the the best in of this our are no publications presenting results seems to be also very perspective. However, to the best of our The generalized traveling salesman problem (GTSP) extends knowledge, there are no publications presenting results in this The generalized traveling salesman problem (GTSP) extends the well-known traveling salesman problem (TSP), where the field. knowledge, there are no publications presenting results in this In this paper, we try to bridge such a gap. Basically, our The generalized traveling salesman problem (GTSP) extends knowledge, there are no publications presenting results in this the well-known traveling problem (TSP), the field. this we to such aa gap. our the of well-known traveling salesman salesman problem (TSP), where the results set cities is partitioned into disjoint clusters, and where the salesfield. In Incan thisbepaper, paper, we try try as to abridge bridge such gap. Basically, Basically, our considered simple extension of the results the well-known traveling salesman problem (TSP), where the field. In this paper, we try to bridge such a gap. Basically, our set of cities is partitioned into disjoint clusters, and the salesresults can be considered as a simple extension of the results set of cities is partitioned into disjoint clusters, and the salesman has to visit every cluster exactly once. The problem has results can be considered as a simple extension of the results obtained in (Balas, 1999) for the classic TSP. set of cities is partitioned into disjoint clusters, and the salesresults can be considered as a simple extension of the results man visit once. problem has man has has to toapplications, visit every every cluster cluster exactly once. The The problem has obtained numerous e.g. in exactly carrier-vehicle routing (Garone obtained in in (Balas, (Balas, 1999) 1999) for for the the classic classic TSP. TSP. man has to visit every cluster exactly once. The problem has obtained in (Balas, 1999) for the classic numerous applications, e.g. in carrier-vehicle routing (Garone We consider the most general case of theTSP. GTSP. In this setting, numerous applications, e.g. in carrier-vehicle routing (Garone et al., 2014) and Nuclear Power Plant dismantling (Chentsov numerous applications, e.g. in carrier-vehicle routing (Garone We consider the most general case of the In setting, et al., 2014) and Nuclear Power Plant dismantling (Chentsov We consider consider the most general caseu of ofand thev,GTSP. GTSP. In this thiscosts setting, for any pair the of most incident nodes traveling for et al., 2014) and Nuclear Power Plant dismantling (Chentsov and Chentsov, 2001). We general case the GTSP. In this setting, et al., 2014) and Nuclear Power Plant dismantling (Chentsov for any pair of incident nodes u and v, traveling costs for and Chentsov, 2001). for any pair of incident nodes u and v, traveling costs the forward and backward transitions are not supposed to for be and Chentsov, 2001). for any pair of incident nodes u and v, traveling costs for and Chentsov, 2001). the forward and backward transitions are not supposed to be There are multiple approaches to finding of optimal and subop- the forward and backward transitions are not supposed to be same. To emphasize this asymmetry, we call this setting the forward and backwardthis transitions are we not call supposed to be There are multiple approaches to finding of optimal and subopthe same. To emphasize asymmetry, this setting There are multiple approaches to finding of optimal and suboptimal solutions of this problem. First approach is to reduce the same. To emphasize this asymmetry, we call this setting the Asymmetric Generalised Traveling Salesman Problem (or There are multiple approaches to finding of optimal and subopthe Asymmetric same. To emphasize this Traveling asymmetry, we callProblem this setting timal of is reduce the timal solutions solutions of this thisofproblem. problem. First approach is to toinstance reduce the the considered instance GTSP toFirst someapproach appropriate of AGTSP). the Asymmetric Asymmetric Generalised Generalised Traveling Traveling Salesman Salesman Problem Problem (or (or timal solutions of this problem. First approach is to reduce the the Generalised Salesman (or considered instance of GTSP to some appropriate instance of AGTSP). considered instance of GTSP to some appropriate instance of regular Traveling Salesman Problem (TSP). According to (LaAGTSP). considered instance of GTSP to some appropriate instance of AGTSP). regular Problem According (Laconstraints appear to be a regular component of regular Traveling Salesman Problem (TSP). (TSP). reduction Accordingofto toGTSP (La- Precedence porte et Traveling al., 1987),Salesman there is a cost-preserving regular Traveling Salesman Problem (TSP). According to (LaPrecedence constraints appear to be component of porte et al., 1987), there is a cost-preserving reduction of GTSP Precedence constraintsinduced appearby to real-life be aaa regular regular component of the AGTSP instances applications. These porte et al., 1987), there is a cost-preserving reduction of GTSP to asymmetric TSP, i.e. for the initial problem, the researchers Precedence constraints appear to be regular component of porte et al., 1987), there is a cost-preserving reduction of GTSP the AGTSP instances induced by real-life applications. These to asymmetric TSP, i.e. for the initial problem, the researchers the AGTSP instances induced by real-life applications. These constraints define an order for the clusters to visit and can to asymmetric asymmetric TSP, i.e. i.e. for the initial initialand problem, the researchers can use the diversity of for algorithms solversthe developed for the AGTSP define instances induced bythe real-life applications. These to TSP, the problem, researchers constraints to and can use diversity of and for constraints define an an order order for the clusters clusters to visit visit and can can easily supplemented by a for natural interpretation in terms of can classic use the theTSP diversity of algorithms algorithms and solvers solvers developed for be the (Helsgaun, 2015; Karapetyan anddeveloped Gutin, 2011). constraints define an order for the clusters to visit and can can use the diversity of algorithms and solvers developed for be easily supplemented by aa natural interpretation in terms of the classic TSP (Helsgaun, 2015; Karapetyan and Gutin, 2011). be easily supplemented by natural interpretation in terms of object domain. the classic TSP (Helsgaun, 2015; Karapetyan and Gutin, 2011). Unfortunately, the resulting TSP has a very general structure, be easily supplemented by a natural interpretation in terms of the classic TSP the (Helsgaun, 2015; Karapetyan and Gutin, 2011). object domain. Unfortunately, resulting TSP has a very general structure, object domain. Unfortunately, the resulting TSP has aa very very general general structure, it is not even a the metric one, so, to approximate this problem we For object domain.in the problem of high-precision laser cutting Unfortunately, resulting TSP has structure, example, it is not even aaefficient metric one, so, to approximate this problem we For example, in cutting it is not even metric one, so, to approximate this problem we could not use algorithms like famous Christofides 3/2For example, in the the problem oftohigh-precision high-precision laser cutting it is not even aefficient metric algorithms one, so, to approximate this problem3/2we of metal sheet, it isproblem requiredof cut off metallaser pieces of a could like Christofides Foraa example, in the problem of high-precision laser cutting of metal sheet, it is required to cut off metal pieces of could not not use use efficient efficient algorithms like famous famous Christofides 3/2- complicated approximation algorithm (Christofides, 1975), Arora’s PTAS of a metal sheet, it is required to cut off metal pieces of aaa could not use algorithms like famous Christofides 3/2shape. In corresponding AGTSP instance, each approximation algorithm (Christofides, 1975), Arora’s PTAS of a metal sheet, it is required to cut off metal pieces of complicated shape. In corresponding AGTSP instance, each approximation algorithm (Christofides, 1975), Arora’s PTAS (Arora, 1998) for the Euclidean TSP or even PTAS for Eucomplicated shape. In In corresponding AGTSP instance,where each approximation algorithm (Christofides,or1975), Arora’sforPTAS shape is represented by corresponding a finite cluster AGTSP of pierce-points (Arora, 1998) the Euclidean PTAS complicated shape. instance, each shape is represented by aa finite cluster of pierce-points where (Arora, multiple 1998) for for the Euclidean TSP or even evenand PTAS for EuEu- cutting clidean salesman problemsTSP (Khachay Neznakhina, shape is represented by finite cluster of pierce-points where (Arora, 1998) for the Euclidean TSP or even PTAS for Euprocess can be suspended or resumed. As it is shown clidean multiple salesman problems (Khachay shape isprocess represented bysuspended a finite cluster of pierce-points where cutting can or it shown clideanKhachai multipleand salesman problems (Khachay and and Neznakhina, Neznakhina, at 2015; Neznakhina, 2015). cutting process can be becan suspended or resumed. resumed. As it is is so, shown clidean multiple salesman problems (Khachay and Neznakhina, Fig. 1, the shapes be embedded to eachAs other, the 2015; Khachai and Neznakhina, 2015). cutting process can be suspended or resumed. As it is shown at Fig. 1, the shapes can be embedded to each other, so, 2015; Khachai and Neznakhina, 2015). at Fig. Fig. 1, the the shapes can be becut embedded toorder eachinduces other, natural so, the the 2015; Khachai and Neznakhina, 2015). inner objects should first. Thisto Another approach is of adopting some kind of evolutionary most at 1, shapes can be embedded each other, so, the most inner objects should be cut first. This order induces natural Another approach is of adopting some kind of evolutionary most inner objects should be cut first. This order induces natural precedence constraints on a given set of clusters (Fig. 2). Another approach approach isalgorithms of adopting adopting some kind kind of 2010; evolutionary techniques: geneticis (Bontoux et al., Gutin most inner objects should be cut first. Thisclusters order induces natural Another of some of evolutionary precedence techniques: genetic algorithms (Bontoux et Gutin precedence constraints constraints on on aaa given given set set of of clusters clusters (Fig. (Fig. 2). 2). techniques: genetic algorithms (Bontoux et al., al., 2010; Gutin The and Karapetyan, 2010), ant colony (Jun-man and2010; Yi, 2012), precedence constraints on given set of (Fig. 2). techniques: genetic algorithms (Bontoux et al., 2010; Gutin rest of the paper is organized as follows. In Section 2, we and Karapetyan, ant (Jun-man and Yi, The rest of the paper is organized as follows. In Section 2, and According Karapetyan,to2010), 2010), ant colony colony (Jun-man andevaluations, Yi, 2012), 2012), provide etc. published results of numerical The rest of the paper is organized as follows. In Section 2, we we and Karapetyan, 2010), ant colony (Jun-man and Yi, 2012), a mathematical statement of the considered Asymmetetc. According to published results of numerical evaluations, The restaofmathematical the paper is statement organized of as the follows. In Section 2, we provide considered Asymmetetc. According to published results of numerical evaluations, in some cases, this approach yields good approximate solutions provide a mathematical statement of the considered Asymmetetc. According to published results of numerical evaluations, ric Generalized Traveling Salesman Problem. Further, in Secin yields solutions provide a mathematical statement of Problem. the considered Asymmetric Salesman Further, in in some some cases, cases, this approach yields good good approximate solutions efficiently. Butthis the approach main shortcoming ofapproximate this approach is lack tion ric Generalized Generalized Traveling Salesman Problem. Further, in SecSecin some cases, this approach yields good approximate solutions 3, we recall Traveling the famous Held-Karp dynamic programming efficiently. But the main shortcoming of this approach is lack ric Generalized Traveling Salesman Problem. Further, in Section 3, we recall the famous Held-Karp dynamic programming efficiently. But the main shortcoming of this approach is lack of theoretical support, since all these ofheuristics have no ap- procedure tion 3, we recall the famous Held-Karp dynamic programming efficiently. But the main shortcoming this approach is lack used for finding the exact solution of the problem in of support, all have no aption 3, we used recallfor thefinding famousthe Held-Karp dynamic programming procedure exact solution of the problem in of theoretical theoreticalguarantees support, since since all these these heuristics heuristics have of notime ap- question. proximation and theoretical upper bounds procedure used for finding the exact solution of the problem in of theoretical support, since all these heuristics have no apThe main point here is that traveling and city visiting proximation guarantees and theoretical upper bounds of time procedure usedmain for finding the is exact solution ofand thecity problem in question. The point here that traveling visiting proximation guarantees and theoretical upper bounds of time complexity. question. The main point here is that traveling and city visiting proximation guarantees and theoretical upper bounds of time complexity. question. The main point here is that traveling and city visiting complexity. complexity.
Copyright © 2016, 2016 IFAC 651 Hosting by Elsevier Ltd. All rights reserved. 2405-8963 © IFAC (International Federation of Automatic Control) Copyright © 2016 IFAC 651 Copyright ©under 2016 responsibility IFAC 651Control. Peer review of International Federation of Automatic Copyright © 2016 IFAC 651 10.1016/j.ifacol.2016.07.767
IFAC MIM 2016 652 June 28-30, 2016. Troyes, France
Alexander Chentsov et al. / IFAC-PapersOnLine 49-12 (2016) 651–655
defining the visiting order for the clusters and the finite sequence gπ(1)τ(1) , . . . , gπ(n)τ(n) (also known as g-tour), such that n−1 c(x ˆ 0 , gπ(1)τ(1) ) + ∑ c (gπ(i)τ(i) ) + c(gπ(i)τ(i) , gπ(i+1)τ(i+1) ) i=1
+ c(g ˇ π(n)τ(n) , x0 ) → min
(1)
Fig. 1. Shape cutting problem
Fig. 3. An instance of the AGTSP for n = 6. The main differences between the problem studied in this paper and the standard setting of the AGTSP are as follows: Fig. 2. Order of cutting produces precedence constraints costs in our case depend on partial subtours and DP procedure can successfully overcome this issue. In Section 4 we show that this procedure can be easily reformulated in terms of finding the cheapest s-t-paths in corresponding weighted acyclic digraph (also known as digraph of states). Our subsequent results presented in Section 5 are based on this representation of the dynamic programming procedure. Finally, in Section 6 we present simple example confirming the applicability of the precedence constraints considered. 2. PROBLEM STATEMENT We consider the extended setting of the Asymmetric Generalized Traveling Salesman Problem (AGTSP) (Fig. 3). Input: finite disjunctive sets (clusters) M1 , . . . , Mn of nodes to be visited and a dedicated start point x0 ∈ ∪Mi . Without loss of generality, we assume that all clusters have the same number p ≥ 1 of nodes: M j = {g j1 , . . . , g j p }. ˇ jτ , x0 ) for moves from the Transition costs c(x ˆ 0 , g jτ ) and c(g point x0 to any g jτ (and vice versa) are given along with costs c(glσ , g jτ ) for any j, l ∈ Nn = {1, . . . , n}, j = l and σ , τ ∈ N p . For any cluster, the visiting cost c (g jτ ) (which can be interpreted as expenses of inner job) is given as well. As usual, the problem is to find the cheapest tour starting and finishing in the point x0 and visiting every cluster once. Actually, it is required to find a permutation π : Nn → Nn 652
(i) for any nodes glσ and g jτ , the transition cost c(glσ , g jτ ) and the cluster visiting cost c (g jτ ) depend on the chosen sub-tour connecting x0 and the node glσ ; (ii) on the set of clusters, there is defined one of two types of additional Balas precedence constraints (like proposed in (Balas, 1999) for the regular TSP): Type I. For a natural number k ≤ n, any feasible permutation π satisfies the equation ∀i, j ∈ Nn ( j ≥ i + k) ⇒ (π(i) < π( j)). (2) Type II. For any natural values 1 ≤ k(1), . . . , k(n) ≤ n and any feasible permutation π, (3) ∀i, j ∈ Nn ( j ≥ i + k(i)) ⇒ (π(i) < π( j)).
Actually, it can be seen that constraint (2) can be obtained from (3), where k(i) = k for some fixed value k. 3. DYNAMIC PROGRAMMING
We start with the description of the proposed dynamic programming method, which goes back to fundamental results by Bellman (Bellman, 1962) and Held & Karp (Held and Karp, 1961). Suppose, the optimal g-tour sourcing from x0 and visiting for the first i − 1 turns the clusters with indexes from J ⊂ Nn , in the i-th turn, visits the cluster M j at the node g jτ(i) ∈ M j . Denote the cost of this i-turns g-subtour by C(J, i, j, g jτ(i) ). Then, the following recursive equations hold ˆ 0 , g jτ(1) ), (4) C(∅, 1, j, g jτ(1) ) = c(x
IFAC MIM 2016 June 28-30, 2016. Troyes, France
C(J, i, j, g jτ(i) ) = min
Alexander Chentsov et al. / IFAC-PapersOnLine 49-12 (2016) 651–655
C(J \ {l}, i − 1, l, glτ(i−1) ) +c(glτ(i−1) , g jτ(i) ) + c (g jτ(i) ) . (5) min
l∈J glτ(i−1) ∈Ml
Further, the optimum of the given instance (1) of AGTSP can be found by the formula C∗ = min (C(Nn \ { j}, n, j, g jτ(n) ) + c(g ˇ jτ(n) , x0 )). (6) j∈Nn
Finally, an optimal g-tour can be easily obtained by backward search procedure. 4. GRAPH REPRESENTATION The recursive procedure (4)-(6) can be represented equivalently in terms of graph theory. Indeed, assign to the instance of problem (1) the corresponding instance of the cheapest s-tpath problem in the appropriate (n + 2)-layered edge-weighted digraph G∗ [p] = (V ∗ [p], A∗ [p], w∗ [p]), whose vertexes are states of the dynamic programming scheme. Denote by Vi∗ [p] the vertex-set of the i-th layer, which is defined by ∗ V0∗ [p] = {s},Vn+1 [p] = {t}, where Vi∗ [p] = {(J, i, j, τ) : j ∈ Nn \ J, g jτ ∈ M j , J ⊂ Nn , |J| = i − 1}
(i ∈ Nn ).
(7)
The vertexes s and t are assigned to the starting point x0 ; any vertex (state) (J, i, j, τ) corresponds to i-turns subtour of the gtour visiting clusters with indexes J ∪ { j}, wherein the latter visited cluster is M j (at the node g jτ ). In the graph G∗ [p], only ∗ [p] can be adjacent. vertexes of subsequent layers Vi∗ [p] and Vi+1 Moreover, s is adjacent to any vertex from V1∗ [p]; any vertex from Vn∗ [p] is adjacent to t. Any other states (J, i, l, σ ) and (J , i + 1, j, τ) are adjacent if |J| = i − 1, J = J ∪ {l}, j ∈ J , σ , τ ∈ N p . (8) ∗ [p] by We denote the set of arcs connecting Vi∗ [p] with Vi+1 A∗i,i+1 [p]. Their weights are defined by the following equations w∗ [p](s, (∅, 1, j, τ)) = c(x ˆ 0 , g jτ ), w∗ [p]((Nn \ { j}, n, j, τ),t) = c(g ˇ jτ , x0 ), w∗ [p]((J, i, l, σ ), (J , i + 1, j, τ)) = c(glσ , g jτ ) + c (g jτ ). It is easy to show that the set of feasible g-tours in (1) is isomorphic to the set of s-t-paths in the graph G∗ [p]. Moreover, any corresponding g-tour and s-t-path have the same costs (weights). Therefore, the cheapest g-tour can be found in O(|A∗ |) by the well known modification of the Ford-Bellman algorithm for circuit-free weighted digraph (see, e.g. (Cormen et al., 2009)). Unfortunately, for the general case of AGTSP, the number of arcs in the graph G∗ [p] is growing exponentially as n → ∞, which implies exponential time complexity of the proposed scheme of dynamic programming. Indeed, for any n ≥ 2 |V ∗ [p]| > |V2∗ [p] ∪ . . . ∪Vn∗ [p]| ≥ pn2n−2 . Moreover, an indegree of any vertex (J, m, j, τ) ∈ Vm∗ [p] for m ≥ 2
653
satisfies the equation deg− (J, m, j, τ) = (m − 1)p ≥ p. Hence, |A∗ [p]| = Ω(np2 2n ).
Nevertheless, taking into account the additional constraints on the set of clusters, e.g. of precedence type (Steiner, 1990), we can drastically decrease the overall time complexity of our optimization procedure. In the following Section 5, we discuss the precedence constraints of Type I and Type II, for which the scheme (4)-(6) has linear (in n) time complexity (for any fixed k and p). 5. COMPLEXITY BOUNDS We proceed with description of the graphs G∗ [p] corresponding to two special cases of AGTSP precedence constraints of Type I and Type II mentioned above.
First, we show that structure of the G∗ [p] in general case is completely defined by the structure of the graph G∗ [1]. Lemma 1. For any p > 1, Vi∗ [p] = Vi∗ [1] × N p (i ∈ Nn ) (9) ∗ ∗ ∗ ∗ A0,1 [p] = A0,1 [1] × N p , An,n+1 [p] = An,n+1 [1] × N p (10) A∗i,i+1 [p] = A∗i,i+1 [1] × N2p
(i ∈ Nn−1 )
(11)
Indeed, given by an arbitrary p > 1 define the mapping Γ : V ∗ [p] → V ∗ [1] by the equations Γ(s) = s, Γ(t) = t, Γ((J, i, j, τ)) = (J, i, j). Since, for any p, incidence between vertexes of the graph G∗ [p] is defined by equation (8), the mapping Γ is a homomorphism. Moreover, vertices (J, i, l, σ ) and (J ∪ {l}, i + 1, j, τ) are incident in the graph G∗ [p] if and only if the vertices (J, i, l) and (J ∪ {l}, i + 1, j) are incident in G∗ [1] as well. By construction, Γ−1 ((J, i, j)) = {(J, i, j, 1), . . . , (J, i, j, p)}, from which validity of equations (9)–(11) follows. Corollary 2. For any p > 1, |A∗ [p]| ≤ |A∗ [1]|p2 . In (Balas, 1999), the structure of graphs G∗ [1] defining dynamic procedure for the regular TSP with additional precedence constraints (2) and (3) was described. We summarize these results in Theorem 3. Theorem 3. 1. In the case of precedence constraints (2), |A∗ [1]| = O(n · k2 2k−2 ). 2. In the case of constraints (3) n
|A∗ [1]| = O( ∑ k∗ (i)(k∗ (i) + 1)2k
∗ (i)−2
)
i=1
for
k∗ (i) = max{k( j) : i − k( j) + 1 ≤ j ≤ i}.
Our main complexity results follow from Lemma 1 and Theorem 3. 653
IFAC MIM 2016 654 June 28-30, 2016. Troyes, France
Alexander Chentsov et al. / IFAC-PapersOnLine 49-12 (2016) 651–655
Theorem 4. Let for the instance of AGTSP precedence constraint (2) be valid. Then, dynamic programming scheme (4)(6) obtains an optimal solution (for this instance) in time of (12) O(n · p2 k2 2k−2 ). Theorem 5. If any instance of AGTSP satisfies precedence constraint (3), then running time of scheme (4)-(6) is n
O(p2 ∑ k∗ (i)(k∗ (i) + 1)2
k∗ (i)−2
).
(13)
i=1
Theorem 4 and Theorem 5 claim that, in the case of additional precedence constraints (2) or (3), AGTSP can be solved to optimality efficiently. Indeed, it is seen that upper bound (12) (the case of bound (13) can be considered by analogy) is linear in n for any fixed k and p and remains polynomial for p = O(poly(n)) and k = O(log(n)). Therefore, dynamic programming procedure in both cases can find an optimal solution in time depending linearly on number of clusters n. 6. INDUSTRIAL EXAMPLE We would like to discuss the applicability of use the precedence constraints. At glimpse, constraints (2)-(3) seem to be excessively restrictive. Nevertheless, even the more strict constraint (2) covers all of complexity cases of AGTSP as k varies from 1 to n. Indeed, if k = 1, the only feasible permutation is identical. On the other hand, when k tends to n, almost all permutations are feasible.
to another can be done only through dedicated elevators and any transition costs much more, than any moves around the floor. Formulating such a model mathematically, we obtain the following precedence constraints. Actually, for the apartment Mi , we define q1 + 1 − i, if 1 ≤ i ≤ q1 , q + q 2 + 1 − i, if q1 + 1 ≤ i ≤ q1 + q2 , 1 k(i) = ... m−1 m−1 m−2 ∑ ql + 1 − i, if ∑ ql + 1 ≤ i ≤ ∑ ql . l=1
l=1
l=1
Basically, these constraints mean that building should be rescued either bottom up or vice versa. Thus, for this application, precedence constraints like (3) appear to be quite natural. CONCLUSION We propose dynamic programming procedure for finding an optimal solution for AGTSP. For two types of precedence constraints, we show that this procedure is efficient. Actually, its time complexity is linear in n for any fixed k and p, and remains polynomial for k = O(log n) and p = O(poly(n)). ACKNOWLEDGEMENTS This research was supported by the Russian Science Foundation, grant No. 14-11-00109. REFERENCES
Fig. 4. Illustration of fire rescue mission plan for m = 3, q1 = 4, q2 = 2, and q3 = 3 To illustrate the methodology proposed, consider the following industrial application. This application is conserned with planning of a fire rescue mission for a skyscaper building. The skyscaper consists of m floors. Each t-th floor is a set of qt apartments Mi having several doors to enter (see Fig. 4). The rescue squad can start its mission from any floor, to which it can be delivered for the vanishing cost. When all survivors are found and secured, the squad can be evacuated also from any floor. The main restriction is that moving from one floor 654
Arora, S. (1998). Polynomial time approximation schemes for euclidean traveling salesman and other geometric problems. Journal of the ACM, 45. Balas, E. (1999). New classes of efficiently solvable generalized traveling salesman problems. Annals of Operations Research, 86(0), 529–558. Bellman, R. (1962). Dynamic programming treatment of the travelling salesman problem. J. ACM, 9(1), 61–63. Bontoux, B., Artigues, C., and Feillet, D. (2010). A memetic algorithm with a large neighborhood crossover operator for the generalized traveling salesman problem. Computers & Operations Research, 37(11), 1844 – 1852. Chentsov, A. and Chentsov, A. (2001). Dynamic programming method in the generalized traveling salesman problem: The influence of inexact calculations. Mathematical and Computer Modelling, 33(8–9), 801 – 819. Christofides, N. (1975). Worst-case analysis of a new heuristic for the traveling salesman problem. In Symposium on New Directions and Recent Results in Algorithms and Complexity, 441. Cormen, T.H., Leiserson, C.E., Rivest, R.L., and Stein, C. (2009). Introduction to Algorithms. MIT, 3 edition. Deineko, V.G., Klinz, B., Tiskin, A., and Woeginger, G.J. (2014). Four-point conditions for the TSP: The complete complexity classification. Discrete Optimization, 14, 147– 159. doi:10.1016/j.disopt.2014.09.003. Garone, E., Determe, J.F., and Naldi, R. (2014). Generalized traveling salesman problem for carrier-vehicle systems. Journal of Guidance Control and Dynamics, 37, 766–774. Gutin, G. and Karapetyan, D. (2010). A memetic algorithm for the generalized traveling salesman problem. 9(1), 47–60.
IFAC MIM 2016 June 28-30, 2016. Troyes, France
Alexander Chentsov et al. / IFAC-PapersOnLine 49-12 (2016) 651–655
Held, M. and Karp, R.M. (1961). A dynamic programming approach to sequencing problems. In Proceedings of the 1961 16th ACM National Meeting, ACM ’61, 71.201–71.204. ACM, New York, NY, USA. Helsgaun, K. (2015). Solving the equality generalized traveling salesman problem using the Lin–Kernighan–Helsgaun algorithm. Mathematical Programming Computation, 1–19. Jun-man, K. and Yi, Z. (2012). Application of an improved ant colony optimization on generalized traveling salesman problem. Energy Procedia, 17, Part A(0), 319 – 325. Karapetyan, D. and Gutin, G. (2011). Lin–Kernighan heuristic adaptations for the generalized traveling salesman problem. European Journal of Operational Research, 208(3), 221 – 232. Khachai, M. and Neznakhina, E. (2015). A polynomialtime approximation scheme for the euclidean problem
655
655
on a cycle cover of a graph. Proceedings of the Steklov Institute of Mathematics, 289(1), 111–125. doi: 10.1134/S0081543815050107. Khachay, M. and Neznakhina, K. (2015). Approximability of the minimum-weight k-size cycle cover problem. Journal of Global Optimization. doi:10.1007/s10898-015-0391-3. URL http://dx.doi.org/10.1007/s10898-015-0391-3. Laporte, G., Mercure, H., and Nobert, Y. (1987). Generalized travelling salesman problem through n sets of nodes: the asymmetrical case. Discrete Applied Mathematics, 18(2), 185 – 197. Steiner, G. (1990). On the complexity of dynamic programming for sequencing problems with precedence constraints. Annals of Operations Research, 26(1), 103–123.