52
Approximation algorithms for the general and the asymmetric Stacker-Crane problems Citation for published version (APA): Righini, G., & Trubian, M. (1994). Approximation algorithms for the general and the asymmetric Stacker-Crane problems. (Memorandum COSOR; Vol. 9420). Technische Universiteit Eindhoven. Document status and date: Published: 01/01/1994 Document Version: Publisher’s PDF, also known as Version of Record (includes final page, issue and volume numbers) Please check the document version of this publication: • A submitted manuscript is the version of the article upon submission and before peer-review. There can be important differences between the submitted version and the official published version of record. People interested in the research are advised to contact the author for the final version of the publication, or visit the DOI to the publisher's website. • The final author version and the galley proof are versions of the publication after peer review. • The final published version features the final layout of the paper including the volume, issue and page numbers. Link to publication General rights Copyright and moral rights for the publications made accessible in the public portal are retained by the authors and/or other copyright owners and it is a condition of accessing publications that users recognise and abide by the legal requirements associated with these rights. • Users may download and print one copy of any publication from the public portal for the purpose of private study or research. • You may not further distribute the material or use it for any profit-making activity or commercial gain • You may freely distribute the URL identifying the publication in the public portal. If the publication is distributed under the terms of Article 25fa of the Dutch Copyright Act, indicated by the “Taverne” license above, please follow below link for the End User Agreement: www.tue.nl/taverne Take down policy If you believe that this document breaches copyright please contact us at: [email protected] providing details and we will investigate your claim. Download date: 17. Jul. 2020

Approximation algorithms for the general and the ... · Approximation algorithms for the general and the asymmetric Stacker-Crane problems Citation for published version (APA):

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Approximation algorithms for the general and the ... · Approximation algorithms for the general and the asymmetric Stacker-Crane problems Citation for published version (APA):

Approximation algorithms for the general and the asymmetricStacker-Crane problemsCitation for published version (APA):Righini, G., & Trubian, M. (1994). Approximation algorithms for the general and the asymmetric Stacker-Craneproblems. (Memorandum COSOR; Vol. 9420). Technische Universiteit Eindhoven.

Document status and date:Published: 01/01/1994

Document Version:Publisher’s PDF, also known as Version of Record (includes final page, issue and volume numbers)

Please check the document version of this publication:

• A submitted manuscript is the version of the article upon submission and before peer-review. There can beimportant differences between the submitted version and the official published version of record. Peopleinterested in the research are advised to contact the author for the final version of the publication, or visit theDOI to the publisher's website.• The final author version and the galley proof are versions of the publication after peer review.• The final published version features the final layout of the paper including the volume, issue and pagenumbers.Link to publication

General rightsCopyright and moral rights for the publications made accessible in the public portal are retained by the authors and/or other copyright ownersand it is a condition of accessing publications that users recognise and abide by the legal requirements associated with these rights.

• Users may download and print one copy of any publication from the public portal for the purpose of private study or research. • You may not further distribute the material or use it for any profit-making activity or commercial gain • You may freely distribute the URL identifying the publication in the public portal.

If the publication is distributed under the terms of Article 25fa of the Dutch Copyright Act, indicated by the “Taverne” license above, pleasefollow below link for the End User Agreement:www.tue.nl/taverne

Take down policyIf you believe that this document breaches copyright please contact us at:[email protected] details and we will investigate your claim.

Download date: 17. Jul. 2020

Page 2: Approximation algorithms for the general and the ... · Approximation algorithms for the general and the asymmetric Stacker-Crane problems Citation for published version (APA):

EINDHOVEN UNIVERSITY OF TECHNOLOGY Department of Mathematics and Computing Science

Memorandum COSOR 94-20

Approximation algorithms for the General and the Asymmetric Stacker-Crane Problems

Giovanni Righini Marco Trubian

Eindhoven, June 1994 The Netherla.nds

Page 3: Approximation algorithms for the general and the ... · Approximation algorithms for the general and the asymmetric Stacker-Crane problems Citation for published version (APA):

Approximation algorithms for the General and the Asymmetric Stacker-Crane Problems *

Giovanni Righini Technische Universiteit Eindhoven, Faculteit Wiskunde en Informatica

5600 MB Eindhoven, Nederland

Marco Tru bian Politecnico di Milano, Dipartimento di Elettronica e Informazione

piazza Leonardo da Vinci 32, 20133 Milano, Italia

20 May 1994

Abstract

The Stacker-Crane Problem (SCP) consists of finding the minimum length hamiltonian cycle on a mixed gral>h with oriented arcs and unoriented edges: feasible solutions must traverse all the arcs. Approximation algorithms are known for the case in which the triangle inequality holds. We consider the case in which the triangle inequality is violated (General SCP) and the case in which the problem is formulated on a complete digraph (Asymmetric SCP). We show how data-dependent worst-case bounds for the GSCP and the ASCP can be obtained by known approximation algorithms for the SCP with triangle inequality and by a new one. We also discuss the relationship with the Asymmetric Traveling Salesman Problem (ATSP) and we derive sufficient (and meaningful) conditions for ATSP instances to be solvable within constant worst-ca.se bounds equal to 3, 15/7 and 9/5.

'The first author was supported by the Human Capital and Mobility Program of the European Community. The second author was partially supported by research contracts MURST 40% and 60% of the Italian Ministry of University and Scientific Research.

1

Page 4: Approximation algorithms for the general and the ... · Approximation algorithms for the general and the asymmetric Stacker-Crane problems Citation for published version (APA):

1 Introduction

The Stacker-Crane Problem (SCP) was defined by Frederickson, Hecht and Kim [4], who described two algorithms whose combination gives constant worst-case bound. We analyze two different generalizations, namely the General SCP and the Asymmet­ric SCP and we show that the same algorithms provide data-dependent worst-case bounds for both. The ATSP is one of the most widely studied NP-hard combinatorial optimization problems: in [3J and [8] approximation algorithms are given that provide data-dependent worst-case bounds; we use one of the algorithms described in [8J to obtain data-dependent worst-case bounds for the GSCP and the ASCP. Finally we study under which conditions an inst.ance of t.he ATSP can be solved within constant worst-case bound by the a.1gorit.hms of [4] and [8].

1.1 Problems

Stacker-Crane Problem Instance: a complete weighted mixed graph G(ll, E, A), where edges in E are unori­en ted and arcs in A are oriented, satysfying the following tvvo conditions: a) all nodes in V a.re endpoint. of exactly one arc; {3) all the edges satisfy the triangle inequality. Question: find a minimum cost cycle on G, traversing all the arcs.

Remark 1. Since the TI holds, there exist an optimal cycle that is hamiltonian.

Proof. Any cycle traversing some arc i more than once can be made hamiltonian without worsening its value by the following substitution: indicate by hi and ti the two endpoints (head and tail) of arc i; consider one of the edges incident to hi and call u its endpoint different from hi; consider one of the edges incident to ti and not included in the oriented path from u to ti and call v it.s endpoint different from ti. Delete edges [hi, u] and [ti' vJ and add edge [tt, vl (fig.1). Any cycle including pairs of adjacent edges can be made hamiltonian without worsening its value by the substitution of the two adjacent edges with a single edge between their non-common endpoints. Every cycle traversing the arcs only once and without pairs of adjacent edges is hamiltonian.

Remark 2. Since in every hamiltonian solution ea.ch a.rc is traversed exactly once, the sum of the costs of the arcs is a fixed cost. Therefore the value of every solution can be defined in two different ways, depending on taking into account total costs or only variable costs (defined as the difference between total costs and fixed costs). The choice does not affect the ranking of the solutions, but it affects the value of the worst-case bounds.

2

Page 5: Approximation algorithms for the general and the ... · Approximation algorithms for the general and the asymmetric Stacker-Crane problems Citation for published version (APA):

(a)

Figure 1

Asymmetric Traveling Salesman Problem Instance: a complete weighted digraph G( \I, .4). Question: find a minimum cost hamiltonian cycle on G.

(b)

Notation. In this paragraph we establish the notation we use throughout the paper. N is the number of arcs of a SCP: we assume arcs to be arbitrarily numbered from 1 to N. Ii is the cost of the i-th arc and L = Ef:lli is the fixed cost. We call tail and head the endpoints of every arc, such that t he orientation is from the tail to the head. 'liVe indicate the tail and the head of the i-th arc with ti and hi. EC and HC stand for eulerian spanning cycle and hamiltonian cycle. Let S be any set of arcs: then S stands for "S tra.versed in the opposite direction" or "reversed"; S· is t.he optima.l value of S: St and S'I) indicate the total and the variable costs of arc set S. Since we define auxiliary graphs and we number them GIl G2 , ... ,

we indicate with Sk a. set S of arcs on graph Gk .

We use the name of a set of arcs or edges to represent also its associated cost, since this introduces no ambiguity and enhances readability and int.uition. TI stands for the triangle inequality and ATI for the asymmetric triangle inequality. TI is defined as follows: for each pair of vert.ices i and j, the cost of edge [i, j] is not greater then the cost of any (oriented or unoriented) path from i to j or from j to i (fig.2). The ATI is defined on triplets of arcs forming non-coherent triangles; a non- coherent triangle is a triangle that is not a. cycle (fig.3). Indicating with duv t.he cost of an a.rc (u, v) and with V the ground set. of a graph. the ATT is:

3

Page 6: Approximation algorithms for the general and the ... · Approximation algorithms for the general and the asymmetric Stacker-Crane problems Citation for published version (APA):

I w .. J

I J

(a)

1

Figure 2

Figure :3

k

w .. lJ

(b)

Complexity. The SCP is NP-hard; t.his is proved by shO\ving t.hat every inst.ance of the TSP is equivalent to an instance of a SCP with arcs of zero cost (see [4]). The following polynomial time procedure performs the transformation.

Procedure Transform-TSP-into-SCP (figA). Input: a TSP instance, defined by a graph G(l'G, EG ) with weights d on edges. Output: an SCP instance, defined by a mixed graph H( VB, EH, AH), such that the optimal solution and its value are preserved. Step 1: for each node i E VG, define an arc in AH, \vit.h zero cost .. Define FH to be the set of the 2N endpoints of the Narcs. Step 2: for each edge [i,j] E EG , define 4 edges [hi, tj], [hj, ti], [hi, hj] and [ti' tj] in EH ,

and give them a weight equal to dij .

The ATSP is also NP-hard [5]. It is possible to show t.hat every inst.ance of the SCP with N arcs and 2N nodes is equivalent. t.o an instance of t.he ATSP with N nodes: the

4

Page 7: Approximation algorithms for the general and the ... · Approximation algorithms for the general and the asymmetric Stacker-Crane problems Citation for published version (APA):

C£;) \./.

d.. r 1

IJ '\ j / ... \

Q::>

'~A . . A / \

/... ...\ t-I

Figme 4

following polynomial time procedure performs t.he transformation.

Procedure Transform-SCP-into-ATSP (fig.5).

hi

d·· IJ

h. J

Input: an SCP instance, defined by a complete mixed graph G( l"a, EG, AG) with weights Ii on each arc i and weights duv on each edge [ti, v]. Ou.tput: an ATSP instance, defined by a complet.e digraph H (\/ir, AH), such that the optimal solution and its value are preserved. Step 1: for each arc of AG, define a node in llir. Step 2: for each head-to-tail edge [hi. tjl E EG define an arc (i,j) E AH with weight equal to dhitj + ~(li + Ij)'

Figure .t''>

5

Page 8: Approximation algorithms for the general and the ... · Approximation algorithms for the general and the asymmetric Stacker-Crane problems Citation for published version (APA):

Existing algorithms. Frederikson, Hecht and Kim [4] give 2 algorithms, SmaHArcs (SA) and LargeArcs (LA), whose cornbination gives a worst-case bound equal to 9/5 when total costs are considered. When only variable costs are considered the best constant worst-case bound is 3 and is given by algorithm LA alone. This observation was not made in [4]. Frieze, Galbiati and Maffioli (3] examinE' ma.ny a.lgorithms for the ATSP with ATI, pro­ducing worst-case bounds depending on the number of vertices or on other parameters of the instance. Righini and Trubian [8] present two algorithms wit.h dat.a-dependent. worst.-case bounds for the ATSP. One of them (RT2) improves the worst-case bound of one of t.he algo­rithms in [3]. The description of algorithms LA. SA and RT2 is recalled in the a.ppendix.

Purpose of the research and paper outline. The purpose of this paper is: 1) to obta.in data-dependent bounds for the SCP problem when the triangular inequal­ity does not hold; we call this problem the General Stacker Crane Problem, GSCP (section 2); 2) to obtain data-dependent bounds for t.he SCP when G is a digraph: we call this problem t.he Asymmetric Stacker Crane Problem, ASCP (section 3); 3) to obtain sufficient conditions for an ATSP instance to be solvable within constant worst-case bound; the way to obtain such result is to formulate the ATSP instance as a SCP instance for which constant. worst.-case bounds equa.l to 3, 15/7 and 9/.5 are provided by algorithms LA, LA+RT2 and LA+SA (section 4).

Since both algorithms SA and RT2 use the algorithm of Christofides as a subroutine, we first study how the 3/2 bound provided by it cha.nges \vhen the TI does not hold.

6

Page 9: Approximation algorithms for the general and the ... · Approximation algorithms for the general and the asymmetric Stacker-Crane problems Citation for published version (APA):

1.2 The algorithm of Christofides when TI is violated

Consider a complete symmetric weight.ed graph f/( VII, E II ) with edge weights Wij

([i,j] E EII)' Define!::l.1I = maXi,j,kEVH{Wij - (Wik + H'jk), O}. that. is the maximum viola.tion of the TI.

Theorem 1.1 The algorithm of Christo./idEs produces an eule,.ian spanning cycle EC and a hamiltonian cycle H C, such that:

EC < ~HC* + ':6.11 - 2 2

HC < ~HC* + N !::l.1I - 2 2

whe1'e N = I VII I, 0 :5 e :5 N - 2 is the number of eren (legree nodes of the minimum spanning tree of H and He" is tin minimum hamiltoniall cycle on H.

Proof. The algorit.hm initia.lly builds t.he minimum spanning tree on graph H. Call it ST* and let 0 and E be the set of nodes of odd and even degree of ST- and 0 and e their cardinalities. Since ST- bas /\' - 1 edges and no cycles, its cost is a lower bound to HC·, that is ST* :5 HC*. In a second step the algorithm finds the minimulll cost matching Ala on the nodes of odd degree. Since every hamiltonia.n cycle is the union of t.wo edge-disjoint matchings, Me, :5 ~HCo, where HCo is the minimum hamiltonian cycle on the nodes of O.

\ \

\ \ \.

Figure 6

7

Page 10: Approximation algorithms for the general and the ... · Approximation algorithms for the general and the asymmetric Stacker-Crane problems Citation for published version (APA):

It is possible to obtain a particular hamilt.onian cycle H Co on the nodes of 0 from He" by the following procedure: for every uode u in E, delete from He" the two edges [u, r] and [u, s] connecting It to it.s adjacent nodes l' and s and replace them by edge [r, s] (fig.6). Perform the substitution sequentially for f times. Every time the substitution is performed two edges of a t.riangle are replaced \vith the third edge; therefore each substitution costs at most D..H and t.hen HCo ::; HC" + e.~H' Since by definition HCo ::; HCo,

EC = ST* + Mo" < HC" + ~HCo < He· + ~(HC* + eD..H) = ~He* + -2€ ~H - 2 - 2 2

For obtaining a hamiltonian cycle He from Ee t.he algorithm replaces pairs of adjacent. edges by single edges, until every node is yisit.ed only once. Since ST" has N - 1 edges and 1\10 has ~ edges, the number of substitutions is (N - 1) + ~ - N, that is ~ - l. Each substitution costs at most ~H and therefore

o 3 t' 0 3" N He < EC + -~H < -He" + (- + -)~H = -He + ~H

- 2 -2 2 2 2 2

8

Page 11: Approximation algorithms for the general and the ... · Approximation algorithms for the general and the asymmetric Stacker-Crane problems Citation for published version (APA):

2 The General Stacker Crane Problem

The question in the GSCP is to find a hamiltonian c,Y'c!e on G when the TI does not hold; the interest in this problem comes from the observation that the constant bounds provided by algorithms LA and SA of [4] are valid for eulerian cycles only, if the TI is violated. In particular both LA anel SA can output a cycle tra\'ersing all arcs once but visiting some node more than once (fig.7a.) as well as a cycle traversing some arc more than once (fig.7b).

A o ' o

(a) (b)

Figure 7

General Stacker Crane Problem: GSCP Instance: a (complete) weighted mixed graph G(l/, E, .4), where edges in E are unori­ented and arcs in A are oriented. Question: find a minimum cost hamiltonian cycle 11 C·, traversing all arcs.

Conditions Q and {3 of the formulation of the SCP can be violated. In particular we show that it is possible to enforce condition 0', but not condition (3 in general. Therefore the preprocessing procedure used in [4] to enforce the triangle inequality cannot be executed since it makes loosing the hamiltonicity of solutions. First we reformulate the GSCP in an equivalent way and \ve give polynomial time preprocessing procedures to do the transformation. Then we apply algorithms LA, SA and RT2 in order to obtain data-dependent worst-case bounds for the GSCP. If condition a is violated, apply the following preprocessing procedures, equal to those presented in [4].

Procedure Preprocessing la. (fig.8) Input: an instance of the GSCP defined on a weighted mixed graph G(V, E, A). Output: an instance of the GSCP defined on a 'weighted mixed graph 11( Vll , Ell, All) such that all its nodes are endpoint.s of at least one of its arcs. For each node U E V that is endpoint of no arc of A.: split it into two nodes Ul and U2

9

Page 12: Approximation algorithms for the general and the ... · Approximation algorithms for the general and the asymmetric Stacker-Crane problems Citation for published version (APA):

in VH ; split each edge [u, v] E E incident to the original node {/, into two edges [U11 v]

and [U2' v] in EH with the same weight of [H. v]; conl1f.'ct UI and U2 with an arc (Ull U2) of zero cost.

o\/?

//~ 6 \ ~

o - I

W .. IJ

o

Figure 8

Remark. If some node is entered (or left.) by more tha.n one arc, no feasible solution can exist. Anyway in this case one could ask for a. cycle t.raversing all arcs once and visiting each node the smallest possible number of times. This problem is again equivalent to a GSCP on a graph G1 obtained by the following preprocessing procedure.

Procedure Preprocessing lb. (fig.9) Input: a GSCP instance defined on a weight.ed mixed graph H(l/i, EH , AH ), such that all its nodes are endpoints of at least one of its arcs. Output: a GSCP instance defined on a \veighted mixed graph G1 ( \!J., E1 , Ad, such that all its nodes are endpoints of one of its arcs. For each node tt E VH that is head of /..'1 arcs of AH a.nd tail of /..'2 arcs of AH 1 with /..~l + k2 > 1, split tt into a complete bipartite subgraph \'v'ith kl nodes on one side, such that each of them is the head of one of t.he arcs ent.ering It. and /.'2 nodes on the other side, such that each of them is the tail of one of the arcs leaving u; give zero cost to all the edges of the bipartite subgraph: replace each edge [v.. r] E EH by kl + k2 copies of it with the same weight of [tt, v].

Figure 9

10

Page 13: Approximation algorithms for the general and the ... · Approximation algorithms for the general and the asymmetric Stacker-Crane problems Citation for published version (APA):

The preprocessing procedures affect neither the hamiltonicit.y nor the cost of the fea~ sible solutions. Therefore the GSCP on G1 i~ equivalent to that on G. Condition a is satisfied on graph GI .

Since the orientation of arcs is known and a hamilt.onian cycle is required, the orien­_ tat ion in which the edges must be t.raversed in every feasible solution can be derived.

Moreover all tail-to-tail and head~to~head edges call never belong to any feasible so~ lution and then they can be discarded. Consider the follmving polynomial time pre~

- processing procedure, which transforms an instance of the GSCP on graph G1 into an equivalent instance of the ATSP on graph G2•

Preprocessing 2. (fig.lO) Input: a weighted mixed graph G1 (Vi, Ell Ad, such that all its nodes are endpoints of one of its arcs. Output: a weighted digraph G2(lli, A2)' Replace head-to-tail edges [hi, tj] E E1 wit.h arcs (hi, tj) with the same weight; delete all other edges; shrink each arc i E Al merging its endpoints into a single node and associate to the node a weight equal to Ii.

t· Ii h Ii .

1 I Q ..,0. I

0 IX :> d cl hl hit) J I

t 0 I ~b hJ J . Ij J J

Figure 10

After the execution of Preprocessing 2, the weights on the nodes of G2 correspond to the fixed costs of the GSCP, whereas the weights on the arcs of G2 correspond to the variable costs of the GSCP. All feasible solut.ions of the ATSP on G2 correspond to feasible solutions of the GSCP on G1 and vice versa. Therefore HC; .. = HC;.

_ Let us indicate by dij the weight of arc (i,j) E A 2 • Define the maximum violation of the ATIon G2 , .62 = maXi,j,kEV2{dij - (dik + dkj),O}i clefine also the maximum asymmetry of graph G2 , 82 = maXi,jEV2 {dij - dji }.

11

Page 14: Approximation algorithms for the general and the ... · Approximation algorithms for the general and the asymmetric Stacker-Crane problems Citation for published version (APA):

2.1 Algorithm LA for the GSCP

Input: a complete digraph G2(l;;, A 2 ) with 1\' nodes and \vith weights dij for all (i,j) E A2 ) and Ii for all nodes Vi E 112. Output: a hamiltonian cycle on (;2.

Step 1: find the minimum weighted matching AI: on an a.uxiliary complete bipartite graph f((L, R, EK)' where L = \/2• R = \/2 and the following edge weights tlJij Vi E L, j E R: if i ::j. j then tvij = dij ; if i j then 'U'ij = AI, wherE' M is sufficiently large to forbid edges of weight M to belong to A1: . . M; can be computed in time polynomial in N by a linear assignment algorithm. The matching provides a lower bound on the cost of the minimum hamiltonian cycle HC; ... (i) AI; :; HC2~ The arcs of 1H: form a number s of subtoun; on (;2; if self-loops are not allowed (as in our version of the algorithm) $ :; !f (fig. 11 ).

Step 2: find the minimum cost arc set SD; connecting the subtours of AI{; (fig.12). Since in every feasible solution all subsets of nodes must be connected, (ii) SD; :; HC2~

Step 3: consider the reverse arc of each arc of SD; and define S" = J\1;+SD;+SD;. S" is a eulerian spanning cycle, but not hamiltonian in general (fig.13). For the definition of fi2 ,

(iii) 51) :; A1: + SD; + (SD; + (05 - 1)82 )

Step 4: for every arc (i,j) of SD;, calli one of the successors of i in 5v and k one of the predecessors of j in S" (fig.14). Delete from 5" arc (i, I), arc ("~,j) and arc (j, i) and add arc (k, I). The resulting arc set is a hamiltonian cycle, HC2". The substitution must be done s - 1 times and every substitution costs at. most 2.62 , since by the definition of .62 , dkl :; dkj + djl + .62 and djl :; d ji + dil + .62 • Therefore: (iv) HC2" :; Sv + (8 - 1)2.62.

From inequalities (i), (ii), (iii) and (iv) a.nd from the relation .s :; ~, it follows

and when total costs are considered

12

Page 15: Approximation algorithms for the general and the ... · Approximation algorithms for the general and the asymmetric Stacker-Crane problems Citation for published version (APA):

~, " \" ./ \

I ' I .

d ~ ~-''"'"

Figure 11

Figure 12

Figure 13 .........

. '

~ I

~r l ~

1 (" I /'"'

~

kJ

I

~/ (

k,.O ~~ .... ~ ..,J

0 J

Figure 14

Page 16: Approximation algorithms for the general and the ... · Approximation algorithms for the general and the asymmetric Stacker-Crane problems Citation for published version (APA):

2.2 Algorithm SA for the GSCP

Input: a complete digraph G2(V2 , ;h) with IV nodes and with weights dij for all (i,j) E A2 ) and Ii for all nodes Vi E V2•

Output: a hamiltonian cycle on G2 •

Step 1: define a complete unoriented graph G3 (\!3. Ea), with \.'3 = 1/; and edge weights Wij = min{dij , d ji } V[i,j] E E3 • For the construction of G3 , it follows (i) HG; ::; HG;". Define ~3 = maXi,j,kEV3{ Wij - (Wik + Wjk), O}, that is the maximum violation of the TI on G3 •

Observation 2.1: ~3 ::; ~2 + 82 ,

Proof. Consider any triple of nodes (i, j, k) and t he three arcs of 04 2 forming the minimum cost triangle with vertices i, j a.nd k. T\vo cases ca.n ha.ppen: either the three arcs form a coherent tria.ngle (case 1) or they form a non-coherent triangle (case 2). Case I (fig.I5): suppose wlog that t.he arc between i and j is direct.ed from i to j; the following inequalities hold: Wij = dij ::; d ji + 62 ::; (djk + d ki + .6.2 ) + 62 = LVjk + Wik +.6.2 + 62 ,

Case 2 (fig. 16): suppose wlog that the arc between i and j is directed from i to j. If the non-coherent arc is (i,j) then apply the definition of 6 2 (fig.16a); otherwise suppose wlog that the non coherent arc is arc (i, k) (fig.16b); the following inequalities hold: Wij = dij ::; dik + dkj + 6 2 ::; dik + (cijk + 82 ) +.6.2 = lVik + 'Wjk + 62 + .6. 2 ,

Remark. In [4], the construction of the auxiliary undirected graph is followed by the substitution of the edges weights by t.he cost of the shortest path between their endpoints. This is no longer possible, under our hypotheses, because it would cause the algorithm to output eulerian instead of hamiltonian cycles. Therefore in this case we cannot enforce the TI on graph Ga.

Step 2: apply the algorithm of Christofides to graph Ga, obtaining a eulerian spanning cycle EGs. By theorem 1.1 and observation 2.1 it follows (ii) EGa ::; ~HG; + ~e~3' where e is the number of nodes of even degree on the minimum spanning tree of Gs .

Step 3: consider on G2 the arc set S'I) ma.de of the pairs of arcs (i,j), (j, i)) correspon­dent to the edges of EGs (fig. 17). By definition of 62 and by the construction of Ga it follows that S'I) ::; 2EGa + q82 , where q is the number of edges of EGa. S'I) can be traversed in two different and arc-disjoint ways; both of them are eulerian spanning cycles of G2• Choose the best of the two and call it. EG2 ... Then (iii) EG2" < ~S'I) ::; EGa + ~q62'

14

Page 17: Approximation algorithms for the general and the ... · Approximation algorithms for the general and the asymmetric Stacker-Crane problems Citation for published version (APA):

Step 4: in order to obtain a hamiltonian cycle flC2" apply q - N times the substitution of two consecutive arcs of EC2" with one arc wit.h t.he same endpoint.s. Since each substitution costs at most ~2' (iv) HC2 .. :'5 EC2 .. + ~2(q - N).

k

... ~" ., / \

/ \ I I o I

l~j (a)

/' "'\

\

Figure Vi

1

Figure 16

Figure 17

15

k ~~ { "

(b)

J

9~ 1 a ~ ~ ~ \ \ \~

Page 18: Approximation algorithms for the general and the ... · Approximation algorithms for the general and the asymmetric Stacker-Crane problems Citation for published version (APA):

From inequalities (i), (ii), (iii) and (iv) anel fr0111 the relations q = (IV - 1) + ~ and 0= N - e it follows

and \vhen total costs are considered

16

Page 19: Approximation algorithms for the general and the ... · Approximation algorithms for the general and the asymmetric Stacker-Crane problems Citation for published version (APA):

2.3 Algorithm RT2 for the GSCP

Input: a complete digraph G2(F2, ,42) with N nodes and with weights dij for all (i,j) E A 2 ) and h for all nodes Vi E V2. Output: a hamiltonian cycle on G2 •

Step 1: define a complete unoriented graph G3 ( "';, E3 ), with \/; = '-'i and edge weights Wij = dij + dji V[i,j] E E3 •

For the construction of G3 , it follows t.hat HC; = (HC2", + HC2~)* :::; HC;" + HCitl' By definition of 62 , HCi .. :::; HC; .. + N62. Therefore (i) HC;' :::; 2HC;" + N62 •

Define .6.3 = ma;T;i,i,leEV3 {Wij (Wile + Wjle). O}, t,hat is the maximum violation of the TI on G3 •

Observation 2.2 .6.3 :::; 2.6. 2 ,

Proof. Applying the ATI on the t\ro triangles of G2 defined by the same three vertices i, j and k, dij :::; dile+dlej+.6.2 and dji :::; dki+djk+.6.2; summing lip the two inequalitites, Wij :::; Wik + Wjle + 26 2 and then .6.3 :::; 2.6. 2 ,

Step 2: apply the algorithm of Christofides, which provides a hamiltonian cycle HC3 •

For theorem 1.1 and observation 2.2, (ii) HCa :::; ~HC3 + ~N 6 a.

Step 3: define Sf} to be the set of pairs of opposite arcs on G2 , corresponding to the edges of HCa. Sf} can be traversed in two arc-disjoint ways (fig,18); call HC2" the best of the two. (iii) HC2 .. :::; ~S = !HC3 .

From inequalities (i), (ii) and (iii) anel observation 2.2 it fo11O\ .... s

and when total costs are considered

3 * 1 3 1 HC2 < -HC - -L + -N62 + -N.6. 2 • - 2 2. 2 4 2

17

Page 20: Approximation algorithms for the general and the ... · Approximation algorithms for the general and the asymmetric Stacker-Crane problems Citation for published version (APA):

/~

LJ

2.4 Comparison

..... ~~ (' J ., \

~ on G

2

Figure 18

The data-dependent worst-case bounds provided by algorithms LA, SA and RT2 are of the form:

Tables in figure 19 show the compa.rison between the three bounds. The worst-case bound of algorithm RT2 dominates the one of algorithm SA.

GSCP 'T) = He !v HC2"

algorithm iT kL k6.2 kS2

LA ' 3 0 1 1/2 SA 3/2 0 1/2 3/2

RT2 3/2 0 1/2 3/4

GSCP 'T) = Z~!t '2

algorithm k kL k6.2 kS2

LA 3 -2 1 1/2 SA 3/2 -1/2 1/2 3/2

RT2 3/2 -1/2 1/2 3/4

Figure 19

18

Page 21: Approximation algorithms for the general and the ... · Approximation algorithms for the general and the asymmetric Stacker-Crane problems Citation for published version (APA):

3 The Asymmetric Stacker Crane Problem

Instance: a complete digraph G(V, E, A) where .4 is a subset of E. Question: find a minimum cost cycle EC·, traversing all arcs in .4 ..

In order to distinguish arcs in A, we call them jl:l'fd arcs and we call mriable arcs the others. A solution of the ASCP is neither required to be hamiltonian nor to traverse fixed arcs only once. If a hamiltonian cycle is required, the problem becomes equivalent to that of section 2.

Consider the following conditions: a' ) All nodes of the graph are endpoints of one of the fixed arcs. fJ') Variable arcs sa.tisfy the AT!.

Both conditions a' and fJ' can be violated by a. general instance of the ASCP. So, first we reformulate the ASCP in an equivaJent wa.y and we give polynomiaJ time preprocessing procedures to do the transformation. Then we apply algorit.hms LA, SA and RT2 in order to obtian data-dependent "vorst-case bounds If condition a' is violated, execute the following preprocessing procedures.

Procedure Preprocessing la'. (fig.20) Input: an instance of the ASCP defined on a complete weighted digraph G(V, E, A). Output: an instance of the ASCP defined on a. complete weighted digra.ph H(VH , EH , AH ),

such that all nodes are endpoints of at least one of the fixed arcs. For each node U E V that is endpoint of no fixed arc, split. It into two nodes III and U2;

split ea.ch va.riable arc incident to the original node 'It into two va.riable arcs, incident to Ul and to U2, with the same weight; connect 'UI and '1l2 with a fixed arc of zero cost.

__ ..... f', ) ----'v

Figure 20

19

Page 22: Approximation algorithms for the general and the ... · Approximation algorithms for the general and the asymmetric Stacker-Crane problems Citation for published version (APA):

Procedure Preprocessing Ib'. (fig.2l) Input: an instance of the ASCP defined on a oomplete weighted digraph H(VB~ EB, AB), such that all nodes are endpoints of at least one of the fixed arcs. Output: an instance of the ASCP defined Oll a complete weighted digraph GI(Vt. EI~ Ad, such that aU nodes are endpoint.s of one of the fixed arcs. For each node ~l E VB that is endpoint of k > 1 fixed arcs or AH: split It into k nodes Ul! .•. , Uk, such that each of them is the endpoint of one of the fixed arcs incident to u; replace each variable arc incident. to 1l. by /': copies of it. incident to UI, U2," ., UI"

with the same weight of the original variable arc; COllllect all nodes ttl, tt2,' •. ,Uk with variable arcs of zero cost.

Figure 21

Neither of the preprocessing procedures affect.s the variable 01' the total cost of the feasible solutions. Therefore the ASCP on GI is equivalent to that on G. A second preprocessing step enforces condition {3', transforming the ASCP instance on G I into an equivalent ASCP instance on G2•

Procedure Preprocessing 2'. Input: an instance of the ASCP defined on a. complet.e weighted digraph G1 (V1, E1 , AI)' such that a' holds. Output: an instance of the ASCP defined on a. complete weighted digraph G2 (V2 , E2 , A 2 ),

where A2 is the subset of fixed arcs and such that both conditions a' and f3' hold. For every pair of nodes~ compute the minimum cost oriented path in GI . This can be done in polynomial time with well known algorithms [2]. Define a graph G2 with the same arc sets as G1 but with weight. of each variable arc equal t.o the cost of the shortest oriented path between its endpoints.

The original ASCP instance is equivalent. t.o the ASCP instance on G2 : suit.able post­processing procedures that undo t.he replacement.s done by preprocessing procedures la', lb~ and 2' can transform any feasib1e solution on G2 int.o a fea.sible solution on C.

20

Page 23: Approximation algorithms for the general and the ... · Approximation algorithms for the general and the asymmetric Stacker-Crane problems Citation for published version (APA):

The value of all feasible solutions is the same on G2 and on G. Moreover, an optimal solution on G2 is hamiltonian, since any cycle visiting a node more than once can be made hamiltonian without worsening its \'a.lue, exploiting condition {3'. Therefore HC; = EC·.

Let N be the number of fixed arcs and 2N t.he number ot' nodes of G2 . Let us define the following parameters: bt = nWX(i,j)EA{dji - d ij }.

bf = ma:ri,jl(i,j)~At\(j,i)~A {dij - d ji }.

b2 = m.ax{ bt, bf}.

Remark. 82 cannot be computed by applying its definition to G directly, before the preprocessing. Anyway the time needed to comput.e 82 is not more than that needed to do the preprocessing.

21

Page 24: Approximation algorithms for the general and the ... · Approximation algorithms for the general and the asymmetric Stacker-Crane problems Citation for published version (APA):

3.1 Algorithm LA for the ASCP

Input: a complete weighted digraph G2( l'a. £2,.42 ), where ,42 is the subset of fixed arcs and such that conditions cl and /3' hold. Output: a hamiltonian cycle traversing all fixed arcs.

Step 1: Consider the auxiliary bipartite graph f{(T, If, EK ) such that T is the set of nodes of G2 that are tails of fixed arcs, H is the set of nodes of O2 that are heads of fixed arcs and EK is the set of variable arcs of G2 • Find the optimal matching M: on graph I<j it corresponds to a set Ai; of variahle arcs of G2• The arc set A1; = M: U A2 forms s subtours on G2 (fig.22) and its cost b a lower bound of the cost of the minimum hamiltonian cycle.

(i) ill; ~ HC;" Since self-loops are forbidden, 8 ~ N /2.

Step 2: Choose the smallest variable arcs cOllllecting the subtours: call SD: the set of such arcs (fig.23). Since in all feasible solutions the sllbtours must be connected,

(ii) SD: ~ HC;".

Step 3: Consider the set sb; of arcs opposit,e t.o t.hose of SD:. By definition of c5f, sb; ~ SD; + (8 -l)c5f. Consider the eulerian cycle ECt Mt + SD: + sb; (fig.24). (iii) ECt ~ A1; + 2SD: + (8 - l)c5f

Step 4: Substitute all pairs of adjacent variable arcs "by single variable arcs with the same endpoints until a hamiltonian cycle If C2 is left. By condition ;3', (iv) HC2• ~ EC2.-

From inequalities (i), (ii), (iii) and (iv) it follows

and when total costs are considered

22

Page 25: Approximation algorithms for the general and the ... · Approximation algorithms for the general and the asymmetric Stacker-Crane problems Citation for published version (APA):

~.

l~J v ,/

Fiollre 22 b

<---0 'X • ! I ( ,

:. 6 ~"

Figure 2:3

'~.'~ ........... ~··r

.' .' \

••• • • ( . "'. 6~ .

Figure 24

Page 26: Approximation algorithms for the general and the ... · Approximation algorithms for the general and the asymmetric Stacker-Crane problems Citation for published version (APA):

3.2 Algorithm SA for the ASCP

Input: a complete weighted digraph G2 ( '-'2, £2 • .42 ), where .42 is the subset of variable arcs and such that conditions c/ and ,8' hold. Output: a hamiltonian cycle traversing a.ll fixed arcs.

Let us indicate 'vvith duu the cost of the gelleric \'ariable arc (u, t') of (;2'

Step 1: define a complete unoriented graph 0 3 (\'3' £3) wit.h N nodes. one for each fixed arc of O2 ; define the following edge weights on G3 (fig.2.)): , .. - . {d I d d I I I I } I.+lj V' ," \l lOt) - n1)n ,h.tj,C,·tjh" hjt" ·t,hj' (.h,hj,C·hjh,.(t,tj' Ctjti' + 2 I,) E '3·

Define.6.3 ma:ri,j,kEV3 {Wij - (Wik + ll'jk)}. t.he ma.ximum violation of the TI on G3 •

Observation 3.1 .6.3 :5 62

Proof. Consider the variable arcs (1\ s) and (1/, v) of O2 such that tl'ik = dr.t ~ + ~ and Wjk = duu + ~ + ~. The following cases can happen: both (I', $) and (u, 11) enter (or both leave) the k-th fixed arc (case 1) or one of them enters and the other leaves the k- th fixed arc (case 2). Case 1) without loss of generality, suppose both (1', s) and (u, v) enter fixed arc k (fig.26). If s = v (fig.26a), the following inequa.lit.ies hold: 'Wij :5 dru + ~ + ~ < dr.+d1Ju+~+~ :5 dr.t+(duu+6f)+~+~ = Wik+ W jk- lk+ 6f :5 Wile+1.0jk+ 6fi otherwise suppose wlog that s = tie and v = hk (fig.2Gb); then the following inequalities hold:

< d I·!i. < dId I·!i. < I I ( I £E) I· !i. £E Wij _ ru+~+ 2 _ r.+ le+ Utl+~+ 2 _ (.ra+1e (.uv+ U 2 +~+ 2 = 'Wik+ Wjle+ U2'

Case 2) without loss of generality suppose (r, 8) enters fixed arc J..~ and (u, v) leaves it.

If s = tt (fig.27a), then 'Wij :5 d .. v + ~ ~:5 elra + eltl.V + ~ + ~ :5 (lra + elU1J lie + ~ + ~ = 'Wile + 'Wjk' If s it and the fixed arc is oriented from s tOll, then H'ij :5 drv + ~ + ~ :5 dr. + tk + duv + ~ + ~ = Wile + Wjk; if the fixed arc is oriented from It to s (fig.27b), then

'Wij ::; d .. v+~+~ :5 dr.t+d.tu+du1J+~+~ :5 dT'.t+(lk+6t)+d1J.1J+lle+~+~ = Wik+ W jk+ 6f. By the definition of 62 , the statement of t.he observation follows.

By the definition of the weights on G3 •

(i) HG; :5 HGi .. + L = HGij.

Step 2: apply the a.lgorithm of Christofides, obtaining a eulerian spanning cycle EGa; for theorem L1 it follows (ii) EGa :5 ~HG; + ~e6f, where e is the number of even degree nodes of the minimum spa.nning tree of Ga.

Step 3: consider the a.rc set Su made of the va.riable arcs of G2 correspondent to the edges in EGa (fig.28). For the definition of weight.s on G3 , EGa ~ Su + L (if EGa is hamiltonian, the inequality holds as an equality). Define St to be the set of arcs of Sv plus two copies of the fixed arcs (fig.29a). Then St :5 Sv + 2L and St :5 EGa + L.

24

Page 27: Approximation algorithms for the general and the ... · Approximation algorithms for the general and the asymmetric Stacker-Crane problems Citation for published version (APA):

Consider St. For the definition of (if and 8: . . ~·t ::; St + q8f + N 6:, \vhere q is the number of variable arcs in Sv' Then St + :!:it ::; :2Sv + q6f + :2 L + N 8: (fig.29b). The set of arcs St U St can be traversed in two arc-disjoint ways, that are both eulerian spanning cycles of G2 and feasible solut.ions (fig.:SO). Choose the best of the two and call it EC2 • .

(iii) EC2t ::; ~(St + St) ::; Sv + L + ~q8f + ~ N 8:

Step 4: substitute all pairs of adjacent. variable arcs by single va.riable arcs with the same endpoints until a hamiltonian cycle HC2 is left. By COlldition ,8',

(iv) HC2" ::; EC2"

From inequalities (i), (ii), (iii) and (iv). from the relations q (N -1) + ~ and 0 = N -e a.nd from the definition of 62 it follows

3 3 HC2 < -HC2'" + -L + 2N52

11 - 2 .. 2

and when total cost.s are considered

2.5

Page 28: Approximation algorithms for the general and the ... · Approximation algorithms for the general and the asymmetric Stacker-Crane problems Citation for published version (APA):

t· 1

, '.

'. ~

", J ", ,.' 1 : i .

rO:i?j U

\ / ~ " \ . i /.-.. - .. - .. - .. -.. _ ~.~O'··-,

S = V' ., .. , .. _ .. _ .. _ .. _ .. _ .. -.. -.. ,/

(a)

r

c ...................................... 9f v

~_ .. o S=U

(a)

,,1 ''1'

I

--~ I / w·· ----'--1v I IJ

Figure :2.5

Figure 26

Figure 27

26

i OJ

Page 29: Approximation algorithms for the general and the ... · Approximation algorithms for the general and the asymmetric Stacker-Crane problems Citation for published version (APA):

Figure 28

(a) •

Figure 29

~ ~ "'-~ It ~~o

(a) (b) Figure :10

Page 30: Approximation algorithms for the general and the ... · Approximation algorithms for the general and the asymmetric Stacker-Crane problems Citation for published version (APA):

3.3 Algorithm RT2 for the ASCP

Input: a complete weighted digraph G2( \'2, E 2 • '-\2), where ."h is the subset of fixed arcs and such that conditions at and {1' hold. Output: a hamiltonian cycle traversing all fixed arcs.

Let us indicate ''lith duv the cost of the generic nU'iable arc (it, v) of G2 •

Step 1: define a complete unorient.ed graph G3( \'3, £3) wi til N nodes. one for each fixed arc of G2 ; define the following edge weights: Wij dhitj + dhjti + Ii + lj Vi, j E Va.

Observation 3.1 The TI holds OIl Ga.

Proof. From condition {1/ it follows dhitj ::; dhitk + lie + dhktj and dhjti ::; dhjtk + lie + dh"ti'

Summing up the two inequalities, the statement of the observation follows from the definition of the weights on Ga.

From the definit.ion of Ga, HC; - (HC2" + HC2" t + 2L < HC;" + HC;" + 2L 2HC;" + 2L + (He;" - HC;,,) and by the defillition of bf, (i) HC; ::; 2HC;., + 2L + N8f

Step 2: apply the algorithm of Christofides and obt.ain a hamiltonian cycle HCa on

Ga· (ii) HCa ::; ~ HC;.

Step 3: transform HCa into a solution on G2 : consider the pairs of variable aTCS (hi, tj) and (hj, ti) correspondent to edges of HC3 ; add t.wo copies of each fixed arc; call St the resulting arc set (fig.31).

St = (HC3 - 2L) + 2L = HCa. St call be t.raversed in two arc-disjoint ways, which are both feasible solutions (fig.32). Choose the best. of the them and call it HC2,.

(iii) HC2t < !St

From inequalities (i), (ii) and (iii) it follows

and when total costs are considered

28

Page 31: Approximation algorithms for the general and the ... · Approximation algorithms for the general and the asymmetric Stacker-Crane problems Citation for published version (APA):

(a)

(b)

Figure :n

(b)

Figure 32

29

Page 32: Approximation algorithms for the general and the ... · Approximation algorithms for the general and the asymmetric Stacker-Crane problems Citation for published version (APA):

3.4 Comparison

The data-dependent worst-case bounds provided by algorithms LA, SA and RT2 are of the form:

L N02 1] < k+kL--+b--- HC· aa HC·

2" 2"

Tables in figure 33 show the comparison bet.ween the three bounds. As for the GSCP, also for the ASCP the worst-case bound of algorit.hm RT2 dominates the one of algo­rithm SA.

ASCP T/ = Z~:Y 2

algorithm k kL kS2 LA 3 0 1/2 SA 3/2 3/2 3/2

RT2 3/2 1/2 3/4

ASCP T/ = Z~~t 2,

algorithm k kL kS2 LA 3 -2 1/2 SA 3/2 1 3/2

RT2 3/2 0 3/4

Figure :.\:3

30

Page 33: Approximation algorithms for the general and the ... · Approximation algorithms for the general and the asymmetric Stacker-Crane problems Citation for published version (APA):

4 ATSP instances with constant worst-case bound

Computational complexity theory allows to dassif.Y combina.torial optimization prob­lems: in particular the ATSP belongs t.o the class of NP-hard problems [.5], that is no algorithm is known for finding the optimal solution in time polynomial in the size of the problem (conveniently measured by t.he number of nodes of t.he graph). Salmi and Gonzales [9] proved that even finding a solut.ion within a pl'especified constant ratio from the global optimum is also NP-hard, if the ATI can be violated. Anyway even for the ATSP with ATI no polynomial algorithm is known to provide a constant worst-case bound. In [3] Frieze, Galbiati and lVIaffioli consider the ATSP with ATI and describe some polynomial algorithms, whose worst.-case performance is data-dependent. Since it is related t.o the complexity of the problem. the computat.ional complexity analysis does not. take into account the data of any particular instance. Anyway, when a particular instance has to be solved. it is possible to achieve more information about how difficult it is, just exploiting information contained in input data. Thus, instead of examining the worst-case performance of algorithms 011 all possible instances of a problem, we ask an inverse quest.ion: which are the inst.ances that can be solved within a prespecified worst-case bound by some known polynomial time algorit.hm? In this section we show how to ana.lyze ATSP j nstances, exploiting t.he known algo­rithms LA, SA and RT2, which are polynomial and give constant worst-case bounds for the SCPo In order to do so, we st.udy how an ATSP instance can be equivalently reformulated as a SCP instance wit.hout TI and under which conditions algorithms LA, SA and RT2 can be used to obtain constant bounds even when the TI does not hold. There are two ways to reformulate an ATSP instance as a SCP instance. In both of them each node of the ATSP instance corresponds to an arc of the SCP instance. Hereafter we outline two different procedures that do the tra.nsformation in polynomial time.

Procedure Transform-ATSP-into-SCP-l Input: an ATSP instance, defined by a digraph G( \Ia, AG) with weights d on arcs. Output: an SCP instance, defined by a mixed graph H(ViI, EH, AH), such that there is a one-to-one correspondence between fea.sible solut.ions of the two instances and their value is preserved. Step 1: for each node i of VG define two nodes hi and ti in liB and an arc (ti' hd in AH and give the arc an arbitrary large cost I ~ ma;l·i.jEVG{dij - d ji }.

Step 2: Insert in EH all head-to-tail edges [hi, tjl and define their cost to be Wij = dij

(fig.34). Step 3: Add to EH aU the missing edges and give them a weight AI ~ l1WXi,iEVG{dii}'

Procedure Transform-ATSP-into-SCP-2 Input: an ATSP instance, defined by a digraph G(VG' AG) with weights d on arcs. Output: a SCP instance, defined by a mixed graph H(l'B' EH, AH), such that there is a one-to-one correspondence bet,\veen feasible solut.ions of the two instances and their

31

Page 34: Approximation algorithms for the general and the ... · Approximation algorithms for the general and the asymmetric Stacker-Crane problems Citation for published version (APA):

value is preserved. Step 1: define suitable quantities Ui ;::: 0 and Ei ;::: 0 for each node i of Va. Step '2: for each node i of Va define two nodes hi and ti in 1'H and an arc (t" hd in AH and give the arc a cost Ii = Ui + Ei .

Step 3: insert in EH all head-to-t-ail edges [hi, ti] and define their cost to be 'Wi; = di ; Ui - E; (fig.35). Insert a.lso edges [hi. td with weight equal to Ii. Step 4: Add to EH all the missing edges and give them a weight equal to At ;::: maxi,jEVa{di;}'

I

~ d .. (1 d ..

IJ

11 JI

J

Figure 34

1 1.= U. + E I' I I

° . )0 /w .. =d.. -U.-E.

/ IJ IJ I J

(j >0

? d.. \

IJ ~

J U +E, J ]

Figure :3.5

The technique used in Transform-ATSP-inlo-SCP-2 is similar to that discussed in [6] in order to obtain data-dependent bounds for the TSP when TI is violated. In that paper it is shown what is the best way to obta.in data.-dependent bounds for TSP instances in which the TI is violated, using algorithms that give constant bounds for instances in which the TI holds. Such data-dependent bounds are obtained by solving an auxiliary linear assignment problem whose dual variables are just the quantities Ui and Ei we have mentioned above.

Remark. The TI does not hold on t.he mixed graph obtained by either of the trans­formations.

Page 35: Approximation algorithms for the general and the ... · Approximation algorithms for the general and the asymmetric Stacker-Crane problems Citation for published version (APA):

After the first (resp. second) transformation every solution of the ATSP corresponds to a solution of the SCP whose value is given by tile l'ariable (resp. total) costs. When variable costs are considered, algorit.hm LA provides a const.ant worst-case bound equal to 3 (see appendix); when total costs are considered. the combinat.ion of algorithms LA and SA gives a constant worst-case bound equal to 9j;j and the combination of LA with RT2 gives a constant worst-case bOllnd equal to 15/7 (see appendix). Since the TI is not satisfied in general, the above transformations are not sufficient to generate instances of the SCP as those defined in the int.roduction. In particular condition a is satisfied but condition /3 is violated. In the next subsections we derive sufficient conditions for the algorithms to give the same constant bounds as for the SCP with TI. Obviously, more restrictive conditions correspond to a better bound. In order to test the meaningfulness of the conditions obtained we require (a.) that some graph exists satisfying them (that is they are not too restricive) and (b) on such graphs no better or equivalent worst-ca.se bound can be immediately derived from the simple examination of input data: in particular we consider the trivia.! 10\\'e1' and upper bounds, LB and U B, given by the sum of the N smallest and the N biggest. arcs. Let us also define the following qua.ntit.ies: bin maxjEvG{dji - dij, O} Vi = 1, .... X 8rt maxjEvG{dij - d ji1 O} Vi = 1, ... , N Let us indicate the amount by which the ATI is sat.isfied ill each tria.ngle by !::l.ijk -

dile + dkj - di ; Vi,j, ,,: = 1, ... , N.

Page 36: Approximation algorithms for the general and the ... · Approximation algorithms for the general and the asymmetric Stacker-Crane problems Citation for published version (APA):

4.1 Algorithm LA: worst-case bound = 3

A worst-case bound equal to 3 can be achieved by applying Transform- ATSP- into-Sep-1 and then algorithm LA. From the analysis of the algorithm it follows that the only conditions that must hold are those required by tlle postprocessing. For the definition of 1\1, only head-to-tail edges belong to the eulerian cycle built by LA. Therefore in the postprocessing triples of adjacent head-to-tail edges are replaced by one head-to-tail edge (fig.36).

Figure 3(j-

Therefore, necessary and snfficient condition for an ATSP instance to be solvable within worst-case bound equal to 3 by algorithm LA (plus postprocessing) is:

The example in figure 37 shows a graph sat.isfying condition (A1); in that example UB _ 14 > 3 LB - 4 •

Testing condition (AI) requires O(N4). whereas the application of the algorithm re-quires O(N3 ). More restrictive condit.ions that. are faster to test call be obta.ined, but we could not prove they are meaningful. For insta.nce, it is possible t.o imply condition (AI) in the following way. dkl < dkj + dij + dil == dkj + dji + dil + (dij - djd. This is implied by the two conditions dkl < dkj + djl + 1/2(dij - djd and djl :5 dji + dil + 1/2(dij - did, which are implied by dkl :5 dki + dil - 1/2bjt and £Iii :5 elji + (liZ - 1/28!n. A sufficient condition is then tl.iik 2:: Hb~n + brut) Vi,j, k E l,(;, \ .... hich can be tested in O(N3

). On the other side such condition is stronger than the ATI, since bin a.nd 0kut are non-nega.tive and we could not prove it is meaningful.

Page 37: Approximation algorithms for the general and the ... · Approximation algorithms for the general and the asymmetric Stacker-Crane problems Citation for published version (APA):

2

~+-_1~_~ \ 2 ~) /1\

I \ I ' , i \

') \/ . I?!')

® 1 4

1

figure :ri

Remark. Even if the sufficient condition (AI) does not hold, algorithm LA provides a data-dependent bound for the ATSP. like' those of [:3J and [8]. In particular, algorithm LA (plus postprocessing) produces a solut.ion He of the ATSP such that

1 HC < 3HC* + N~ + -NfJ - 2

Page 38: Approximation algorithms for the general and the ... · Approximation algorithms for the general and the asymmetric Stacker-Crane problems Citation for published version (APA):

4.2 Algorithms LA + RT2: worst-case bound = 15/7

A constant worst-case bound equal to 15/7 call be obtained by applying Transform­ATSP-into-SCP-2 followed by the combination or aJgorithms LA and RT2. In order to obta.in the consta.nt bound the following conditions are necessary and sufficient.

(Bl) Ii ~ 0 Vi = 1, ... , N. (B2) Wij ~ 0 Vi,j = 1, ... ,N. (B3) Wij + Wji ~ Wile + Wlei + Wjk + lOkj Vi,j~ k = 1, ... , N. (B4) Wi; ~ Ii + Wji + Ij Vi,j = L ... , N. (B5) Wkl ~ Wlej + Wi; + Wil 'Vi,j, ~d = L .... N.

Conditions (Bl) and (B2) are required for obt.aining a mixed graph wit.h non-negative costs on the arcs and edges after the t.ransforma.tion. Condition (B:3) is required by algorithm RT2, that builds a.n auxiliary undirected graph on which the TI must hold. Condition (B4) is necessary in step 1 of algorithm RT2 (see appendix). Condition (B.5) is required in the postprocessillg of t.he output or algorithm LA (as outlined in the previous subsection).

We substitute condition (B3) with condition (13:>'), that implies it. (B3' ) Wij ~ Wik + lOkj Vi,j, h~ = 1, ... , N. \Ve choose Ui = ~Dr't and Ei = ~bfn for all i = 1. ... , N. By this choice conditions (Bl) and (B4) are always satisfied. The following set. of condit.ions is now sufficient.

( B) !:,out £in < d V" \' 2 Vi + Vj _ 4 ij/.,) = L ... , 1 '

(B ') d d d l(dn -out·) 3 ij ~ ik + k; - 4" Vk +?lk

Condition (B5') is obtained from condit.ion (B5), by t.he use of the inequality dji-di; ~ !( hi"" + bit) coming from the definit.ion of parameters bin and bout. Figure 38 shows an example of a graph sat.isfying all the three sufficient conditions, in which ~; = 1; > 1:. Conditions (B3') a.nd (B5') are bot.h implied by the following condit.ion (B6). (B6) dij ~ dik + dkj - Hh~n + hzut) Vi,j, h: = 1, ... , N. By definition of 6ijk a set of sufficient. conditions is then: (B2) 8it + 8jn ~ 4dij Vi,j = 1, ... , N (B6) 6 ijk ~ ~(h~n + Dzut) Vi,j, k = 1, ... , N

:36

Page 39: Approximation algorithms for the general and the ... · Approximation algorithms for the general and the asymmetric Stacker-Crane problems Citation for published version (APA):

This set of sufficient conditions is checkable in O( N3); anywa.y we could not prove that it is meaningfuL It can be remarked that it is stronger than the ATL

3 /') / "'"

'. 3/2 ~ / ! \ / ~

/ i \ ' I \ .:>( ,I \ \9 ~\ 2: 'x / \ 2)"-

\ )/4/~\ / ~I~ ~W

®~ "J I? w/ .....

Figure :18

:37

Page 40: Approximation algorithms for the general and the ... · Approximation algorithms for the general and the asymmetric Stacker-Crane problems Citation for published version (APA):

4.3 Algorithms LA + SA: worst-case bound = 9/5

A constant worst-case bound equal t.o ~)j.5 call be obt.ained by applying Transform­ATSP-into-SCP-2 followed by the combinat.ion of algorithms LA and SA (both followed by postprocessing). In order to obtain the constant bound the following conditions are necessary and sufficient.

(C1) Ii ~ 0 Vi = 1, ... ,N. (C2) Wij ~ 0 Vi,j = 1, ... ,N. (C3) Zij :::; Zile + Zjle Vi,j, k = 1, ... , lV, where Zij = min{wij, Wji}.

(C4) Wij :::; Ii + Wji + Ij Vi, j = 1, ... , lV. (C.S) Wile :::; Wij + Wkj + lie (C6) Wile :::; Wjle + HJji + Ii (C7) Wkl :::; Wil + Wij + Wlej Vi,j.!.·.l = 1. .... N.

Conditions (Cl) and (C2) are required for obt.ailling a mixed graph with non-negative costs after the transformation. Condition ((':3) is required by algorithm SA, that builds an auxiliary undirected graph on which t.he TI must hold. Conditions (C4) (fig.39), (C5) (fig.40) and (C6) (fig.'ll) are necessary in the postprocessing for replacing triples of asjacent head-to-tail edges by single edges. Condition (C7) is required by the postprocessing of the output of algorit.hm LA as in the previous subsections .

Figure :3~)

38

• 0 r ". ..... . ..... . \

\

b

\ \ 1"'\

o /~ \ .

'. \ J ·~O

Page 41: Approximation algorithms for the general and the ... · Approximation algorithms for the general and the asymmetric Stacker-Crane problems Citation for published version (APA):

o ,'!II! / /

/ /

Figure 40

Figure 41

J

i j ~\

) \./' o k

By substitution from the definition of weights I and w. we obtain the equivalent set of conditions.

(Cl)Ui+Ei~O Vi 1, ... ,N. (C2) Ui + E j :5 dij Vi,) = 1, ... , N. (C3) Zij :5 Zile + Zjle Vi,}, k = 1, ... , iV. (C4) dij - dji :5 2Ui + 2Ej Vi,} = 1, ... , N. (C5) dij :5 dile + djle + 2Ej - 2EIe (C6) dij :5 dlej + dlei + 2Ui - 2UIe (C7) dlez :5 diZ + dij + dlej - 2U;. - 2Ej Vi.}. J.., 1= 1, ... , N.

39

Page 42: Approximation algorithms for the general and the ... · Approximation algorithms for the general and the asymmetric Stacker-Crane problems Citation for published version (APA):

We choose again Ui = ~brut and Ei = ~bfn for all nodes i = 1, ... , N. Therefore conditions (C1) and (C4) are satisfied. We obtain the following sufficient conditions:

(C3) Zij $ Zile + Zjle 'Vi,j, /.. = 1, ... ,N

(C6) d I d 1 ( -out 'out) v· , 1 ;J' < (i "J' + Ie,' + - b· - Die t, j., ,,: = L. , . , iV • - to 2 l

(C7)

Figure 42 shows an example of a graph sat.isfying sufficient conditions above. The bound is meaningful since ~= = 16

4 > ~.

Figure 42

Due to condition (C7) the time required for the testing is O(N4). Faster but more restrictive conditions can be obtained, but again we could not prove they are meaning­ful. For instance, the following system of hvo conditions (C2) brut + b;n $ 4dij 'Vi,j = 1, ... , N (C8) D.iile ~ ~(b~n + br't) + 1(btn + brt + bjn + bjt) Vi,j, k = 1, ... , N is sufficient and is checkable in O(f.P) but it seems to be largely too restrictive.

40

Page 43: Approximation algorithms for the general and the ... · Approximation algorithms for the general and the asymmetric Stacker-Crane problems Citation for published version (APA):

ACKNOWLEDGMENTS

Prof. Anton Volgenant pointed out the relat.ionship between the reduction outlined in section 4 and those illustrated in [6] for the TSP. The first author acknowledges the support of the Human Capit.aland Mobility Pro­gram of the European Community.

41

Page 44: Approximation algorithms for the general and the ... · Approximation algorithms for the general and the asymmetric Stacker-Crane problems Citation for published version (APA):

References

[1] M.R.Garey, D.S.Johnson Computers and Intractability: a Guided TOllr to thE Theory of NP- complete­ness Freeman, San Francisco. 1979

[2] R.W.Floyd Algorithm 97: Sh01·tesl Path Comm. ACM 5, 1962 [34.5]

[3] A.M.Frieze, G.Ga.lbiati, F.l\IafTioli On the worst-case pe'rformJI,ncc of some algorithms for lhe Asymmetric Trav­eling Salesman Problem Networks 12, 1982 [23-39]

[4] G.N.Frederickson, M.S.Hecht, C.E.Kim Approximation algorithms foJ' some /'Outing problems SIAM J. Comput. 7,2, H)78 [178-19:3]

[.5] M.R.Garey, D.S.Johnson Computers and Intractability: a Gllidf' to the Theory of l\lP- completeness Freeman, San Francisco, 1979

[6] R.Jonker, R.Kaas, T.Volgenaflt Data-dependent bounds for heuristic ... to .find a min/mum 'weight hamiltonian circuit Operations Research 28, 1980 [62:3-627]

[7] E.L.Lawler, J.K.Lenstra, A.H.C.Rinnooy I~an. D.B.Shmoys (eds.) The tmveling salesman problem John Wiley, Chichester, 198.5 [171-177]

[8] G.Righini, M.Trubian Worst-case analysis of two appro;rimate algorithms f01' the Asymmetric Trav­eling Salesman Problem to appear in European Journal of Operational Research

[9] S.Sahni, T.Gonzales P-complete problems and appro~timate solutions IEEE 15th Ann. Symp. on Switching and Automata Theory, 1974 [28-32]

42

Page 45: Approximation algorithms for the general and the ... · Approximation algorithms for the general and the asymmetric Stacker-Crane problems Citation for published version (APA):

5 Appendix

Stacker Crane Problem: Instance: a weighted mixed graph G( F, E, .4). where edges in E are unoriented and arcs in A are oriented, satysfying the follO\ving two conclitiolls: Q) all nodes in V are endpoint of exactly one arc; (3) all the edges satisfy the triangle inequalit.y. Question: find a minimum cost cycle on G. that traverses all arcs.

Algorithms LA and SA output eulerian spanning cycles. Such solutions can be made hamiltonian without worsening t.heir value. by postprocessing procedures that repeat­edly replace pairs of adjacent edges by a single edge, exploiting the Tl. For a more detailed description of the algorithms the reader is referred to [4] for LA and SA and to [8] for RT2.

5.1 Algorithm LA for the SCP

Input: a weighted mixed graph G(V, E . .4), satysfying condit.ions Q and ,8. Output: a hamiltonian cycle traversing all arcs.

Step 1: find the minimum weighted matching M; on an auxiliary bipartite graph K(T, H, EK ), where T is the set of nodes that are tails of arcs in A, H is the set of nodes that are heads of arcs in A and EK is made of all edges [i, j] of E such that i E T and j E H. A.f; can be computed in time polynomial in N by a linear assignment algorithm. The matching provides a lower bound on t.he variable cost of the minimum cycle HC:: (i) jl1~ < HC·

v - v The edges of M; and the arcs of A form a lIumber .s of subtours on G (fig.43).

Step 2: find the minimum cost edge set ST; connecting the sllbt.ollrs (fig.44). Since in every feasible solution all subsets of nodes must be connected, (ii) ST: ::; HC;

Step 3: duplicate the edges of ST;. Call Sv = AI; + '2ST; the resulting edge set. The edges of Sv and the arcs of A form a spanning eulerian cycle (fig.4.5). (iii) ECv = Sv = M; + 2ST:

From inequalities (i), (ii) and (iii) it follows:

ECv ::; 3HC;

and if total costs are considered

43

Page 46: Approximation algorithms for the general and the ... · Approximation algorithms for the general and the asymmetric Stacker-Crane problems Citation for published version (APA):

ECt :::; 3HC; - 2L

h , I I ..

~

Figure 4~~

Figure 44

fl.···· ~ ............. ..

I 'Y ---~

"

Figure 45

Remark. In this paper we consider algorithm LA in a slightly improved version: self­loops on arcs are not allowed when the minimum matching is looked for. Neither the worst-case bound nor the computationa.l complexit.y of the algorithm are altered by this assumption.

44

Page 47: Approximation algorithms for the general and the ... · Approximation algorithms for the general and the asymmetric Stacker-Crane problems Citation for published version (APA):

5.2 Algorithm SA for the SCP

Input: a weighted mixed graph Ci( V, E, A), satysfyillg condit.ions a and /3. Output: a hamiltonian cycle traversi ng rt II arcs.

Let us indicate by d,.w the cost of the generic edge [u, v] E E.

Step 1: define a complete unoriented graph Ol(\i, Ed, wit.h \:1 =.4 and edge weights Wij = min{dh;ti,dhjt;,dhokj,dt;ti}Vi,j E "i. Substit.ute the edge weights by the length of the shortest path between their endpoint.s, so that the TI holds on 0 1 , For the construction of 0 1 , it follows (i) HC; :S HC:.

Step 2: apply the algorithm of Christofides to graph 0 1 , obtaining an eulerian cycle EC1 ·

(ii) ECl :S ~HC;.

Step 3: consider the set 5 ma.de of the edges of 0 correspondent to the edges of ECl

plus all arcs of A plus a.ll edges [hi.l. i ] (figAG). Duplicate all the arcs and edges in S, obtaining the set 25 (figA7). 25 :S 2( EC\ + 2£). The set 25 can be traversed in two different and disjoint ways, both of which a.re eulerian spanning cycles of 0 (figA8). Choose the best of the two and call it EC. Then (iii) ECt :S H2S) :S ECl + 2L

From inequalities (i), (ii) and (iii) it follows

and when total costs are considered

45

Page 48: Approximation algorithms for the general and the ... · Approximation algorithms for the general and the asymmetric Stacker-Crane problems Citation for published version (APA):

I ,

"

/

Figure 46

Figure 47

Figure 48

4(j

Page 49: Approximation algorithms for the general and the ... · Approximation algorithms for the general and the asymmetric Stacker-Crane problems Citation for published version (APA):

5.3 Algorithm RT2 for the SCP

Input: a weighted mixed graph G( V, E, A), satysfying conditions (\' and {3. Output: a hamiltonian cycle traversing all arcs.

Let us indicate by duv the cost of the generic head-to-tail edge [11,11., tv] E E.

Step 1: define a complete unorientecl graph G\ ( \:1. Ed, wi til \:i = A and edge weights Wij = dij+dji+li+lj Vi,j E Vi, On G I t.he TI holds, since the relations dij ::; dile+11e+dlej and dji ::; djle + lie + dlti are implied by condi tion ,8 (fig,49). For the construction of GI , it follows HC; = (HCv + HC'vt + 2L ::; HC: + HC'; + 2L. Since for condition f3, dij ::; Ii + dji + tj , it follows that HC~ ::; HC: + 2L (fig .. 50). Therefore (i) HCi ::; 2HC~ + 4L.

Step 2: apply the algorithm of Christofic\es, which provides an hamiltonian cycle HCl .

(ii) HCI ::; ~HCi.

Step 8: define S t.o be the set of pairs of edges of G' corresponding to the edges of HCll

plus t"wo copies of each arc of A (fig.51). For the definition of weightsw, it follows that S = (HCI - 2L) + 2L = HCl . 5' can be trayersed in two disjoint ways; call HC the best of the two. HCt ::; ~S ~HCl and then (iii) HCv ::; ~HCl - L.

From inequalities (i), (ii) and (iii) it follo\\'s

and if total costs a.re considered

47

Page 50: Approximation algorithms for the general and the ... · Approximation algorithms for the general and the asymmetric Stacker-Crane problems Citation for published version (APA):

Figure 4H

Figure .50

Figure .51

48

elk> , J

Page 51: Approximation algorithms for the general and the ... · Approximation algorithms for the general and the asymmetric Stacker-Crane problems Citation for published version (APA):

5.4 Comparison and combination of algorithms

The worst-case bounds provided by a.lgorit.hms LA, SA and RT2 a.re of the form:

HC L 1] = -- < k+kL --HC· - HC*

In [4] it is shown that running algorit.hms SA and LA and taking the best of the two solutions found, gives a worst-case bound equal t.o 9/.5, when total costs are considered. We add the further observation that the \vorst.-case bound is 3 when only variable costs are considered and that such bound is given by algorithm LA alone. This can be seen from the graphical representation of t.he bounds in figures 5:3 and 54. An analogous combination of algorit.hms LA and RT2 gives a. const.ant. \vorst.-case bound equal to 15/7, when total costs are considered. Infact LA gives ECtLA :$ 3HC; - 2L and RT2 gives HCtRT2 :$ ~HC; + ~L. The bounds on the costs of the two solutions are equal when 3HC; - 2L = ~HC; + ~L, that. is when ~HC; = ~L, that is L = ~HC; and in such case the bound is gi ven by :UI C; - 2( ~ If C;) = 1; H C;.

Tables in figure 52 show the comparison bet\\'een the three bounds. The worst-case bound of algorithm SA dominates the one of algorit.hm RT2.

SCP 1] = ~ algorithm k kL

LA 3 0 SA 3/2 1

RT2 3/2 2

SCP 1] = ~ algorithm k kL

LA 3 -2 SA 3/2 1/2

RT2 3/2 3/2

Figure .1)2

49

Page 52: Approximation algorithms for the general and the ... · Approximation algorithms for the general and the asymmetric Stacker-Crane problems Citation for published version (APA):

EC v HC~ t RT2

I ,I / SA I ./ //

3 lir IT' -;:/~, /---­,I/J /' : f.' .

! / ' 3V,/' .

Q .... 1

o

EC l HC' l ..

!

1 3 2

Figure 53

RT2

y/ / SA

//

0'--' -:----- ........

Figure 54 .

50

LA