The Quadratic Travelling Salesman Problem: Complexity and Approximation

by

Brad Woods

M.Sc., Simon Fraser University, 2010 B.Math., University of Waterloo, 2007

Thesis Submitted in Partial Fulfillment of the Requirements for the Degree of Doctor of Philosophy

in the Department of Mathematics Faculty of Science

©Brad Woods 2018 SIMON FRASER UNIVERSITY Summer 2018

Copyright in this work rests with the author. Please ensure that any reproduction or re-use is done in accordance with the relevant national copyright legislation. Approval

Name: Brad Woods

Degree: Doctor of Philosophy (Operations Research)

Title: The Quadratic Travelling Salesman Problem: Complexity and Approximation

Examining Committee: Chair: Natalia Kouzniak Department of Mathematics Simon Fraser University

Abraham Punnen Senior Supervisor Department of Mathematics Simon Fraser University

Tamon Stephen Supervisory Committee Member Department of Mathematics Simon Fraser University

Binay Bhattacharya Supervisory Committee Member School of Computer Science Simon Fraser University

Ramesh Krishnamurti Internal Examiner School of Computer Science Simon Fraser University

Donglei Du External Examiner Faculty of Business Administration University of New Brunswick

Date Defended: July 12, 2018

ii Abstract

In this thesis we study the Quadratic Travelling Salesman Problem (QTSP) which gener- alizes the well-studied Traveling Salesman Problem and several of its variations. QTSP is to find a least cost Hamiltonian cycle in an edge-weighted graph, where costs are defined for all pairs of edges contained in the Hamilton cycle. This is a more general version than the one that appears in the literature as the QTSP, denoted here as the adjacent quadratic TSP, which only considers costs for pairs of adjacent edges. We give a complete character- ization of the QTSP linearization problem and give a polynomial time algorithm to find a linearization whenever one exists. The fixed-rank QTSP is introduced as a restricted version of the QTSP where the cost matrix has fixed rank p. We study QTSP by examining the complexity of searching exponential neighbourhoods for QTSP, the fixed-rank QTSP and the adjacent quadratic TSP. We develop pseudopolynomial time algorithms for many of these special cases, and give FPTAS whenever possible. Polynomial algorithms are given for each special case which is not NP-hard. Keywords: discrete optimization, combinatorial optimization, travelling salesman problem, quadratic travelling salesman problem

iii This thesis is dedicated to my parents.

iv Acknowledgements

I would first and foremost, like to thank my senior supervisor, Dr. Abraham Punnen. With- out his guidance, patience and support throughout my graduate career, this thesis would not have been possible. Dr. Punnen introduced this research topic to me, provided partial results and significant assistance in obtaining some of the results. In addition, I am thankful for the financial support provided through research assistantships. I would like to thank my supervisory committee members, Dr. Tamon Stephen and Dr. Binay Bhattacharya, for their helpful discussions, feedback and comments. Credit is due to Dr. Santosh Kabadi who made significant contributions to the results of Chapter 2. Also, I acknowledge the encouragement and support provided by Dr. Natalia Kouzniak and Dr. Randall Pyke of the Department of Mathematics, SFU Surrey. I owe thanks to everyone at SFU for their help, thoughtful discussions, and friendship. Thank you to all my colleagues in the SFU Optimization Graduate Student Lab, in par- ticular, Xiaorui Li, Pooja Pandey, Piyashat Sripratak, Timothy Yusun, and Yong Zhang. I acknowledge the coding help from Ziyang Zhao. Last, but not least, I would like to thank my friends and family. I could not have done this without your love and support.

v Table of Contents

Approval ii

Abstract iii

Dedication iv

Acknowledgements v

Table of Contents vi

List of Tables viii

List of Figures ix

1 The quadratic travelling salesman problem 1 1.1 Introduction ...... 1 1.2 The linear travelling salesman problem ...... 2 1.3 The quadratic TSP: Basic definitions and notations ...... 3 1.3.1 Instance representations ...... 4 1.3.2 Transforming the SQTSP ...... 5 1.3.3 Transforming the AQTSP ...... 6 1.3.4 Adjacent-only QTSP ...... 6 1.3.5 Fixed-rank QTSP ...... 7 1.4 Motivation ...... 7 1.5 Literature survey ...... 8 1.6 Contributions ...... 8

2 QTSP linearization 10 2.1 Introduction ...... 10 2.2 The QTSP linearization problem ...... 11 2.3 Simple sufficient conditions and extensions ...... 17

3 A class of exponential tours 19 3.1 Introduction ...... 19 3.2 Single edge ejection tours on G∗ ...... 20

vi 3.3 Double edge ejection tours on G∗ ...... 29 3.4 Paired vertex graphs ...... 34 3.5 Matching edge ejection tours ...... 38

4 Pyramidal tours 44 4.1 Introduction ...... 44 4.2 Pyramidal QTSP ...... 45 4.3 Undirected pyramidal QTSP ...... 49

5 Halin graphs 52 5.1 Introduction ...... 52 5.2 Notations and definitions ...... 52 5.3 Complexity results ...... 54 5.4 QTSP(A) ...... 58 5.5 Fixed-rank QTSP ...... 60 5.6 Multiplicative QTSP ...... 70

6 k-neighbour TSP on Halin graphs and extensions 72 6.1 Introduction ...... 72 6.2 Complexity results ...... 73 6.2.1 TSP(3) ...... 75 6.2.2 TSP(k) ...... 87 6.3 TSP(k) on fully reducible graph classes ...... 88

7 Approximation algorithms and domination analysis 89 7.1 Introduction ...... 89 7.2 Approximation algorithms ...... 89 7.2.1 Double- heuristic ...... 90 7.2.2 2-Opt local search ...... 92 7.3 Domination analysis ...... 94 7.4 Comparisons against the average ...... 95 7.4.1 Cheapest insertion ...... 96 7.4.2 2-Opt local search ...... 97 7.4.3 Derandomization method ...... 98

8 Conclusion 100

Bibliography 102

vii List of Tables

Table 3.1 Summary of complexity results...... 20

Table 6.1 Description of penalty 24-tuple stored at pseudonodes in C...... 80

viii List of Figures

Figure 1.1 Example graph Gb with n = 6 ...... 6 Figure 1.2 Optimal TSP tour with respect to length...... 8 Figure 1.3 Smoothing of the tour...... 8 Figure 1.4 A tour which can be travelled more quickly...... 8

ij Figure 2.1 Tours τ ∈ Tn−1 and τ ∈ Tn ...... 14

Figure 3.1 Example of a G∗ graph ...... 21 Figure 3.2 An SEE-tour in the graph G∗ given in Figure 3.1 ...... 21 Figure 3.3 Graph G∗ used in the proof of Theorem 3.2.1 ...... 22 Figure 3.4 Graph G∗ used in the proof of Theorem 3.2.2 ...... 23 Figure 3.5 G0 constructed from the graph G∗ given in Figure 3.1...... 24 Figure 3.6 A DEE-tour in the graph G∗ given in Figure 3.1 ...... 30 Figure 3.7 Construction of the graph G∗ used in the proof of Theorem 3.3.2 . 31 Figure 3.8 G0 constructed from the graph G∗ given in Figure 3.1 ...... 32 Figure 3.9 Example of an optimal expanded cycle D(3) ...... 34 Figure 3.10 Example of Gp ...... 34 Figure 3.11 Example of a tour τ in Gp used in the proof of Theorem 3.4.3 . . . 36 Figure 3.12 Example of a tour τ in Gp used in the proof of Theorem 3.4.4 . . . 37 Figure 3.13 G0 constructed from the graph Gp given in Figure 3.10 ...... 37 Figure 3.14 Example graph GM with r = 6 and s = 4 ...... 38 Figure 3.15 An MEE-tour in the graph GM given in Figure 3.14 ...... 39 Figure 3.16 Construction used in the proof of Theorem 3.5.1 ...... 40 Figure 3.17 Construction used in the proof of Theorem 3.5.5 ...... 42 Figure 3.18 An example of the construction used in the proof of Theorem 3.5.5 42

Figure 4.1 Construction of the graph G∗ used in the proof of Theorem 4.2.2 . 47 Figure 4.2 Construction of the graph G∗ used in the proof of Theorem 4.3.2 . 51

Figure 5.1 A Halin graph with 3 fans ...... 53 Figure 5.2 A Halin graph H containing fan F ...... 54 Figure 5.3 The 4-fan gadget ...... 55

Figure 5.4 Example of the Halin graph constructed from F = C1 ∧ C2 ∧ C3 ∧ C4 56

ix Figure 5.5 Example of a Halin graph G belonging to H(k, 1, 5) ...... 57 Figure 5.6 Example of a Halin graph in H(4, 2, ∆) used in the proof of Theo- rem 5.3.3 ...... 59

Figure 5.7 A tour τ in a wheel, which skips edge ci ...... 60 Figure 5.8 Example of a Halin graph constructed from an instance of PARTI- TION with n = 8...... 61

Figure 5.9 A tour τ in a wheel, which skips edge ci ...... 69

Figure 5.10 A wheel considered as fan Fci ...... 69

Figure 6.1 A Halin graph H with non-consecutive edges e and f at node x . . 74 Figure 6.2 A fan F with centre w ...... 77 Figure 6.3 A subgraph of H which becomes a fan ...... 79

Figure 6.4 A tour τ in a wheel, which skips edge ci ...... 86

Figure 6.5 A wheel considered as fan Fci ...... 86

Figure 7.1 Example showing the bound in Theorem 7.2.1 is tight ...... 91 Figure 7.2 Example showing that the bound in Theorem 7.2.3 is tight . . . . . 93

x Chapter 1

The quadratic travelling salesman problem

1.1 Introduction

E Given a finite set E, a collection F of subsets of E, and a real-valued function f : 2 → R, a combinatorial optimization problem is formulated as

Minimize f(S) Subject to S ∈ F.

F is often represented in a compact form, without explicitly listing its elements. An element of F is referred to as a feasible solution to the problem and F is the feasible set.

Let G = (V,E) be a graph (undirected or directed) and Tn be the set of all Hamiltonian P cycles (tours) in G. The combinatorial optimization problem where F = Tn and f = e∈τ ce for e ∈ E is called the travelling salesman problem (TSP) where ce is a prescribed weight of edge e ∈ E. To distinguish between the undirected and directed case, the former is referred to as the symmetric travelling salesman problem (STSP) and the latter, the asymmetric travelling salesman problem (ATSP). The TSP is one of the most widely-studied hard combinatorial optimization problems. It has been used to model a wide variety of applications in scheduling, manufacturing, genome sequencing and many others. Besides having many applications, the problem has attracted the attention of researchers because it has resisted many of the widely-applied algorithmic techniques. For details, we refer the reader to the well-known books [5, 19, 53, 74, 96]. For clarity of discussion, we will refer to this problem as the linear TSP. The TSP has maintained the interest of researchers for many years, and much work has been done to gain insight into the nature of the problem. Researchers have studied the problem from many angles, developing rich polyhedral theory [50, 51, 84, 85], exact and

1 heuristic algorithms [9, 24, 25, 36, 52, 76, 90, 105, 106], approximation algorithms [7, 22, 55, 54, 89] and polynomially-solvable specials cases of the TSP [4, 14, 15, 20, 21, 29, 48]. If the weights on the edges are either zero or one, the linear TSP determines whether or not a specific graph contains a Hamiltonian cycle. This problem is known as the Hamil- tonian cycle problem and is one of Karp’s original NP-complete problems [67]. It follows immediately that the linear TSP is strongly NP-hard. For any NP-hard combinatorial optimization problem, a natural question to ask is, “Under what conditions the problem NP-hard, polynomially approximable, or polynomi- ally solvable?” In this thesis, we conduct a study in terms of computational complexity and approximability, of a variation of the TSP called the quadratic travelling salesman prob- lem. We hope that this study brings more insight into our understanding of the quadratic travelling salesman problem and inspires further research on the topic.

1.2 The linear travelling salesman problem

Since the discovery of NP-completeness, researchers have been interested in finding near- optimal solutions for NP-hard problems. Sahni and Gonzalez [103] showed that for the linear TSP, finding a solution even within a factor (1+) of the optimal is NP-hard, for any  > 0. When the cost function satisfies the triangle inequality, termed the metric TSP, the 3 well-known Christofides’s heuristic gives a 2 bound. It has been shown that if P 6= NP , then no PTAS exists for the metric TSP. A more restricted version called the Euclidean TSP, however, admits PTAS [7]. If we do not restrict costs to be symmetric, we get the we obtain the more general asymmetric linear travelling salesman problem (ATSP). Recently, it has been shown that the ATSP under the triangle inequality can be approximated to within a constant factor [110], resolving a long-standing open problem. In addition to the graphical representation, there are two permutation representations for the linear TSP which are commonly used, which we will now discuss. Let Pn be the collection of permutations of the set {1, 2, . . . n}. Then the linear TSP is to find a Pn−1 π = (π(1), π(2), . . . , π(n)) ∈ Pn that minimizes cπ(n)π(1) + i=1 cπ(i)π(i+1). In this version, (π(1), π(2), . . . , π(n)) represents the order that the vertices are visited, starting at the vertex π(1). For example, the permutation (4, 5, 2, 3, 1) represents the tour that starts at vertex 4, visits vertices 5, 2, 3 and 1, in that order, and returns to vertex 4. This representation leads to a binary quadratic programming formulation of the linear TSP, and hence, is referred to as the quadratic permutation representation of the linear TSP.

The other representation uses only cyclic permutations. Let Sn be the collection of all cyclic permutations of the set {1, 2, . . . , n}. Then the linear TSP is to find a σ = Pn (σ(1), σ(2), . . . , σ(n)) that minimizes i=1 ciσ(i). In this version, σ(i) denotes the successor of i in the corresponding tour, for i = 1, 2, . . . , n. This representation leads to a linear binary

2 programming formulation, and hence, is referred to as the linear permutation representation of the linear TSP. The linear TSP is closely related to another well-known combinatorial optimization problem, the quadratic assignment problem (QAP). The general version of the QAP was introduced by Lawler [73]. It is formulated as

n n X X Minimize qiπ(i)jπ(j) i=1 j=1

Subject to π ∈ Pn.

Introducing binary variable xij, for every i, j, to indicate vertex i is visited in position j of the tour, a cyclic permutation matrix T = (tij), and setting qijkl = cijtkl, the quadratic permutation representation yields the following binary quadratic formulation of the linear TSP

n n n n X X X X Minimize qijklxikxjl i=1 j=1 k=1 l=1 n X Subject to xij = 1 ∀j = 1, 2, . . . , n i=1 n X xij = 1 ∀i = 1, 2, . . . , n j=1

xij ∈ {0, 1}.

This formulation is precisely a QAP and hence, the linear TSP can be formulated as a QAP. In this thesis we investigate the quadratic travelling salesman problem, which is a special case of QAP and a generalization of the linear TSP.

1.3 The quadratic TSP: Basic definitions and notations

If in the QAP feasible solutions are restricted to only cyclic permutations, we have the quadratic travelling salesman problem (QTSP). Note that, given various non-approximability results on QAP [86, 94, 103], we do not expect meaningful approximation results on the general form of the QTSP. The QTSP can also be defined using a graph representation. Let G = (V,E) be a graph (undirected or directed) on the vertex set V = {1, . . . , n} and edge set E = {1, 2, . . . , m}.

For each edge e ∈ E, a nonnegative cost ce is given. Also, for each pair of edges {e, f}, another cost qef is prescribed. The cost q(τ) of a tour τ ∈ Tn is given by

X X q(τ) = qef + ce. (e,f)∈τ×τ e∈τ

3 Then the QTSP, is to find a tour τ ∈ Tn such that q(τ) is as small as possible. Recall that

Tn is the family of all Hamiltonian cycles in G. Note that by setting qef = 0 for all e, f, the QTSP is an instance of the linear TSP, and hence the linear TSP is a special case of the QTSP. It follows directly that the QTSP is strongly NP-hard. Moreover,

Theorem 1.3.1. Unless P = NP , there is no polynomial-time -approximation algorithm for the QTSP for any  > 0.

1.3.1 Instance representations

Hereafter, unless otherwise stated, we assume that G is a complete graph. Then,

AQTSP(Q,C) denotes an AQTSP on quadratic cost matrix Q = (qef ), e, f ∈ E with E the edge set {(1, 2), (1, 3),..., (1, n), (2, 1) ..., (n, n − 1)} and linear cost matrix C = (cij), i, j ∈ V with V the vertex set {1, 2, . . . , n}. For edges e = (i, j) and f = (k, l), we may use the notation qijkl to mean qef and vice-versa. Note that the assumption that G is complete is without loss of generality since a large costs can be associated with edges which do not belong to G. The coefficients qijil with j 6= l, the coefficients qijkj with i 6= k and the coefficients qijji can never occur in the objective function since τ is a tour. These elements of the matrix Q are called irrelevant elements since they play no role in the optimization problem. For example, the pairs of directed edges (1, 2) and (1, 3), (2, 1) and (3, 1), and

(1, 2) and (2, 1) cannot belong to any tour, and hence, the costs q1213, q2131 and q1221 are irrelevant. Therefore, for definiteness, we assume that qijkl = 0 for (i = k and j 6= l) or (i 6= k and j = l) or (i = l and j = k) for all quadratic cost matrices Q discussed hereafter. All matrices are represented using capital letters (sometimes with superscripts, hats, overbars, etc.) and all elements of the matrix are represented by corresponding subscripted lower-case letters (along with corresponding superscripts, hats, overbars, etc.) where the subscripts denoting row and column indices. When the rows and columns are indexed by elements of N × N, the ((i, j), (k, l))th element of the matrix Q is represented by qijkl, of R R Q by qijkl, etc. The vector space of all real valued n × n matrices with standard matrix n n(n−1) addition and scalar multiplication is denoted by M . Thus M is the vector space of all n(n − 1) × n(n − 1) matrices. ij n For any i, j ∈ {1, 2, . . . , n}, i 6= j define C ∈ M such that

 ij 0 if (i, j) = (u, v), cuv = qijuv if (i, j) 6= (u, v), and D ∈ n such that M  0 if i = j, dij = qijij if i 6= j.

4 P For any linear cost matrix C, define C(τ) = (i,j)∈τ cij. Then the total cost of a tour can be written as a linear cost.

q(τ) = X Cij(τ) + C(τ) + D(τ) (i,j)∈τ   X ij =  C + C + D (τ). (i,j)∈τ

However, we note that this linear cost matrix depends on the tour τ.

SQTSP(Q,C) denotes a SQTSP on quadratic cost matrix Q = (qef ), e, f ∈ E with E the edge set {(1, 2), (1, 3),..., (1, n), (2, 3) ..., (n − 1, n)} and upper triangular linear cost matrix C = (cij), i, j ∈ V with V the vertex set {1, 2, . . . , n}. Note that in the SQTSP, rows of Q are indexed by undirected edges and since every pair of edges belongs to some tour, there are no irrelevant entries in Q. For example, the pair of edges (1, 2), (1, 3) belongs to the tour 1 − 3 − 4 − 5 − ... − n − 2, and hence, q(1,2)(1,3) is not irrelevant.

1.3.2 Transforming the SQTSP

It is well-known that the linear ATSP can be reformulated as a linear STSP and vice-versa. We now establish a similar relationship between the AQTSP and the SQTSP. We propose to transform the SQTSP(Q, C) into an AQTSP on the quadratic cost matrix

  Q Q Qe =   Q Q with the row (column) labels such that the first n(n − 1)/2 rows (columns) are indexed by the directed edges from the set {(1, 2), (1, 3),..., (n − 1, n)}, and the last n(n − 1)/2 rows (columns) are indexed by the directed edges from the set {(2, 1), (3, 1),..., (n, n − 1)} together with linear cost matrix Ce = C + CT .

For every tour τ˜ in the complete directed graph on n nodes, Ge, we can construct a tour τ ∈ G which has the same cost by removing the orientation of the edges. Since, for any i, j ∈ V , only one of (i, j) and (j, i) may belong to τ˜, it is clear that τ has the same cost. For every tour τ ∈ G, we can construct a tour τ˜ ∈ Ge of the same cost by assigning an orientation to τ. This completes the proof of the following theorem.

Theorem 1.3.2. Any optimal solution of AQTSP(Qe,Ce) corresponds to an optimal solution of SQTSP(Q,C).

5 1.3.3 Transforming the AQTSP

We propose to transform the AQTSP(Q,C) into a SQTSP on the complete undirected graph with vertex set {1, 2, . . . , n, n + 1,..., 2n}. Let S = {(i, n + j) : 1 ≤ i < j ≤ n}. Consider the quadratic cost matrix Qb = (ˆqijkl) where

 qi(j−n)k(l−n) if 1 ≤ i, k ≤ n < j, l ≤ 2n, qˆijkl = 0 Otherwise, and the linear cost matrix Cb = (ˆcij) where

  −M if j = i + n,  cˆij = 0 if 1 ≤ i ≤ n < j ≤ 2n, j 6= i + n,   ∞ Otherwise.

Note that every tour in the complete undirected graph on 2n nodes, Gb, with finite cost con- sists of the edges {(i, n+i): i = 1, 2, . . . , n} together with n edges from S. Clearly there is a one-to-one correspondence between these SQTSP(Qb,Cb) and the solutions of AQTSP(Q,C). One must delete the nodes with index greater than n from the SQTSP(Qb,Cb) solution and add n · M to its cost in order to obtain the corresponding solution for AQTSP(Q,C) and its cost. This completes the proof of the following theorem.

6 n + 6

5 n + 5

4 n + 4

3 n + 3

2 n + 2

1 n + 1

Figure 1.1: Example graph Gb with n = 6. The cycle τˆ = (1, n + 3, 3, n + 4, 4, n + 6, 6, n + 2, 2, n + 5, 5, n + 1) corresponding to τ = (1, 3, 4, 6, 2, 5) is shown.

Theorem 1.3.3. Any optimal solution of SQTSP(Qb,Cb) corresponds to an optimal solution of AQTSP(Q,C).

1.3.4 Adjacent-only QTSP

A special case of QTSP has been studied by various authors recently [38, 39, 41, 42, 63, 99] where qef is assumed to be zero if edges e and f are not adjacent. Although this restricted

6 problem is known as the quadratic TSP in literature, to distinguish it from the general problem, we refer to it as the adjacent quadratic TSP, which we denote by QTSP(A).

Wherever convenient, we use the notation qijk to represent the cost qijjk. Since the linear TSP is a special case of QTSP(A), it follows that QTSP(A) is strongly NP-hard.

1.3.5 Fixed-rank QTSP

Let Q be the m by m matrix with (e, f)th element qef , for e, f ∈ E. If the rank of Q is p, then by using the rank decomposition of Q = AB (where the rows of A are the vectors ah and the columns of B are the vectors bh, for h = 1, . . . , p), QTSP can be written in another form as

p " ! !# X X h X h X Minimize q(τ) = ae be + ce h=1 e∈τ e∈τ e∈τ

Subject to τ ∈ Tn.

For the general QTSP, we can eliminate the linear term by adding ce to qee. However, for the rank-restricted case, we need to consider the linear term explicitly since adding ce to qee could change the rank. The variation where the linear term is absent is called the homogeneous rank p QTSP which is denoted by QTSP(p,H) and the general rank p QTSP is denoted by QTSP(p,c). It is easy to verify that QTSP(p,c) belongs to the class QTSP(p+1,H). Since TSP is a special case of QTSP(p,H) and QTSP(p,c), it follows immediately that these problems are strongly NP-hard.

1.4 Motivation

For some applications, more than linear combinations of distances between consecutive nodes are desirable in formulating an objective function. Consider the problem of deter- mining an optimal routing of an unmanned aerial vehicle (UAV) which has a list of targets at specific locations. This can be modelled as a TSP which requires a tour that minimizes the distance travelled. However, such a model neglects to take into account the physical limitations of the vehicle, such as turn radius or momentum. To illustrate this idea, in Fig- ure 1.2 we give a , in Figure 1.3 we give the corresponding flight path, and Figure 1.4 shows a route which is longer but can be travelled at a greater speed and hence reducing the overall travel time. To model the traversal time, we can introduce penalties for pairs of (not necessarily adjacent) edges to force a smooth curve for its traversal.

7 Figure 1. Optimal TSP tour.

start

Figure 1. OptimalFigure TSP tour. 2. Smoothing of the optimal TSP tour. start start

FigureFigure 1. 1.2:Optimal Optimal TSP TSP tour. Figure 3. A routeFigure which 1.4: can A tour be travelled which more quickly. tour with respectFigure to 2. FigureSmoothing 1.3: Smoothingof the optimal of can TSP be tour. travelled more start length. the tour. start quickly.

1.5 Literature survey

Due to the difficult nature of the problem, QTSP has received limited attention in literature. Jäger and Molitor [63] encountered QTSP(A) while studying the Permuted Variable Length Markov Model for a given set of DNA sequences. The problem is important in bioinformatics and genome research as the problem for the computational recognition of Figure 2. Smoothing of the optimal TSP tour. transcription factorFigure binding 3. sitesA route can which be solved can be as travelled QTSP(A). more QTSP(A) quickly. is also easily seen start to be a generalization of the Angular-Metric TSP [3], by selecting the quadratic costs to be the angle between pairs of edges, and the TSP with reload costs. Several heuristics are proposed and compared in [41, 63] as well as1 a branch and bound algorithm for QTSP(A) in [41]. A column generation approach to solve QTSP(A) is given in [98], lower bounding procedures discussed in [99], and polyhedral results were reported by Fischer and Helmberg [42], Fischer [37], and Fischer and Fischer [40]. Algorithms for maximization and minimization versions of QTSP(A) have been studied by Staněk [109]

Figureand 3. A Oswin route et which al. [83]. can be travelled more quickly. Combinatorial optimization problems with the objective function as the product of two linear functions has been studied by Goyal et al. [49] and Kern and Woeginger [69]. Mittal and Schulz [78] considered a further general class of problems that subsumes combinatorial optimization problems fixed sum of product1 of linear terms. Thus, QTSP(1,H) falls under the general class considered in [49, 69] and QTSP(p,c) falls under the class considered in [78]. However, the corresponding results are not applicable to QTSP(p,c) because the conditions imposed in deriving their results are not applicable to QTSP(p,c), even if p = 1.

1.6 Contributions

Despite the vast amount of work on the linear TSP, the QTSP has not received much atten- tion in the literature. This is the primary motivation of this work. We investigate the QTSP, 1 the fixed-rank QTSP and the adjacent-only QTSP. Our focus is on examining exponential

8 neighbourhoods, rather than to find polynomially solvable special cases. Summarized below are the main contributions of the thesis: 1. The linearization problems for quadratic combinatorial optimization problems which have a linear analogue have received attention recently, since any family of linearizable cost matrices can be used to obtain strong reformulations. The QTSP linearization problem is studied in Chapter 2. We give necessary and sufficient conditions for a quadratic cost matrix associated with QTSP being linearizable. We show that these conditions can be verified in O(n7) time and an O(n7) time algorithm is presented to construct a linearization of Q whenever one exists.

2. The complexity of searching a class of exponential neighbourhoods is investigated in Chapter 3. We examine exponential neighbourhoods that are studied in the literature for the linear TSP which are known to be polynomially solvable and introduce a previously unstudied exponential neighbourhood. We examine the QTSP, QTSP(p, H) and QTSP(A) objective functions for these neighbourhoods. We give complexity results, FPTAS, pseudo-polynomial and polynomial algorithms whenever possible. These results can be used in the development of very-large neighbour neighbourhood search algorithms.

3. The QTSP restricted to Pyramidal tours is studied in Chapter 4. We give a pseudo- polynomial algorithm and FPTAS for the QTSP(p,c) objective function, and poly- nomial algorithm for the QTSP(A) objective function, for both the undirected and directed versions of the problem.

4. In Chapter 5 we give complexity results on Halin graphs as well as a parametrization of Halin graphs. We give an FPTAS for QTSP(p,c) restricted to tours in a Halin graph, and as a biproduct, obtain a pseudo-polynomial time algorithms for the exact multiple choice knapsack probem and the equality-constrained linear TSP on Halin graphs.

5. We study another version of the QTSP in Chapter 6 where the non-zero quadratic costs are restricted to edges which have a shortest path distance below a given number k, referred to as the k-neighbour TSP. We give a linear time algorithm which solves the 3-neighbour TSP on Halin graphs. We conclude this chapter by presenting some notations used in this thesis. Let N = n {1, 2, . . . , n} and Ni = N \{i} for i ∈ N. Vectors in R are represented by bold lower-case letters (sometimes with superscripts, hats, overbars, etc.). The ith component of vector a is ai, of vector b¯, is ¯bi etc. Rows and columns of all matrices of size n × n are indexed by N whereas rows and columns of all n(n − 1) × n(n − 1) matrices are indexed by edges of G. (i.e. by ordered pairs (i, j) ∈ N × N, i 6= j.) The transpose of a matrix Q is represented by QT .

9 Chapter 2

QTSP linearization

2.1 Introduction

Let G = (V,E) be a graph (directed or undirected) on the vertex set V = {1, . . . , n}. For each pair (e, f) of edges in E, a cost qef is prescribed. Let Tn be the set of all Hamiltonian P cycles (tours) in G. The quadratic cost Q[τ] of a tour τ ∈ Tn is given by Q[τ] = qef . (e,f)∈τ×τ For the rest of this chapter, unless otherwise stated, we assume that G is a complete directed graph. Let Q = (qef ) be the matrix of size n(n−1)×n(n−1) that consists of the cost of the edge pairs. Note that (e, e) is a permitted pair. An instance of QTSP is completely specified by Q. The matrix Q is said to be tour-linearizable (or simply linearizable) if there exists a matrix C = (cij) of size n × n such that Q[τ] = C(τ) for all τ ∈ Tn, where P C(τ) = (i,j)∈τ cij. Such a cost matrix C is called a linearization of Q for the QTSP. The QTSP linearization problem can be stated as follows: “Given an instance of QTSP with cost matrix Q, verify if it is linearizable and if yes, compute a linearization C of Q”. When n = 3, every matrix Q is linearizable. This can be easily seen by noting that such

G contains exactly two edge-disjoint tours, τ1 = (1, 2, 3) and τ2 = (3, 2, 1). That is, the conditions on the matrix C to be a linearization of Q are exactly two equality constraints with 6 variables, Q[τ1] = C(τ1) and Q[τ2] = C(τ2); a system of equalities which always has a solution. It may be noted that since (the decision versions of) the QTSP and the TSP are both NP-complete problems, there exists a polynomial-time reduction from one problem to the other. We are not attempting to find a reduction from QTSP to TSP for some special cases, although such a result is a byproduct. The question of linearization is more involved and requires the development of structural properties of linearizable matrices. For the QTSP, there is no immediate certificates for linearizability or non-linearizability of matrices. Hence, even containment of the linearization problem in NP or coNP is challenging. Linearization problems have been studied in the literature for various quadratic combi- natorial optimization problems [2, 16, 27, 26, 66, 75, 91, 93, 62, 61] and polynomial-time algorithms are available in all these cases. Unfortunately, the simple characterization estab-

10 lished for quadratic spanning trees [26] and for various bilinear type problems [16, 27, 75] do not seem to extend to the case of QTSP. The characterization of linearizable instances of the quadratic assignment problem studied in [66] have some similarities to the case of QTSP that we study here. However, to solve the linearization problem for QTSP one needs to over- come more challenges, which makes it an interesting and relevant problem to investigate. A family of linearizable cost matrices can be used to obtain strong continuous relaxations of quadratic 0-1 integer programming problems, as demonstrated in [61, 93]. Strong reformu- lations of quadratic 0-1 integer programming problems are reported in [11, 87] exploiting linear equality constraints. Moreover, strong reformulations of quadratic 0-1 integer pro- gramming using quadratic equality constraints are reported in [45]. As observed in [93], linearizable cost matrices immediately give redundant quadratic equality constraints and, exploiting the results of [45], strong reformulations of quadratic combinatorial optimization problems can be obtained. Further, since linearizable cost matrices for any quadratic com- binatorial optimization problem form a linear subspace of the space of all n(n−1)×n(n−1) matrices, any basis of this subspace can be used to obtain strong reformulations [93]. With this motivation, we study the QTSP linearization problem in this chapter. Neces- sary and sufficient conditions are presented for a quadratic cost matrix Q associated with QTSP being linearizable. We show that these conditions can be verified in O(n7) time. Also, an O(n7) algorithm is presented to construct a linearization of Q whenever one exists. However, it may be noted that the input size of a general QTSP is O(n4) and hence the complexity of our algorithms is lower than a quadratic function of this input size in the gen- eral case. Our characterization extends directly to the case of complete undirected graphs. Some easily verifiable sufficient conditions for linearizability are also given along with some open problems. The terminology “linearization” has also been used in a different context where a quadratic integer program is written as a linear integer program by adding new variables and constraints [1, 47]. We want to emphasize that the concept of linearization used in this paper is different.

2.2 The QTSP linearization problem

Let us first introduce some general properties and definitions used in the paper. A matrix n C ∈ M satisfy constant value property (CVP) if there exists a constant K such that C(τ) = K for all τ ∈ Tn. A matrix C is said to be a weak sum matrix if there exists vectors n a, b ∈ R such that cij = ai + bj for i, j ∈ N, i 6= j.

n Lemma 2.2.1. [10, 43, 64, 65] A matrix C ∈ M satisfies CVP if and only if it is a weak sum matrix (i.e. cij = ai + bj for all i, j ∈ N). Further, the constant value of tours is given P by i∈N (ai + bi).

11 1 2 n(n−1) Two matrices Q and Q ∈ M are equivalent modulo a linear matrix (EMLM) if 1 2 n Q [τ] = Q [τ] + C(τ) ∀ τ ∈ Tn and some C ∈ M .

n(n−1) Lemma 2.2.2. Let Q ∈ M . Then the following statements are equivalent. 1. Q is linearizable.

2. QT is linearizable.

1  T  3. 2 Q + Q is linearizable.

4. Q + D + S is linearizable, where D is any diagonal matrix and S is any skew- symmetric matrix of same dimension as Q.

5. Any matrix equivalent to Q modulo a linear matrix is linearizable. The proof of the lemma follows easily by noting that: the contribution to the objec- tive function value from a pair of edges does not depend on the order that the edges are n(n−1) considered and every diagonal matrix D ∈ M has a straightforward linearization. n n(n−1) Recall that a matrix C ∈ M is a linearization of Q ∈ M if Q[τ] = C(τ) for all τ ∈ Tn. In this case we say that Q is a quadratic form of C and that the matrix Q n(n−1) is linearizable. Note that the sum of two linearizable matrices in M is linearizable and the scalar multiple of a linearizable matrix is linearizable. Hence, the collection of all n(n−1) n(n−1) linearizable matrices in M forms a subspace of M . To characterize linearizability of Q, working with the original Q matrix seems tedious because of several reasons. For example, as Lemma 2.2.2 indicates, we can add any skew- symmetric matrix to Q which maintains the linearizability. So, it is important to restrict Q in an appropriate way to bring some kind of uniqueness while the generality is maintained. n(n−1) For this purpose, we introduce the quadratic reduced form. A matrix Q ∈ M is said to be in quadratic reduced form if all of the following conditions are satisfied: 1. Q is symmetric

2. The diagonal elements of Q are zeros

3. All elements of Q with rows and columns indexed by {(n, p), (p, n): p ∈ Nn} are zeros. Let us now prove a useful decomposition theorem.

n(n−1) R Theorem 2.2.3. Any matrix Q ∈ M can be decomposed into a pair (Q ,L) of matri- R n(n−1) n R ces such that Q ∈ M is in quadratic reduced form, L ∈ M and Q[τ] = Q [τ] + L(τ) for all τ ∈ Tn.

Proof. Let Q˜ and L˜ be defined as

 qijkl − qijkn − qijnl − qinkl + qinkn + qinnl − qnjkl + qnjkn + qnjnl if i, j, k, l 6= n q˜ijkl = 0 otherwise

12 and

n−1 P  (qijkn + qijnk + qknij − qknin − qknnj + qnkij − qnkin − qnknj) if i 6= j ˜lij = k=1 0 otherwise.

It can be verified that all entries of rows and columns of Q˜ indexed by (n, p) or (p, n) for p ∈ Nn are zeros. Further, with some algebra, it can be verified that Q˜ is equivalent to Q modulo the linear matrix L˜. Thus from Lemma 2.2.2, Q is linearizable if and only ˜ n(n−1) if Q is linearizable. Let D ∈ M be the diagonal matrix with dijij =q ˜ijij. Define R 1 ˜ ˜T n ˜ Q = 2 (Q + Q ) − D and choose L ∈ M such that lij = lij + dijij. From the discussions R R above and Lemma 2.2.2 we have Q[τ] = Q [τ] + L(τ) for all τ ∈ Tn and Q is in quadratic reduced form.

The matrix QR constructed in the proof of Theorem 2.2.3 is referred to as the quadratic reduced form of Q. It may be noted that the quadratic reduced form a matrix Q need not be unique. The decomposition (QR,L) of Q is refereed to as quadratic reduced form decomposition or simply QRF decomposition. The proof of Theorem 2.2.3 provides one way of constructing a QRF decomposition of Q. It may be noted that equivalent transformations discussed in [13, 66] in the context of the quadratic assignment problem can be modified appropriately to get another method for constructing a QRF decomposition.

n(n−1) R Theorem 2.2.4. Let Q ∈ M and (Q ,L) be a QRF decomposition of Q. Then Q is R n R linearizable if and only if Q is linearizable. Further, if P ∈ M is a linearization of Q then P + L is a linearization of Q.

R R Proof. Since (Q ,L) is a QRF decomposition of Q, Q[τ] = Q [τ] + L(τ) for all τ ∈ Tn. From Lemma 2.2.2, Q is linearizable if and only if QR linearizable. If P is a linearization of R Q it follows that Q(τ) = (P + L)(τ) for all τ ∈ Tn.

Thus to study the linearization problem of Q, it is enough to study the linearization problem of QR, a quadratic reduced form of Q. The lemma below is a variation of a corre- sponding result proved in [66] for the quadratic assignment problem. Since it is used in our main theorem, a complete proof within the context of QTSP is given below.

R n(n−1) Lemma 2.2.5. Suppose Q ∈ M is linearizable and is in quadratic reduced form. R Then there exists a linearization C of Q such that cin = 0 and cni = 0 for all i ∈ Nn.

0 R P 0 Proof. Suppose C is some linearization of Q . Let α = i∈Nn cin/(n − 2) and β = P 0 0 0 i∈Nn cni/(n − 2). Define ai = −cin + β, bi = −cni + α for all i ∈ Nn; an = −α, bn = −β 0 P 0 and cij = cij + ai + bj for all i, j. Then i∈N (ai + bi) = 0 and hence C(τ) = C (τ) for all τ ∈ Tn. Now it can be verified that cin = cni = 0 for all i ∈ Nn. This proves the lemma.

13 Let Q¯ be the principal submatrix obtained from QR by deleting rows and columns ¯ (n−1)(n−2) indexed by the elements of the set {(n, p), (p, n): p ∈ Nn}. Note that Q ∈ M . For ij n−1 any i, j ∈ Nn, i 6= j define Z ∈ M such that  ij 0 if (i, j) = (u, v), zuv = (2.1) q¯ijuv if (i, j) 6= (u, v).

Our next theorem provides a characterization of linearizability of a matrix in quadratic reduced form.

Theorem 2.2.6. Let QR be in quadratic reduced form and n ≥ 4. Then QR is linearizable if and only if there exists {fij ∈ R : i, j ∈ Nn, i 6= j} such that ij k` 1 1. for any τ ∈ Tn−1, Z (τ) − Z (τ) = 2 (fij − fkl) for all (i, j), (k, `) ∈ τ, and n−2 ¯ (n−1)(n−2) n−1 2. n−3 F is a linearization of Q ∈ M , where the (i, j)th element of F ∈ M is fij. Proof. Suppose QR is linearizable. Let C be a linearization of QR satisfying the condition of Lemma 2.2.5 and let C0 be the submatrix obtained from C by deleting its nth row and column. Choose fij = cij for all i, j ∈ Nn, i 6= j and we will show that this choice of fij satisfies the conditions of the theorem. Consider any τ ∈ Tn−1. For any (i, j) ∈ τ we define ij the tour τ ∈ Tn obtained by deleting arc (i, j) from τ and introducing arcs (i, n) and (n, j) (See Figure 2.1).

n

i j i j

ij Figure 2.1: Tours τ ∈ Tn−1 (shown on the left) and τ ∈ Tn (shown on the right) with n = 8.

R ij ij ij 0 R Note that Q [τ ] = Q¯[τ] − 2Z (τ) and C(τ ) = C (τ) − cij. But Q [τij] = C(τij). Thus we obtain, 1   Zij(τ) = Q¯[τ] − C0(τ) + c (2.2) 2 ij Similarly, for (k, `) ∈ τ,

1   Zk`(τ) = Q¯[τ] − C0(τ) + c (2.3) 2 k` Subtracting (2.3) from (2.2) we have

14 1 Zij(τ) − Zk`(τ) = (f − f ) 2 ij kl which is precisely condition 1. Now, adding (2.2) for all (i, j) ∈ τ, we have

1   1 h i Q¯[τ] = X Zij(τ) = X Q¯[τ] − C0(τ) + c = (n − 1)Q¯[τ] − (n − 2)C0(τ) 2 ij 2 (i,j)∈τ (i,j)∈τ

¯ n−2 0 ¯ n−2 0 which implies Q[τ] = n−3 C (τ). Thus Q is tour-linearizable and n−3 C (τ) is a lineariza- tion.

Conversely, suppose QR satisfies conditions (1) and (2) of the theorem. We will show R n that Q is tour-linearizable. Define the matrix C ∈ M such that

 fij if i, j ∈ Nn, cij = (2.4) 0 otherwise.

Let C0 be the principal submatrix obtained from C by deleting its nth row and column.

From condition (1) of the theorem, for any tour τ ∈ Tn−1 and (i, j), (k, `) ∈ τ

ij 2Z (τ) = cij + φ(τ) (2.5)

k` ¯ n−2 0 where φ(τ) = 2Z (τ) − ck`. From condition (2), for any τ ∈ Tn−1, Q[τ] = n−3 C (τ) which implies,

(n − 1)Q¯[τ] − 2Q¯[τ] − (n − 2)C0(τ) = 0

i.e. (n − 1)Q¯[τ] − X 2Zij(τ) − (n − 2)C0(τ) = 0 (2.6) (i,j)∈τ Substituting equation (2.5) in (2.6), we get

X 0 (n − 1)Q¯[τ] − [cij + φ(τ)] − (n − 2)C (τ) = 0 (i,j)∈τ

i.e. (n − 1)Q¯[τ] − C0(τ) − (n − 1)φ(τ) − (n − 2)C0(τ) = 0 which implies φ(τ) = Q¯[τ] − C0(τ) (2.7)

Substituting equation (2.7) in (2.5), we have, for any (i, j) ∈ τ

ij 0 2Z (τ) = cij + Q¯[τ] − C (τ) (2.8)

15 ij ij Now, consider any tour τ ∈ Tn where i and j are the nodes adjacent to n in τ . Without ij 0 loss of generality assume i → n → j is a path in τ . Let τ be the tour in Tn−1 obtained from τ ij by shortcutting the path i → n → j using arc (i, j). Then,

QR[τ ij] = Q¯[τ 0] − 2Zij(τ 0) 0 h 0 0 0 i = Q¯[τ ] − cij + Q¯[τ ] − C (τ ) 0 0 ij = C (τ ) − cij = C(τ ), establishing that QR is linearizable with C as a linearization.

Theorem 2.2.7. The QTSP linearization problem can be solved in O(n7) time. Further, a linearization of Q can be constructed in O(n7) time whenever it exists.

Proof. Given Q, its QRF decomposition (QR,L) can be obtained in O(n4) time using the construction of Theorem 2.2.3. We now test the linearizability characterization of QR given in Theorem 2.2.6. Let ∆ = {[(i, j), (k, `)] : i, j, k, ` ∈ Nn, k 6= i, j 6= `, (i, j) 6= (j, i), i 6= j, k 6= `}. To verify condition (1) of Theorem 2.2.6 and construct the linearization, if exists, we ij k` 1 have to find fij, (i, j) ∈ Nn, i 6= j such that for any τ ∈ Tn,Z (τ) − Z (τ) = 2 (fij − fkl) for all (i, j), (k, `) ∈ τ. This is achieved by first testing if the matrix P ijk` = Zij − Zkl satisfies CVP. If it does not satisfy CVP for any [(i, j), (k, `)] ∈ ∆ then condition (1) of

Theorem 2.2.6 is not satisfied. If CVP is satisfied for all [(i, j), (k, `)] ∈ ∆, let ηijk` be the constant value of tours obtained for the matrix P ijk`. Now we need to solve the system

fij − fk` = 2ηijk` for all [(i, j), (k, `)] ∈ ∆ (2.9)

If the system is inconsistent, condition (1) of Theorem 2.2.6 is not satisfied. Thus, given ηijk`, the system (2.9) can be solved efficiently in O(|∆|) = O(n4) time [8]. Using the well-known 2 characterization of TSP with CVP [10, 43, 64, 65] each ηijk` value can be obtained in O(n ) time. Thus the overall complexity of verifying condition (1) of Theorem 2.2.6 is O(n6). If condition (1) is satisfied, then we need to verify condition (2). This is achieved by testing if ¯ n−2 ¯ Q is linearizable and if yes, then we need to test if n−3 F is one of the linearizations. If Q is not linearizable then condition (2) fails. Suppose H is a linearization of Q¯. Then, to verify n−2 n−2 if n−3 F is another linearization, it is enough to verify if the matrix H − n−3 F satisfies CVP with the constant tour value equal to zero. Given H, this can be achieved in O(n2) time. Thus the problem of testing linearizability of Q reduces to that of testing linearizability of Q¯ which has the size parameter n reduced by one along with an additive O(n6) effort. Thus, if g(n) is the complexity of testing linearizability of Q, we have g(n) = g(n − 1) + O(n6) establishing g(n) = O(n7).

16 To obtain the linearization, using F construct the matrix C as discussed in the proof of Theorem 2.2.6. Then C + L is the required linearization of Q where L is provided by the QRF decomposition (QR,L) of Q.

2.3 Simple sufficient conditions and extensions

The complexity of testing linearizability of Q, although is polynomial, the high degree of it imposes limits on applicability outside the theoretical realm. In this section we present some sufficient conditions for linearizability that can be easily verified. n The cost matrix C ∈ M associated with a linear TSP on a complete directed graph on n nodes satisfies the (k, `)-constant value property ((k, `)-CVP) if all tours containing the edge (k, `) have the same cost.

n Lemma 2.3.1. A cost matrix C ∈ M satisfies (k, `)-CVP if and only if there exist ai ∈ Nk and bi ∈ N` such that cij = ai + bj for all i, j ∈ N, i 6= j, i 6= k, j 6= `. Further the constant value of the tours is given by c + P a + P b . k` i∈Nk i i∈N` i

n 0 Proof. Suppose C ∈ M satisfies (k, `)-CVP and let C be the matrix obtained from C by deleting row k and column `. The forward direction follows immediately from ob- serving Lemma 2.2.1 with respect to C0. To show the reverse direction, consider C(τ) = P c = c + P (a + b ) = c + P a + P b , which is constant (i,j)∈τ ij kl (i,j)∈τ,(i,j)6=(k,l) i j kl i∈Nk i i∈Nl i for any fixed k, l.

The proof of this lemma can be obtained by making use of the characterization of matrices satisfying CVP on complete digraphs. For each row indexed by (i, j) of Q, define ij n R ∈ M by  ij qijuv if u 6= v ruv = (2.10) 0 otherwise.

Lemma 2.3.2. If Rij satisfies (i, j)-CVP for all (i, j) ∈ N ×N, i 6= j then Q is linearizable. n Further, if L ∈ M is a linearization then lij is equal to the (i, j)-CVP value of tours.

P ij P Proof. For any τ ∈ Tn, Q[τ] = (i,j)∈τ R (τ) = (i,j)∈τ lij = L(τ).

A corresponding result can be derived by considering columns of Q. Another simple sufficient condition for linearizability is that Q is a weak-sum matrix. A more general version of this condition is proved below.

n×n×n Lemma 2.3.3. If there exits A, B, C, D ∈ R such that qijkl = aijk + bijl + dikl + hjkl for all i, j, k, l, i 6= j and k 6= l then Q is linearizable.

17 n n n n P P P P Proof. Let aijk = αij, bijk = βij, dkij = γij, hkij = δij and cij = αij + βij + k=1 k=1 k=1 k=1 γij +δij. Also, let xij be the binary decision variable which takes value one if and only if the underlying tour contains arc (i, j). Thus, the values of xij completely define a tour. Now,

n n n n n n n n X X X X X X X X Q[τ] = qijklxijxkl = (aijk + bijl + dikl + hjkl)xijxkl i=1 j=1,j6=i k=1 l=1,k6=l i=1 j=1,j6=i k=1 l=1,k6=l n n n n n n n n X X X X X X X X = xij aijk xkl + xkl bikl xij i=1 j=1,j6=i k=1 l=1,k6=l k=1 l=1,k6=l i=1 j=1,i6=j n n n n n n n n X X X X X X X X + xij dijl xkl + xkl hjkl xij i=1 j=1,j6=i l=1 k=1,k6=l k=1 l=1,k6=l i=1 j=1,i6=j n n n n X X X X = (αij + βij + γij + δij)xij = cijxij = C(τ), i=1 j=1 i=1 j=1

The result in the previous lemma can be strengthened further by excluding the conditions of the lemma for some appropriate combinations of i, j, k, and `. For example, since qijkl is redundant, the case where i = k and j 6= ` can be excluded. So far we have been considering complete directed graphs. Corresponding results can be derived easily to solve the linearization problem for QTSP on a complete undirected graph 1 n(n−1) Kn. In this case Q ∈ M 2 . An interesting related question is to explore the linearization problem of QTSP on other meaningful classes of graphs. The answer may very much depends on the structure of the graph. For example, consider the case where the underlying graph, G, is a wheel. Since G contains n − 1 tours, the linearization condition yields the consistent system of equations

Q[τ] = C(τ) ∀τ ∈ Tn containing n − 1 equations on n variables. Therefore, any quadratic cost matrix Q on G is linearizable. We leave this as a topic for further research.

18 Chapter 3

A class of exponential tours

3.1 Introduction

Researchers have long been interested in finding neighbourhoods which contain an exponen- tial number of solutions that can be searched in polynomial time [4, 14, 15, 20, 21, 29, 34, 36, 48, 52, 90]. We refer to such neighbourhoods as exponential neighbourhoods. In general, in any local search heuristic, the larger the neighbourhood, the better the quality of locally optimal solutions. Naively searching large-sized neighbourhoods naively quickly becomes intractable however, by identifying exponential neighbourhoods which can be searched in polynomial time allows one to design a local search heuristic which utilizes this combinato- rial leverage. In this chapter we explore the complexity of QTSP, QTSP(p,H) and QTSP(A) in the context of searching for an optimal solution in some well-defined exponential neighbour- hoods introduced in [9, 48, 89]. The linear TSP and are known to be polynomially searchable when restricted to such neighbourhoods. In particular, we consider

1. Single edge ejection tours (SEE-tours) [48],

2. Double edge ejection tours (DEE-tours) [48],

3. Paired vertex graphs (PV-tours), and

4. Matching edge ejection tours (MEE-tours) [9, 89].

Unlike the linear TSP, QTSP is shown to be strongly NP-hard for all these classes of tours. Interestingly, the special case of QTSP(A) is polynomially solvable for three out of four of these classes while QTSP(p,H) admits fully polynomial time approximation schemes (FPTAS). Our complexity results are summarized in the following table.

In addition to their the theoretical interest, exponential neighbourhoods are vital to the development of efficient very large-scale neighbourhood search (VLSN search) algorithms [4]

19 Table 3.1: Summary of complexity results.

Neighbourhood QTSP QTSP(1,H) QTSP(p,H) QTSP(A) SEE-tours on G∗ strongly NP-hard FPTAS FPTAS O(n2) DEE-tours on G∗ strongly NP-hard FPTAS FPTAS O(n3) Paired vertex graphs strongly NP-hard FPTAS FPTAS O(n) MEE-tours strongly NP-hard FPTAS - strongly NP-hard and variable neighbourhood search algorithms [79]. In this sense, our study also contributes to the design of effective metaheuristics for QTSP(p,c) and QTSP(A).

3.2 Single edge ejection tours on G∗

Glover and Punnen [48] introduced the class of single edge ejection tours (SEE-tours) in the context of linear TSP. An SEE-tour is defined using an undirected graph G∗ = (V,E) which is a specially structured spanning subgraph of Kn. Partition the vertex set of Kn into a single vertex t, called the tip vertex and sets V 1,V 2,...,V m, such that V k = {vk, vk, . . . , vk } and |V k| = 1 2 rk r ≥ 3, for all k = 1, 2, . . . , m. Create a cycle C(k) = (vk − vk − ... − vk − vk) for k 1 2 rk 1 each k = 1, 2, . . . , m and connect each vertex in V k to each vertex in V k+1 by edges, for k = 1, 2, . . . , m−1. Let Ek be the collection of edges so obtained for k = 1, 2, . . . , m−1. Add all possible edges from t to each vertex in V 1 and V m. Let E0 be the set of edges joining t and V 1, and Em be the set of edges joining t to V m. The resulting graph is denoted by G∗ = (V,E). (See Figure 3.1 for an example of a G∗ graph). The travelling salesman problem on G∗ is known to be NP-hard [48] and it follows immediately that QTSP, QTSP(p,c), and QTSP(A) are all NP-hard on G∗. Let us now consider a family of tours in G∗, called single edge ejection tours (SEE-tours), which consists of all tours in G∗ which can be obtained by the following steps.

1 1 1 1. Choose an edge (t, vj ) from t to the cycle C(1) and eject an edge (vj , vi ) from C(1). 1 The result creates a chain P (1) from t to vi which includes all edges of C(1) except for the ejected edge.

k−1 k k−1 2. For each k from 2 to m, introduce the edge (vi , vj ) from the vertex vi which is k k the end vertex of the chain P (k − 1) to the cycle C(k), and eject an edge (vj , vi ) from k C(k), where i = j + 1 or j − 1 modulo rk, to create chain P (k) from t to vi .

m ∗ 3. Add the edge (vi , t) to close the chain P (m) to create a tour in G (See Figure 3.2 for an SEE-tour in the G∗ graph of Figure 3.1).

20 C(3)

C(1) C(2)

t

Figure 3.1: Example of a G∗ graph with n = 13 and m = 3.

t

Figure 3.2: An SEE-tour in the graph G∗ given in Figure 3.1.

Let F (SEE) be the collection of SEE-tours in G∗. As indicated in [48], |F (SEE)| = m Qm k k (n−1)/3 n−1 k 2 k=1 |V |. If |V | = 3 for all k, then |F (SEE)| = 6 ≈ (1.817) . If |V | = 4 for all k, then |F (SEE)| = 8(n−1)/4 ≈ (1.68)n−1. Thus finding the best TSP tour in F (SEE) is a non-trivial task. Glover and Punnen [48] proposed an O(n) algorithm to solve the linear TSP when restricted to SEE-tours on G∗. In the definition of QTSP, if the set of feasible solutions is restricted to the class of SEE- tours in G∗, we have an instance of QTSP-SEE. Although the linear TSP over SEE-tours can be solved in O(n) time, QTSP-SEE is a much more difficult problem. Before discussing our complexity results, we present the definition of two well-known NP-hard problems that are used in our reductions; the unconstrained binary quadratic programming problem (UBQP) and the partition problem (PARTITION). UBQP can be n stated as follows. Given an n × n cost matrix Q = (qij)n×n, find an x ∈ {0, 1} such

21 T that x Qx is minimized. Given n numbers α1, α2, . . . , αn, the PARTITION problem is to determine if there exits subsets S1 and S2 of {1, 2, . . . , n} such that S1 ∪ S2 = {1, 2, . . . , n}, P P S1 ∩ S2 = ∅, and j∈S1 αj = j∈S2 αj.

Theorem 3.2.1. QTSP-SEE is strongly NP-hard.

Proof. We reduce UBQP to QTSP-SEE. From an instance of UBQP, we construct an in- stance of QTSP-SEE as follows. For each variable xi, 1 ≤ i ≤ n, of UBQP, create a 3-cycle C(i). Choose an edge from each C(i) and label it i. Now construct the graph G∗ using these cycles. Arbitrarily label the remaining unlabeled edges of G∗ as n+1, n+2, . . . , m. Consider 0 0 a m × m matrix Q = (qij)m×m where

 0 qij, if 1 ≤ i, j ≤ n qij = 0, otherwise.

  0 Q O Thus, Q =  where O is the zero matrix of size (m − n) × (m − n). Given any O O ∗ solution x = (x1, x2, . . . , xn) of UBQP, we can construct an SEE-tour, τ, in G containing the edge i if xi = 1 and not containing i if xi = 0, for 1 ≤ i ≤ n. Note that τ contains other edges as well. It can be verified that the cost of τ with cost matrix Q0 is precisely xT Qx. Conversely, given any SEE-tour τ in the G∗ obtained above, construct a vector x =

(x1, x2, . . . , xn) by assigning xi = 1 if and only if edge i is in τ, for 1 ≤ i ≤ n. The cost of the tour τ with cost matrix Q0 is precisely xT Qx. Since UBQP is strongly NP-hard, the result follows.

C(1) C(2) C(3) C(n)

... 1 2 3 n ...

...

t

Figure 3.3: Graph G∗ used in the proof of Theorem 3.2.1.

Let us now examine the complexity of some special cases of QTSP-SEE. In the definition of QTSP(p,c), if we restrict the solution set to SEE-tours in G∗, we have the instance QTSP(p,c)-SEE. i.e. QTSP(p,c)-SEE is precisely the special case of QTSP-SEE where the

22 rank of the associated cost matrix is p and a linear cost function is added to the quadratic costs. If the linear part is zero (i.e. homogeneous case), we denote the corresponding instance by QTSP(p,H)-SEE. Recall from Chapter 1 that QTSP(p,c)-SEE can be stated as

p " ! !# X X r X r X Minimize q(τ) = ae be + c(e) r=1 e∈τ e∈τ e∈τ Subject to τ ∈ F (SEE).

Theorem 3.2.2. QTSP(p,c)-SEE is NP-hard even if p = 1 and c(e) = 0 for all e.

Proof. We reduce the PARTITION problem to QTSP(1,H)-SEE. From an instance of PAR- TITION, we construct an instance of QTSP(1,H)-SEE as follows. k k k For each k = 1, 2, . . . , n, create a 3-cycle C(k) on the vertex set {vu, vy , vw}. Build the graph G∗ = (V,E) using these cycles. Introduce a weight for each edge (i, j) ∈ E as follows: k k k k For k = 1, 2, . . . , n, assign weight αk to edge (vy , vu) and −αk to the edge (vy , vw). For k k+1 k k+1 Pn k = 1, 2, . . . , n−1 assign weights −M for (vu, vy ) and (vw, vy ) where M = 1+ k=1 |αk|. 1 1 1 The weight of edge (t, vy) is nM, the weights of edges (t, vu) and (t, vw) are nM +1, and the n n ∗ weights of edges (vu , t) and (vw, t) are −M, where t is the tip vertex of G . All other edges have weight zero. Let aij denote the weight of edge (i, j) constructed above and choose another set of weights, bij for edge (i, j), i, j ∈ V such that bij = aij. Then, the objective 2 ∗ P  function of QTSP(1,H)-SEE on the G constructed above becomes (i,j)∈τ aij where τ is an SEE-tour in this G∗. Note that zero is a lower bound on the optimal objective function value of QTSP(1,H)-SEE constructed above. It can be verified that the optimal objective function value of this QTSP(1,H)-SEE is zero precisely when the required partition exists. The proof follows from the NP-completeness of PARTITION [67].

C(1) C(2) C(3) C(n)

...

α1 −M α2 −M α3 αn −M −M ... −M −α1 −α2 −α3 −αn nM ... nM + 1 −M nM + 1 t

Figure 3.4: Graph G∗ used in the proof of Theorem 3.2.2. Note that the dotted edges do not belong to any optimal tour.

Despite this negative result, we now show that when p is fixed, QTSP(p,H)-SEE can be solved in pseudopolynomial time and when the edge weights are non-negative it also admits

23 h h FPTAS. Recall that an instance of QTSP(p,H)-SEE is given by p pairs of costs aij, bij for h = 1, 2, . . . , p, for each edge (i, j) ∈ E. We formulate QTSP(p,H)-SEE as a rank p quadratic shortest path problem (QSPP(p,H)) on a directed acyclic graph. Given the graph G∗, construct the acyclic digraph G0 as follows. Note that the vertex set V k of cycle C(k) in G∗ is represented by V k = {vk, vk, . . . , vk }. Also, the edge set of 1 2 rk C(k) is E(k) = {ek, ek, . . . , ek } where ek = (vk, vk ) and the indices are taken modulo 1 2 rk i i i+1 r . For k = 1, 2, . . . , m, create Vˆ k = {vˆk, vˆk,..., vˆk }. Vˆ k can be viewed as a copy of V k. k 1 2 rk 0 0 0 0 n m k ˆ k o k k Let G = (V ,E ) where V = {s, t} ∪ ∪k=1(V ∪ V ) . For each edge (vi , vi+1) in C(k), k k k k introduce a directed edge (vi , vˆi+1) and another directed edge (vi+1, vˆi ) where the indices k k k are taken modulo rk. The edge (vi , vˆi+1) represents the event of ejecting edge ei from k k C(k) where a Hamiltonian cycle “enters" C(k) through vi and “leaves" C(k) through vi+1. h h h For each i = 1, 2, . . . , rk and each h = 1, 2, . . . , p, we set α k k = C(a , k) − a k and vi vˆi+1 ei h h h h P h h P h β k k = C(b , k) − b k , where C(a , k) = e∈C(k) ae and C(b , k) = e∈C(k) be . Similarly, vi vˆi+1 ei k k k the edge (vi+1, vˆi ) corresponds to ejecting edge ei from C(k) and a Hamiltonian cycle enters k k k k C(k) from vi+1, traverses vi+1, . . . , vi , and leaves C(k) through vi . For h = 1, 2, . . . , p, set h h h h k k+1 k α k k = α k k and β k k = β k k . For each edge (vi , vj ) connecting vertices in V vi+1vˆi vi vˆi+1 vi+1vˆi vi vˆi+1 k+1 k k+1 h h and V introduce a directed edge (ˆvi , vj ). For h = 1, 2 . . . , p, set α k k+1 = a k k+1 vˆi vj vi vj h h 1 and β k k+1 = b k k+1 . The tip vertex s is connected to vi , for i = 1, 2, . . . , r1, and set the vˆi vj vi vj 0 h h h h weights for edges ei = (s, i) in G as αei = as,i and βei = bs,i. Similarly, for any directed ˆ m h h h h 0 edge (i, t) connecting vertices in V to t, αit = ait and βit = bit. The graph G constructed from the G∗ in Figure 3.1 is shown in Figure 3.5.

V (3) Vˆ (3)

V (1) Vˆ (1) V (2) Vˆ (2)

t s

Figure 3.5: G0 constructed from the graph G∗ given in Figure 3.1.

24 Consider the homogeneous rank p quadratic shortest path problem on G0,

p ! ! 0 X X r X r QSP P (p, H, G ): Minimize q(P ) = ae be r=1 e∈P e∈P Subject to P ∈ Ps,t

0 where Pt1t2 is the set of all s − t paths in G .

Theorem 3.2.3. From an optimal (-optimal) solution of QSPP(p,H,G0), an optimal (- optimal) solution to QTSP(p,H)-SEE can be recovered in linear time.

Proof. From the construction of G0, it can be verified that there is a one-to-one correspon- dence between SEE-tours in G∗ and s − t paths in G0. Moreover, the objective function values of the corresponding solutions of QTSP(p,H)-SEE and QSPP(p,H) are identical, and the result follows.

In QSPP(p,H,G0), if we replace G0 by a general digraph G, and s and t are replaced by two arbitrary vertices s and t of G, we get a general instance of the rank p quadratic shortest path problem on G. Such an instance is denoted by QSPP(p,H). It is well-known that QSPP(p,H) is NP-hard on an acyclic digraph even if p = 1 [88]. We now show that QSPP(p,H) can be solved in pseudopolynomial time on an acyclic digraph G = (V,E). Note that only vertices of G that lie on some (s, t) path in G are relevant to QSPP(p,H). Thus, we can remove all vertices of G that are not reachable from s and those from which t is not reachable. Such vertices can be identified in O(|V | + |E|) time by two applications of breadth-first search. Thus, without loss of generality, we assume that each vertex of G lies on some (s, t) path in G, the vertex set V = {1, 2, . . . , n} and the vertex labels follow topological order, s = 1 and t = n. For each edge (i, j) ∈ E, let 2p δij ∈ R be defined as

 h aij if h = 1, 2, . . . , p δij(h) = h−p bij if h = p + 1, p + 2,..., 2p.

Our pseudopolynomial algorithm to solve QSPP(p,H) maintains a collection Ωj, of dis- 2p tance label vectors, ∀j ∈ V . Each vector d ∈ Ωj belongs to R and represents a unique d path Pj from 1 to j in G such that

 P k  e∈P d ae if h = 1, 2, . . . , p d(h) = j P k−p  d b if h = p + 1, p + 2,..., 2p.  e∈Pj e

25 For each j ∈ V , let I(j) = {i :(i, j) ∈ E}. Then, given Ωi for i ∈ I(j), the set Ωj can be constructed by choosing distinct elements of the multiset

{d + δij : d ∈ Ωi, i ∈ I(j)}. (3.1)

2p Starting with Ω1 consisting of the zero vector in R , the sets Ω1, Ω2,..., Ωn can be generated ∗ using the fomula (3.1). Let d ∈ Ωn be such that

p  2p    X d∗(i)d∗(p + i) = min X d(i)d(p + i) . d∈Ω i=1 n i=1 

Pp ∗ ∗ Then i=1 d (i)d (p + i) gives the optimal objective function value of QSPP(p,H) on G with s = 1, t = n and each vertex in G lies on some path from 1 to n in G. The validity of this follows from the recursion defined by (3.1). Note that each distance label vector d ∈ Ωj is such that d = u + δij for some i ∈ I(j) and u ∈ Ωi. For each distance label d ∈ Ωj, we maintain pred(d) = i and pointer(d), which is a pointer to the vector u in Ωi. A formal description of the algorithm is given below.

Algorithm 1 fixed-rank QSPP Remove each vertex not reachable from s and each vertex from which t cannot be reached Label vertices in topological order 2p Ω1 = 0 ∈ R for j = 2, 3, . . . , n do Ω¯ = ∅ for i ∈ I(j) do for w ∈ Ωi do d = w + δij pred(d) = i pointer(d) = w Ω¯ = Ω¯ ∪ {d} end for end for Ωj = distinct elements of Ω¯ end for Pp nP2p o Choose u ∈ Ω(n) such that i=1 u(i)u(p + i) = mind∈Ωn i=1 d(i)d(p + i) . Trace the path Pu determined by u using pred(u) and pointer(u) return u, Pu

Lemma 3.2.4. |Ωn| ≥ |Ωj| for j = 1, 2, . . . , n.

Proof. Let P = π(1), π(2), . . . , π(r) be any path from vertex 1 to n in G. Consider a vertex

π(i), i ∈ {1, 2, . . . , r − 1}. Since the elements of Ωπ(i) are distinct vectors, the vectors that belong to {d + δπ(i)π(i+1) : d ∈ Ωπ(i)} are distinct. Thus, |Ωπ(i+1)| ≥ |Ωπ(i)|. Since each vertex in G belongs to some path joining vertex 1 to vertex n, the result follows.

26 Theorem 3.2.5. QSPP(p,H) can be solved on an acyclic digraph in O(mn2p+1U) time, Qp h h where U = h=1 maxe |ae | maxe |be |, for any fixed p.

Proof. A topological order of the vertices in digraph G can be obtained in O(n + m) time. For each h = 1, 2, . . . , p, the number of possible distinct values of ah for a label at any h h vertex is bounded by 2(n − 1) · maxe |ae |. Similarly, the number of distinct values for b h 2p is bounded by 2(n − 1) · maxe |be |. That is, |Ωj| ≤ n U for any j ∈ V , where U = Qp h h h=1 maxe |ae | maxe |be |. To generate each Ωj, we consider each Ωi such that i ∈ I(j), and |Ω¯| ≤ mn2pU. The distinct elements of Ω¯ can be found in O(mn2pU) time, and hence, all 2p+1 Ωj can be constructed in O(mn U) time. Selecting the minimum u ∈ Ω(n) such that Pp P2p i=1 u(i)u(p + i) = mind∈Ωn { i=1 d(i)d(p + i)} can be done in O(p|Ωn|) time, and the result follows.

From Theorem 3.2.5, it follows that QSPP(p,H) on an acyclic digraph can be solved in pseudopolynomial time when p is fixed. As a consequence, QTSP(p,H)-SEE can be solved in pseudopolynomial time for fixed p.

Corollary 3.2.6. QTSP(p,H)-SEE can be solved in O(mn2p+1U) time, where Qp h h U = h=1 maxe |ae | maxe |be |.

It is interesting to note that the result of Theorem 3.2.5 can be obtained by splitting each vertex of G into 4(n − 1)2U vertices and adding additional set of 4(n − 1)2U vertices, connecting them appropriately, and then solving a linear shortest problem on this graph, Qp h h where U = h=1 maxe |ae | maxe |be |. Although U is exponential in p, for a fixed p, this re- quires the addition of a pseudopolynomial number of vertices (and edges). It is also possible to solve QSPP(p,H) on a directed acyclic graph by solving a series of equality-constrained shortest path problems, however, neither of these approaches yield a better than the algorithm presented above. We now turn our attention to establishing that QSPP(p,H) admits FPTAS, and hence QTSP(p,H)-SEE also admits FPTAS.

n Theorem 3.2.7. [78] For fixed m, let fi : X ⊆ {0, 1} → R+ for i = 1, 2, . . . , m. Let m h : R+ → R+ be any function that satisfies:

0 0 m 0 1. h(y) ≤ h(y ) for all y, y ∈ R+ such that yi ≤ yi for all i = 1, 2, . . . , m; and

c 0 m 2. h(λy) ≤ λ h(y ) for all y ∈ R+ and λ > 1 for some fixed c > 0.

There is an FPTAS for solving the general optimization problem: Minimize g(x) = h(f1(x), f2(x), . . . , fm(x)), x ∈ X if the following exact problem can be solved in n pseudopolynomial time: Given K ∈ Z, (c1, c2, . . . , cn) ∈ Z+, does there exist x ∈ X such Pn that i=1 cixi = K?

27 Consider the homogenous fixed-rank quadratic optimization problem (rank-QOP), with rank p:

p X T T Minimize q(x) = ar x · br x r=1 Subject to x ∈ X,

n n where ar, br ∈ Z+ and X ⊆ {0, 1} . It is clear that the conditions of Theorem 3.2.7 are satisfied with c = 2. We have the following corollary.

Corollary 3.2.8. There exists an FPTAS for solving (rank-QOP) if the following exact n problem can be solved in pseudopolynomial time: Given K ∈ Z, (c1, c2, . . . , cn) ∈ Z+, does Pn there exist x ∈ X such that i=1 cixi = K?

Interestingly, QSPP(p,H) admits FPTAS without requiring that G be acyclic. Noting that the exact shortest path problem is NP-hard, we relax the problem to the problem of finding a shortest walk that minimizes the QSPP(p,H) objective function. An optimal solution to the relaxed problem will have the same value as the optimal solution to the original problem since removing all cycles from any s−t walk gives an s−t path. Assuming the weights are nonnegative, the exact problem can be solved in O(nmK) time by dynamic programming [78]. We now have the following corollaries which result from this discussion and the construction given above.

n Corollary 3.2.9. QSPP(p,H) and QTSP(p,H)-SEE admit FPTAS when a, b ∈ R+.

The instance of QTSP(A) when the family of tours is restricted to F (SEE) is denoted by QTSP(A)-SEE. Our reduction of QTSP(p,H)-SEE to QSPP(p,H) discussed above cannot be applied directly to solve QTSP(A)-SEE. The reduction, however, can be modified to take into consideration the cost arising from adjacent pairs of edges to get an equivalent instance of adjacent QSPP(p,H) on an acyclic graph. Since the adjacent QSPP on an acyclic graph can be solved in polynomial time [100], QTSP(A)-SEE can be solved in polynomial time. We present below a simple O(n2) algorithm to solve QTSP(A)-SEE directly. Without loss of generality, assume that the input for QTSP(A)-SEE is given as cost of paths of length two in G∗. i.e. for any 2-path u − v − w with v as the middle vertex, a  k k  cost quvw is given. Note that quvw = qwvu. Let f vi , vi+1 be the length of the smallest ∗ k  k k  SEE-Hamiltonian path in G from t to vi when edge vi , vi+1 is ejected and let

rk  k k  X g v , v = q k k k − q k k k − q k k k . i i+1 vi vi+1vi+2 vi vi+1vi+2 vi−1vi vi+1 i=1

28 In the above expression and that follows, we assume that the indices rk + 1 ≡ 1, rk + 2 ≡ 2, and 0 ≡ rk. Then for k = 2, 3, . . . m,

k k n  k−1 k−1 f(vi , vi+1) = min f vj , vj−1 + qvk−1vk−1vk + qvk−1vk vk + 1≤j≤rk−1 j+1 j i+1 j i+1 i+2  k k   k−1 k−1 g vi , vi+1 , f vj , vj+1 + q k−1 k−1 k + vj−1 vj vi+1  k k o q k−1 k k + g vi , vi+1 . vj vi+1vi+2

k k 1 1  A similar expression follows for f(vi , vi−1). The value of f vi , vi+1 for 1 ≤ i ≤ r1 can be calculated directly to initiate the above recursion. Thus we can compute the value of the m m SEE-Hamiltonian path from t to vi for each i = 1, 2, . . . , rm. Adding the arc (vi , t) for i = 1, 2, . . . , rm yields a corresponding SEE-tour and the best such tour gives an optimal solution to QTSP(A)-SEE. The foregoing discussions can be summarized in the theorem below. Theorem 3.2.10. QTSP(A)-SEE can be solved in O(n2) time.

3.3 Double edge ejection tours on G∗

We now consider a special class of tours, called double edge ejection tours (DEE-tours) which was introduced by Glover and Punnen [48]. The family of double edge ejection (DEE) tours in G∗ consists of all tours which can be obtained by the following steps.

1 1 1. Begin by extending two edges (t, vi ) and (t, vi+1) from t to the cycle C(1) and ejecting 1 1 an edge (vi , vi+1) from C(1). The result creates an expanded cycle D(1) which includes all vertices of C(1) and t.

k k 2. For each k from 1 to m−1, in that order, select an edge (vj , vj+1) of C(k) where i 6= j, k+1 k+1 and any edge (vs , vs+1 ) of C(k). Eject these two edges and add either the two edges k k+1 k k+1 k k+1 k k+1 (vj , vj ) and (vj+1, vs+1 ) or the two edges (vj , vs+1 ) and (vj+1, vs ), creating the expanded cycle D(k + 1) containing the vertices of D(k) and C(k + 1).

3. The cycle D(m) is a DEE-tour in G∗ (See Figure 3.6 for a DEE-tour in the G∗ graph of Figure 3.1). The variation of QTSP when the family of feasible solutions are restricted to DEE-tours in G∗ is denoted by QTSP-DEE. Let F (DEE) be the collection of all DEE-tours in G∗. m−1 Qm k Qm−1 k−1 k As indicated in [48], |F (DEE)| = 2 k=1 |V | k=1 |V |. If |V | = 3 for all k, then |F (DEE)| = 2m−132m−1 ≈ (1.26)n−4 · (1.44)2n−7 ≈ (2.61)n−4. If |V k| = 4 for all k, then |F (DEE)| = 2m−142m−1 ≈ (1.19)n−5 · 2n−3. Despite the fact that this is an exponential class of tours, when the feasible solutions are restricted to DEE-tours in G∗, the linear TSP can be solved in O(n) time [48]. This simplicity however does not extend to QTSP-DEE.

29 t

Figure 3.6: A DEE-tour in the graph G∗ given in Figure 3.1.

Theorem 3.3.1. QTSP-DEE is strongly NP-hard.

This theorem can be proven using a reduction from UBQP. The reduction is similar to that in the proof of Theorem 3.2.1 and hence, the details are omitted. Let us now examine the complexity of some special cases of QTSP restricted to DEE- tours. The problem QTSP(p,H) where the family of feasible solutions is restricted to DEE- tours on G∗ is called double edge ejection QTSP with rank p, and is denoted by QTSP(p,H)- DEE. We have the analogous definition for QTSP-DEE(p,c).

Theorem 3.3.2. QTSP(p,c)-DEE is NP-hard even if p = 1 and ce = 0 for all e.

Proof. We reduce the PARTITION problem to QTSP(1,H)-DEE. From an instance of PAR- TITION, construct an instance of QTSP(1,H)-DEE as follows.

For each k = 1, 2, . . . , n create a 3-cycle C(k) on the vertex set {uk, vk, wk}. Build the graph G∗ = (V,E) using these cycles. Introduce a weight for each edge (i, j) ∈ E as follows:

For k = 1, 2, . . . , n, assign weight αk to edge (vk, uk), −αk to the edge (vk, wk), and M to Pn (wk, uk), where M = 1 + n ( k=1 |αk|). The weights of the edges (t, v1), (t, u1) and (t, w1) Pn are − ( k=1 αk) /4. All other edges have weight zero. Let aij denote the weight of edge (i, j) constructed above and choose another set of weight bij which is the same as aij. Then the 2 ∗ P  objective function of QTSP(1,H)-DEE on the G constructed above becomes (i,j)∈τ aij , where τ is a DEE-tour in this G∗. It may be noted that from each 3-cycle C(k), two edges are to be ejected. In any optimal solution to the constructed instance of QTSP(1,H)-DEE, one of the ejected edge from each cycle must be the one with weight M. Thus for the other ejected edge, one need to choose an edge with weight αk or −αk. It can be verified that the optimal objective function value of this QTSP(1,H)-DEE is zero precisely when the required partition exists. The proof follows from the NP-completeness of PARTITION [67].

We now show that QTSP(p,c)-DEE (and hence QTSP(p,H)-DEE) can be solved in pseudopolynomial time and the problems admit FPTAS when the edge weights are non-

30 C(1) C(2) C(3) C(n)

...

α1 α2 α3 αn M M M ... M

−α1 −α2 −α3 −αn ...

t

Figure 3.7: Construction of the graph G∗ used in the proof of Theorem 3.3.2. Note that the Pn dashed edges have weight − ( k=1 αk) /4. negative. Our proof technique is to reduce QTSP(p,H)-DEE to QSPP(p,H) on an acyclic multigraph. Given a G∗ graph construct the acyclic digraph G0 as follows. Note that the vertex V k of cycle C(k) in G∗ is represented by V k = {vk, vk, . . . , vk }. Also, the edge set of C(k) is 1 2 rk E(k) = {ek, ek, . . . , ek }, where ek = (vk, vk ) and the indices are taken modulo r . For 1 2 rk i i i+1 k k = 1, 2, . . . , m − 1, create Eˆ(k) = {eˆk, eˆk,..., eˆk }. Eˆ(k) can be viewed as a copy of E(k). 1 2 rk 0 0 0 0 n m−1 ˆ o Construct a graph G = (V ,E ) where V = {t1, t2} ∪ E(m) ∪ ∪k=1 (E(k) ∪ E(k)) . For k k each k = 1, 2, . . . , m − 1 and i, j = 1, 2, . . . , rk, introduce a directed edge e = (ei , eˆj ), i 6= j h  h  h h h  h  h h and set 2p weights αe = C a , k −a k −a k and βe = C b , k −b k −b k for h = 1, 2, . . . , p, ei ej ei ej  h  P h  h  P h  k k where C a , k = e∈C(k) ae and C b , k = e∈C(k) be . The edge e = ei , eˆj , i 6= j, k k represents the events of ejecting edges ei and ej from cycle C(k) where a Hamiltonian k k cycle “enters" C(k) through ei and “leaves" C(k) through ej . For every k = 1, 2, . . . , m − 1,  k k+1 i = 1, 2, . . . , rk, and j = 1, 2, . . . , rk+1, introduce two directed edges e1 = eˆi , ej and  k k+1 0 e2 = eˆi , ej . Note that e1 and e2 are parallel edges in G in the same direction. Let u1 k ∗ k+1 ∗ and u2 be the end points of ei in G and v1, v2 be the end points of ej in G . Now set the h h h h h h weights αe1 = au1v1 +au2v2 and βe = bu1v2 +bu2v1 for h = 1, 2, . . . , p. The edge e1 represents k k+1 ∗ ejecting ei from C(k) and ej from C(k + 1) in G and patching cycles using “non-cross edges". e2 represents the same event but patching is done using “cross edges". The tip vertex 1 k 0 t1 is connected to ei for i = 1, 2, . . . , r1, and set 2p weights for the edges ei = (t, ei ) in G h h h h h h ∗ as αei = atvi + atvi+1 , βei = btvi + btvi+1 , where ei = (vi, vi+1) in G . Finally, connect all the m nodes ei for i = 1, 2, . . . , rm, to t2 and all the α and β weights of these edges are zero. The graph G0 constructed from the G∗ in Figure 3.1 is shown in Figure 3.8.

Theorem 3.3.3. From an optimal solution or -optimal solution of QSPP(p,H,G0), an optimal solution to QTSP(p,H)-DEE can be recovered in linear time.

31 E(3) Eˆ(3)

E(1) Eˆ(1) E(2) Eˆ(2)

t2 t1

Figure 3.8: G0 constructed from the graph G∗ given in Figure 3.1.

Proof. From the construction of G0, it can be verified that there is a one-to-one correspon- ∗ 0 dence between SEE-tours in G and t1 −t2 paths in G that preserves the objective function values of the corresponding solutions of QTSP(p,H)-DEE and QSPP(p,H). Note that G0 is an acyclic multigraph with at most two multiples of each edge, It is possible to extend our algorithm for QSPP(p,H) on an acyclic digraph to handle the multigraph case as well, and the result follows.

Now, from the construction above, and the results from the previous section, we imme- diately have the following.

Corollary 3.3.4. QTSP(p,H)-DEE can be solved in O(mn2p+1U) time, where Qp h h U = h=1 maxe |ae | maxe |be |, for any fixed p. Moreover, QTSP(p,H)-DEE admits FPTAS n when a, b ∈ R+.

The instance of QTSP(A) when the family of tours is restricted to F (DEE) is denoted by QTSP(A)-DEE. Our reduction of QTSP(p,H)-DEE to QSPP(p,H) discussed above cannot be applied directly to solve QTSP(A)-DEE. As before, the reduction can be modified to take into consideration the cost arising from adjacent pairs of edges to get an instance of adjacent QSPP(p,H) on an acyclic graph, and hence QTSP(A)-DEE can be solved in polynomial time. We present a simple O(n3) algorithm to solve QTSP(A)-DEE directly. Every DEE-tour in G∗ is defined by the edges which are removed upon entering and exiting each cycle C(i), the edge which is removed from C(m), and the choice of matching between the end points of the edge removed when exiting C(i) and the edge removed when entering C(i + 1) for i = 1, . . . , m − 1. When the edges which are removed from cycle C(i) share an end point, the quadratic costs which are incurred depend on the edges which are removed from C(i−1) and C(i+1) (as in the tour in Figure 3.6). This prevents the approach

32 used by Glover and Punnen [48] for the linear TSP from being extended to QTSP(p,H)-DEE. This also complicates any dynamic programming approach which attempts to construct an optimal solution by considering one cycle in each iteration, however, we show that it still can be done by considering two consecutive cycles instead of one in a dynamic programming recursion. 1  k k−1 2  k k−1 Let f vi , vj and f vi , vj be the lengths of the smallest expanded cycle D(k) ∗  k k−1  k k−1  k k−1  k k−1 in G containing edges vi , vj , vi+1, vj+1 , and vi , vj+1 , vi+1, vj , respectively, and let rk  k X g v = q k k k − q k k k − q k k k . i vi vi+1vi+2 vi vi+1vi+2 vi−1vi vi+1 i=1

In the above expression and that follows, we assume that the indices rk + 1 ≡ 1, rk + 2 ≡ 2, and 0 ≡ rk. Let

1  k k−1 h1 vi , vj =q k k−1 k−1 + q k k−1 k−1 − q k−1 k−1 k−1 − q k−1 k−1 k−1 vi vj vj−1 vi+1vj+1 vj+2 vj−1 vj vj+1 vj vj+1 vj+2 n 1  k−1 k−2 2  k−1 k−2o + min f vs , vt , f vs , vt 1≤s≤rk−1, s6∈{j−1,j,j+1} 1≤t≤rk−2

1  k k−1 1  k−1 k−2 h2 vi , vj = min {f vj+1 , vt + qvk vk−1vk−2 − qvk−1vk−1vk−2 , 1≤t≤rk−2 i+1 j+1 t j j+1 t 2  k−1 k−2 f vj+1 , vt + q k k−1 k−2 − q k−1 k−1 k−2 }, vi+1vj+1 vt+1 vj vj+1 vt+1 and

1  k k−1 1  k−1 k−2 h3 vi , vj = min {f vj−1 , vt + qvkvk−1vk−2 − qvk−1vk−1vk−2 , 1≤t≤rk−2 i j t+1 j+1 j t+1 2  k−1 k−2 f vj−1 , vt + q k k−1 k−2 − q k−1 k−1 k−2 }. vi vj vt vj+1 vj vt

Then for k = 3, 4, . . . , m,

1  k k−1  k f vi , vj =g vi + q k k k−1 + q k k k−1 vi−1vi vj vi+2vi+1vj+1 1  k k−1 1  k k−1 1  k k−1 + min{h1 vi , vj , h2 vi , vj , h3 vi , vj }.

2  k k−1 2  k k−1 2  k k−1 2  k k−1 Similar expressions follow for h1 vi , vj , h2 vi , vj , h3 vi , vj and f vi , vj . 1  2 1 2  2 1 The values of f vi , vj and f vi , vj for 1 ≤ i ≤ r2 and 1 ≤ j ≤ r1 can be calculated directly to initiate the above recursion. Thus, we can compute the value of the smallest expanded cycle D(i) for i = 1, 2, . . . , rm. The foregoing discussions can be summarized in the theorem below.

33 Theorem 3.3.5. QTSP(A)-DEE can be solved in O(n3) time.

3 v5

1 v4 3 2 v4 v3 1 v3 3 2 v3 v2 1 v2 3 2 v2 v1 1 v1 3 v1

t

Figure 3.9: Example of an optimal expanded cycle D(3). The cost can be computed as 2 3 2 1 2 1 3 f v , v = f v , v + g v + q 3 2 1 + q 3 3 2 + q 3 3 2 + q 3 2 2 − q 2 2 2 − q 2 2 2 . 2 1 2 2 2 v2 v2 v2 v1 v2 v2 v4 v3 v1 v3 v1 v3 v1 v2 v3 v2 v1 v3 Note that some of the quadratic costs may contain vertices in 3 consecutive partitions of ∗ G , such as q 1 2 3 . v2 v2 v2

3.4 Paired vertex graphs

We now consider a class of undirected graphs which contains an exponential number of tours but on which the linear TSP is solvable in O(n) time. Let Gp = (V,E) be constructed 1 2 n k as follows. Consider the sets V ,V ,...,V 2 of pairs of vertices. For each vertex in V , add k+1 n an edge connecting it to every vertex in V , for all k = 1, 2,..., 2 − 1. Add an edge 1 n connecting the two vertices in V to each other, and the two vertices in V 2 to each other. For Gp with an odd number of vertices, a vertex can be added on the edge contained in V 1 and all following results hold. We note that although this class of graph is similar to the graph G∗, it is not a special case of G∗.

V 1 V 2 V 3 V 4 V 5 V 6

v1 v2 v3 v4 v5 v6

0 0 0 0 0 0 v1 v2 v3 v4 v5 v6

Figure 3.10: Example of Gp on 12 vertices.

Let F (PV ) be the family of all tours which belong to Gp. It can be verified that |F (PV )| = 2n/2−1.

34 Theorem 3.4.1. The linear TSP on Gp can be solved in O(n) time.

Proof. Let Gp be a paired vertex graph on 2r vertices. Every tour τ in Gp contains the edges 0 0 k k+1 (v1, v1) and (vr, vr). To connect V to V , τ must either contain pairs of edges (vk, vk+1) 0 0 0 0 ∗ and (vk, vk+1), or (vk, vk+1) and (vk, vk+1). It is now clear that τ can be constructed greedily by adding pairs of edges joining vertices in V k to verticies in V k+1 which minimize n o cv v + c 0 0 , c 0 + c 0 for each k = 1, . . . , r − 1. k k+1 vkvk+1 vkvk+1 vkvk+1 Interestingly, the convex hull of the incidence vectors of tours in F (PV ) has a compact representation. We give a linear description, P (Gp) of the polytope of Gp.

Theorem 3.4.2.

p E P (G ) = {x ∈ R : 0 ≤ xe ≤ 1 for all e ∈ E, (3.2) n x + x = 1 : u , u ∈ V k−1, v ∈ V k, for all k = 2,..., , (3.3) u1,v u2,v 1 2 2 n x + x = 1 : v ∈ V k, u , u ∈ V k+1, for all k = 1,..., − 1, (3.4) u1,v u2,v 1 2 2 1 xu,v = 1 : u, v ∈ V , (3.5) n xu,v = 1 : u, v ∈ V 2 }. (3.6)

Proof. Let A be the coefficient matrix for P (Gp) and τ be the tour with characteristic vector x. Adding (3.3) and (3.4) implies that every vertex in V 2,V 3,...,V n/2−1 has degree 2 in τ. Since every edge in Gp other than the edges contained in V 1 and V n/2 connects vertices in successive partitions, a solution that contains a subtour must also include both edges incident with v ∈ V k and the vertices in V k+1 (or V k−1). This contradicts either (3.3) or (3.4), and thus, τ is a tour in Gp. A is a binary matrix with exactly two ones in each row. Moreover, since the variable for every edge is in exactly two constraints, there are exactly two 1’s in each column. It follows that the coefficient matrix totally unimodular, and hence P (Gp) is a linear description of the polytope.

The variant of QTSP when the tours are restricted to PV-tours is denoted QTSP-PV.

Theorem 3.4.3. QTSP-PV is strongly NP-hard.

Proof. We reduce UBQP to QTSP-PV. From an instance of UBQP on n variables, we construct an instance of DQTSP-PV as follows. Let Gp be a graph on n+1 pairs of vertices, p n+1 k k 0 p k V (G ) = ∪k=1V , where V = {vk, vk}. G contains edges connecting each vertex in V to each vertex in V k+1 for each k = 1, 2, . . . , n, an edge connecting the vertices in V 1, as well n+1 as an edge connecting the vertices of V . Assign costs qvivi+1vj vj+1 = Qij for all i, j. All other pairs of edges are assigned qef = 0. p Given any solution x = (x1, x2, . . . , xn) of UBQP, we can construct a tour τ in G 0 0 0 0 containing the edges (vi, vi+1) and (vi, vi+1) if xi = 1 and the edges (vi, vi+1) and (vi, vi+1)

35 1 n+1 if xi = 0, for 1 ≤ i ≤ n, as well as the edges contained in V and V . It can be verified that the cost of τ is precisely xT Qx. p Conversely, given any tour τ in the G obtained above, construct a vector x as xi = 1 T if and only if edge (vi, vi+1) belongs to τ. The cost of the tour τ is precisely x Qx. Since UBQP is strongly NP-hard, the proof follows.

V 1 V 2 V 3 V 4 V 5 V 6

v1 v2 v3 v4 v5 v6

0 0 0 0 0 0 v1 v2 v3 v4 v5 v6

Figure 3.11: Example of a tour τ in Gp which corresponds to the solution x = (1, 0, 0, 1, 1) in the proof of Theorem 3.4.3.

The problem QTSP(p,H) where the family of feasible solutions is restricted to PV-tours is called the paired vertex QTSP with rank p and is denoted by QTSP(p,H)-PV. We have the analogous definition for QTSP(p,c).

Theorem 3.4.4. QTSP(p,c)-PV is NP-hard even when p = 1 and ce = 0 for all e.

Proof. We reduce the PARTITION problem to QTSP(1,H)-PV. From an instance of PAR- TITION, we construct an instance of QTSP(1,H)-PV as follows. Let Gp be a graph on n+1 p n+1 k k 0 p pairs of vertices, V (G ) = ∪k=1V , where V = {vk, vk}. G contains edges connecting each vertex in V k to each vertex in V k+1 for each k = 1, 2, . . . , n, an edge connecting the vertices 1 n+1 in V , as well as an edge connecting the vertices of V . Assign costs avivi+1 = bvivi+1 = si and a 0 = b 0 = −si for each i = 1, 2, . . . , n. The objective function of QTSP(1,H)- vivi+1 vivi+1 p P 2 p PV on the G constructed above becomes ( e∈τ ae) ≥ 0, where τ is a tour in this G . It can be verified that the optimal objective function value of this QTSP(1,H)-PV is zero pre- cisely when the required PARTITION exists. The proof follows from the NP-completeness of PARTITION [67].

Despite this negative result, we now show that when p is fixed, QTSP(p,H)-PV can be solved in pseudopolynomial time and in this case it also admits FPTAS when the edge weights are nonnegative. Recall that an instance of QTSP(p,H)-PV is given by p pairs of r r p costs aij, bij for h = 1, 2, . . . , p, for each edge (i, j) ∈ G . We formulate QTSP(p,H) as a rank p quadratic shortest path problem in an acyclic directed graph. Given a graph Gp, construct the acyclic digraph G0 as follows. Note that the ver- k 0 n 0 0 0 0 tex set V = {vk, vk} for k = 1, 2,..., 2 . Construct graph G = (V ,E ) where V = 0 0 p {vˆ1, vˆ2 ..., vˆn/2}. For each pair of edges (vk, vk+1) and (vk, vk+1) in G , introduce a directed

36 V 1 V 2 V 3 V 4 V 5 V 6

v1 v2 v3 v4 v5 v6

s1 s4 s5

−s2 −s3

0 0 0 0 0 0 v1 v2 v3 v4 v5 v6

Figure 3.12: Example of a tour τ in Gp which corresponds to the solution S = {1, 4, 5} in the proof of Theorem 3.4.4.

0 0 edge ek = (ˆvk, vˆk+1) which represents the edges (vk, vk+1) and (vk, vk+1) being included in a 0 0 p Hamiltonian cycle, and similarly, for each pair of edges (vk, vk+1) and (vk, vk+1) in G , intro- h h h h h duce a directed edge e¯k = (ˆvk, vˆk+1). For h = 1, 2, . . . , p, set αe = a 0 +av v +a 0 0 +a 0 , 1 v1v1 1 2 v1v2 vkvk h h h h h h h h h h h h h αe¯ = a 0 +a 0 +a 0 +a 0 , βe = b 0 +bv v +b 0 0 +b 0 , and βe¯ = b 0 +b 0 + 1 v1v1 v1v2 v1v2 vkvk 1 v1v1 1 2 v1v2 vkvk 1 v1v1 v1v2 h h h h h b 0 + b 0 . For k = 2, 3 . . . , n/2 − 1, and h = 1, 2, . . . , p we set αe = av v + a 0 0 , v1v2 vkvk k k k+1 vkvk+1 h h h h h h h h h 0 αe¯ = a 0 + a 0 , βe = bv v + b 0 0 and βe¯ = b 0 + b 0 . The graph G k vkvk+1 vkvk+1 k k k+1 vkvk+1 k vkvk+1 vkvk+1 constructed from the Gp in Figure 3.10 is shown in Figure 3.13.

vˆ1 vˆ2 vˆ3 vˆ4 vˆ5 vˆ6

Figure 3.13: G0 constructed from the graph Gp given in Figure 3.10.

From the construction given above, it can be verified that there is a one-to-one corre- spondence between elements of Π and F (PV ) where the corresponding elements have the 0 same weight and Π is the collection of all paths from vˆ1 to vˆn/2 in G . Further, given an element of Π, we can construct a corresponding element in F (PV ) in polynomial time. Note that the graph G0 is an acyclic multigraph with exactly two multiples of each edge. Thus, QTSP(p,H)-PV can be solved in pseudopolynomial time, and a minor modification of the analysis in proof of Theorem 3.2.5 yields the following theorem. Although the number of edges doubles, this does not change the worst case complexity.

Corollary 3.4.5. QTSP(p,H)-PV can be solved in O(n2p+1U) time, where Qp h h U = h=1 maxe |ae | maxe |be |), for any fixed p. Moreover, QTSP(p,H)-PV admits FPTAS n when a, b ∈ R+.

We now show that the adjacent quadratic TSP restricted to the set of paired vertex tours, denoted QTSP(A)-PV, can be solved in polynomial time using dynamic programming. The input for QTSP(A)-PV is given as the costs of paths of length two in Gp. i.e. for any 2-path u−v−w with v as the middle vertex, a cost quvw is given. Note that quvw = qwvu. Let f(k) be p 0 the length of the smallest PV-Hamiltonian path in G from vk to vk containing the edges

37 0 0 (vi−1, vi) and (vi−1, vi). Similarly, let g(k) be the length of the smallest PV-Hamiltonian 0 0 n path containing (vi−1, vi) and (vi−1, vi). Then for k = 2, 3,..., 2 − 1, n o f(k + 1) = min f(k) + qv v v + q 0 0 0 , g(k) + q 0 0 + q 0 . k−1 k k+1 vk−1vkvk+1 vk−1vkvk+1 vk−1vkvk+1

A similar expression follows for g(k + 1). The values of f(2) and g(2) can be calculated 0 directly to initiate the recursion. Adding the edge (v n , v n ) completes the tour and the better 2 2 of the two tours gives an optimal solution to QTSP(A) on Gp. The foregoing discussion can be summarized in the theorem below.

Theorem 3.4.6. QTSP(A)-PV can be solved in O(n) time.

The results discussed in this section can easily be modified to obtain corresponding results when n is odd. Details are omitted.

3.5 Matching edge ejection tours

In this section we consider a special class of tours considered by Punnen [89]. Consider a M special spanning subgraph G of the complete graph Kn obtained as follows. Partition the vertices of Kn into two sets, U = {u1, u2, . . . , ur} and V = {v1, v2, . . . , vs}. Let Eu =

{(ui, ui+1) : 1 ≤ i ≤ r}, where r + 1 ≡ 1 and Euv = {(ui, vj) : 1 ≤ i ≤ r, 1 ≤ j ≤ s}. M M Hereafter, we assume that s ≤ r. The edge set of G is defined as E(G ) = Eu ∪ Euv. The resulting graph is denoted by GM = (V M ,EM ), (See Figure 3.14 for an example of a GM graph), where V M = U ∪ V .

U

V

Figure 3.14: Example graph GM with r = 6 and s = 4.

Since the TSP is NP-hard on a complete and GM has a spanning sub- graph which is a complete bipartite graph, the TSP is NP-hard on GM as well. Let us now

38 consider a family of tours in GM , called matching edge ejection tours (MEE-tours) which consists of all tours in GM that can be obtained by the following process.

1. Eject s edges eπ(1), eπ(2), . . . , eπ(s) from the cycle Eu ≡ (u1, u2, . . . , ur, u1), and let

Eu(s) = Eu − {eπ(1), eπ(2), . . . , eπ(s)} be the edge set of the resulting subgraph.

2. Insert the vertices vi ∈ V into Eu(s) by joining it to the end points of eπ(i), 1 ≤ i ≤ s to construct a tour in GM . (See Figure 3.15 for an MEE-tour in the GM graph of Figure 3.14).

U

V

Figure 3.15: An MEE-tour in the graph GM given in Figure 3.14.

M r! Let F (MEE) be the collection of all MEE-tours in G . |F (MEE)| = (r−s)! [89]. If n is n n+1 even and r = n/2, |F (MEE)| = ( 2 )!. If n is odd and r = (n + 1)/2, |F (MEE)| = ( 2 )!. n In fact, |F (MEE)| could be even larger than ( 2 )! for an appropriate choice of r and s. n Gutin and Yeo [52] showed that |F (MEE)| could be as large as ( 2 +p0)!/(2p0)! where p0 = q 1 9 3 8 (n + 8 ) + 8 . Finding the best QTSP tour in F (MEE) is a nontrivial task. Interestingly, TSP restricted to MEE-tours can be solved in O(n3) time by formulating it as a minimum weight perfect matching problem on an associated bipartite graph [89]. The quadratic travelling salesman problem where the family of feasible solutions is re- stricted to MEE-tours is denoted by QTSP-MEE. Note that by using the rank decomposition of the matrix Q (which has rank p), QTSP-MEE can be stated as

p ! ! X X h X h Minimize q(τ) = ae be h=1 e∈τ e∈τ Subject to τ ∈ F (SEE).

It may be noted that in the above representation, p could be O(n2).

39 The quadratic assignment problem on the complete bipartite graph G0 = (U, V, E) which, by using the rank decomposition, can be stated as

p ! ! 0 X X h X h QAP (G ): Minimize q(P ) = αe βe h=1 e∈P e∈P Subject to P ∈ P, where P is the set of all perfect matchings in G0, and |U| = |V | = n. When n is odd QAP(G0) is called odd QAP. It is easy to see that odd QAP is strongly NP-hard.

Theorem 3.5.1. QTSP-MEE is strongly NP-hard.

Proof. We reduce odd QAP to QTSP-MEE. Given an instance of QAP(G0) with each par- tition having an odd number of vertices, construct the graph GM as follows. Note that the 0 vertex set of G is represented by U ∪V where U = {u1, u2, . . . , un} and V = {v1, v2, . . . , vn}, and the edge set of G0 is E0 = {(u, v): u ∈ U, v ∈ V }. The vertex set of GM is V M = U ∪ V .

Let Eu be the cycle (u1, u2, . . . , un, u1) and let Euv = {(ui, vj): ui ∈ U, vj ∈ V }. Construct M  M M  M h h graph G = V ,E , where E = Eu ∪ Euv. Choose auivj , buivj such that

h h h auivj + aui+1vj = αuivj (3.7) and h h h buivj + bui+1vj = βuivj , (3.8) for i = 1, 2, . . . , n, j = 1, 2, . . . , n, where n + 1 ≡ 1, and h = 1, 2, . . . , p. It can be verified h h that the system of linear equations in auivj , buivj in (3.7) and (3.8) is consistent for any h h αuivj and βuivj .

U V

un vn un−1 . . . .

u4 v2 u3

u2 v1 u1

Figure 3.16: Construction used in the proof of Theorem 3.5.1.

40 There is a one-to-one correspondence between tours in GM and perfect matchings in G0, such that the corresponding solutions have the same objective function values. Since odd QAP(G0) is strongly NP-hard, the result follows.

Corollary 3.5.2. From an optimal (-optimal) solution of QAP(G0), an optimal (-optimal) solution to QTSP-MEE can be recovered in linear time.

Proof. From the construction of G0, it can be verified that there is a one-to-one correspon- dence between MEE-tours in GM and perfect matchings in G0 that preserves the objective function values of the corresponding solutions of QTSP-MEE and QAP(G0) and the result follows.

By extending the fomulation [89], we can also formulate QTSP-MEE as a QAP(G0) as follows. Given a graph GM , construct the complete bipartite graph G0 as follows. Note that M M the vertex set of G is represented by V = U ∪ V where U = {u1, u2, . . . , ur} and M V = {v1, v2, . . . , vs}. Also, the edge set is E(G ) = Eu ∪ Euv where Eu = {ei = (ui, ui+1):

1 ≤ i ≤ r} and Euv = {(ui, vj) : 1 ≤ i ≤ r, 1 ≤ j ≤ s}, r + 1 ≡ 1 and s ≤ r. Construct 0 0 0 0 a complete bipartite graph G = (V ,E ) where V = {Eu ∪ (V ∪ {vi : s < i ≤ r})} 0 h and E = {(ei, vj): ei ∈ Eu, vj ∈ V ∪ {vi : s < i ≤ r}}. For j ∈ V set weights αij = h h h h h h h h h auivj + avj ui+1 − auiui+1 and βij = buivj + bvj ui+1 − buiui+1 , and set weights αij = auiui+1 and h h βij = buiui+1 , otherwise, for all h = 1, 2, . . . , p and i ∈ Eu. For j ≤ s, the edge e = (ei, vj) represents the events of ejecting edge ei from cycle Eu and inserting vj by joining it to the end points of ei, otherwise e represents the event that no vertex is inserted along ei. The problem QTSP(p,c) restricted to the collection of tours in F (MEE) is denoted QTSP(p,c)-MEE. We have the analogous definition for the homogenous case, denoted QTSP(p,H)-MEE.

Corollary 3.5.3. QTSP(p,c)-MEE is NP-hard even if p = 1 and c(e) = 0 for all e.

The proof follows from the reduction above using the fact that rank 1 odd QAP is NP-hard.

Corollary 3.5.4. QTSP(1,H)-MEE admits FPTAS when a, b ≥ 0.

The proof of this corollary follows from the reduction given above and applying the result of Goyal et al. [49] on the resulting rank 1 odd QAP. The adjacent quadratic TSP over the collection of MEE-tours is denoted QTSP(A)- MEE. Note that QTSP(A)-SEE, QTSP(A)-DEE, and QTSP(A)-PV are solvable in poly- nomial time. This simplicity however, does not extend to QTSP(A)-MEE.

Theorem 3.5.5. QTSP(A)-MEE is strongly NP-hard.

41 Proof. We give a reduction from the linear TSP. Given a graph G on the vertices 1, 2, . . . , n, M M the graph G is constructed on the vertex set V = U ∪V , where U = {u1, u2, . . . , un} and

V = {v1, v2, . . . , vn}. Let Eu be the cycle (u1, u2, . . . , un, u1). The indices are taken modulo n. Assign quadratic cost on the pairs of adjacent edges quivj vj uk = cik for i, j, k = 1, 2, . . . , n, i 6= k. All other costs are zero.

U V

un vn

un−1 vn−1 . . . .

u4 v4

u3 v3

u2 v2

u1 v1

Figure 3.17: Construction used in the proof of Theorem 3.5.5.

It can be verified that every tour π = (π(1), π(2), . . . , π(n), π(1)) ∈ G has the same cost 0 as the tour π which results from inserting π(i) into edge (ui, ui+1), for each i = 1, 2, . . . , n, that is, 0 0 π = (u1, vπ(1), u2, vπ(2), . . . , un, vπ(n), u1) ∈ G . This establishes a 1-1 correspondence be- tween tours in G and MEE-tours in GM , and the result follows.

vπ(7) vπ(1) u1

u7 u2

vπ(6) vπ(2)

u3 u6

vπ(5) vπ(3) u5 u4

vπ(4)

Figure 3.18: An example of the construction used in the proof of Theorem 3.5.5 is shown. 0 0 0 0 0 0 The solid lines indicate the tour π ∈ G defined by π ∈ G. The cycle Eu = (1 , 2 ,..., 7 , 1 ) is shown with dashed lines.

42 In this chapter we presented a systematic study of various complexity aspects of QTSP which generalizes the well-known travelling salesman problem. We have shown that QTSP is NP-hard on several classes of exponential neighbourhoods for which the linear TSP is polynomially-solvable. We examine the complexity and approximability of the fixed- rank QTSP on these neighbourhoods. For all neighbourhoods, except MEE-tours, we give polynomial-time algorithms for QTSP(A).

43 Chapter 4

Pyramidal tours

4.1 Introduction

The pyramidal travelling salesman problem is a special case of the linear TSP where the feasible solutions are restricted to pyramidal tours. A pyramidal tour on the node set

{1, 2, . . . , n}, is a tour of the form h1, i1, . . . , ir, n, j1, . . . , jn−r−2i, where i1 < i2 < . . . < ir and j1 > j2 > . . . > jn−r−2. It is shown in [71] that an optimal pyramidal tour can be computed in O(n2) time for any linear weight function, and recently it was shown that this can be reduced to O(nlog2n) in the Euclidean case [28]. The set of pyramidal tours contains an exponential number of tours over which we can optimize in polynomial time. The pyramidal TSP has attracted the attention of researchers as a polynomially solvable special case and its potential use within local search based heuristic algorithms and VLSN search heuristics [15, 105, 106]. A natural question is to determine conditions on the cost matrix such that the optimal tour is pyramidal. A great deal of work has been done to find sufficiency conditions for such instances. The Demidenko condition [32] generalizes many previously developed such conditions which, when satisfied, there always exists an optimal tour which is pyramidal. Other well-known conditions for pyramidal tour optimality include the van der Veen con- dition [112] and its asymmetric analogue [80, 81]. For a complete complexity classification of all conditions which consist of inequalities involving four arbitrary nodes, we refer the reader to [30]. Since known settings for which the optimal tour is pyramidal are quite rare, several relaxations of the pyramidal tour have been studied, such as in [34, 82]. We are interested in examining the computational complexity of solving the problems QTSP, QTSP(p,H) and QTSP(A) when the set of feasible tours is restricted to pyramidal tours rather than identifying conditions on the Q matrix and C matrix when the optimal tour with respect to the QTSP, QTSP(p,H) or QTSP(A) objective functions is pyramidal.

44 4.2 Pyramidal QTSP

Every pyramidal tour is uniquely defined by the partition [I,J] of the nodes from 2 to n−1, where I = {i1, i2, . . . , ir} and J = {j1, j2, . . . , jn−r−2}. We refer to the sets I and J with respect to tour τ by I(τ) and J(τ), respectively. Let F (P ) be the set of pyramidal tours defined on {1, 2, . . . , n}. Then |F (P )| = 2n−2. Thus finding the best TSP tour in F (P ) is a non-trivial task. As indicated earlier, the pyramidal travelling salesman problem with a linear cost objective function is well-known to be solvable in O(n2) time [46]. In the definition of QTSP, if the set of feasible solutions is restricted to the class of pyramidal tours on a complete directed graph with the nodes labelled 1, 2, . . . , n, we have an instance of QTSP-P. Although the linear TSP over pyramidal tours on a directed graph can be solved in O(n2) time, QTSP-P is a much more difficult problem. Before discussing our complexity results, we recall the definitions of two well-known NP- hard problems presented earlier that are used in our reductions; the quadratic unconstrained binary optimization problem (QUBO) and the partition problem (PARTITION). QUBO can n T be stated as: given an n×n cost matrix Q = (qij)n×n, find an x ∈ {0, 1} such that x Qx is minimized. PARTITION is the problem: given n numbers α1, α2, . . . , αn determine if there exits subsets S1,S2 of {1, 2, . . . , n} such that, S1 ∪ S2 = {1, 2, . . . , n}, S1 ∩ S2 = ∅, and P P j∈S1 αj = j∈S2 αj.

Theorem 4.2.1. QTSP-P is strongly NP-complete.

Proof. We reduce QUBO to QTSP-P. From an instance of QUBO, we construct an instance of QTSP-P as follows. Let G∗ = (V ∗,E∗) be a complete graph on the vertices {0, 1, . . . , n + 0 0 1}. Consider an (n + 1)(n + 2) × (n + 1)(n + 2) matrix Q = (qij) whose rows are indexed by the edges in G∗. Define I¯ = {(i, j) ∈ E∗ : 0 < i < j} and define

 ¯ 0 qik if (i, j), (k, l) ∈ I, qijkl = 0 otherwise.

45 The objective function of every pyramidal tour, τ, is

0 X 0 q (τ) = qijkl (i,j),(k,l)∈E(τ) X 0 X 0 = qijkl + qijkl (i,j),(k,l)∈E(τ)∩I¯ (i,j),(k,l)∈E(τ)\{E(τ)∩I¯} X = qik i,k∈I(τ) n n X X = qikxixk i=1 k=1 = xT Qx where xi = 1 if i ∈ I(τ) and xi = 0 if i ∈ J(τ) for i = 1, . . . , n.

Given any solution x = (x1, x2, . . . , xn) of QUBO, we can construct a pyramidal tour,

τ, by letting I(τ) = {i : xi = 1, 1 ≤ i ≤ n} and J(τ) = {xi = 0, 1 ≤ i ≤ n}. It can be verified that the cost of τ with cost matrix Q0 is precisely xT Qx. Conversely, given an pyramidal tour τ in the G∗ obtained above, construct a vector x = (x1, x2, . . . , xn) by assigning xi = 1 if i is in I(τ), and 0 otherwise, for 1 ≤ i ≤ n. The cost of the tour τ with cost matrix Q0 is precisely xT Qx. Since QUBO is strongly NP-hard, the result follows.

It is known that unless P = NP there is no n1−-approximation for the maximum clique (MC) problem for any fixed  > 0 where n is the number of vertices in the given graph [58]. Since MC is a special case of QUBO and the reduction in the proof of Theorem 4.2.1 is value-preserving, it follows that the QTSP-P cannot be approximated to within n1− for any fixed  > 0. Let us now examine the complexity of some special cases of QTSP-P. In the definition of QTSP(p,c), if we restrict the solution set to pyramidal tours, we have the problem QTSP(p,c)-P. i.e. QTSP(p,c)-P is precisely the special case of QTSP-P where the rank of the associated cost matrix is p and a linear cost function is added to the quadratic costs. If the linear part is zero, we denote the corresponding problem by QTSP(p,H)-P.

Theorem 4.2.2. QTSP(p,c)-P is NP-hard even if p = 1 and c(e) = 0 for all e.

Proof. We reduce the PARTITION problem to QTSP(1,H)-P. From an instance of PARTI- TION, we construct a instance of QTSP(1,H)-P on a digraph G∗ = (V ∗,E∗) with 3n + 2 nodes as follows. For each k = 1, 2, . . . , n, create the dipath (3k + 1, 3k − 1, 3k). We con- nect the paths by adding arcs (3k, 3(k + 1)), (3k, 3(k + 1) − 1), (3(k + 1) + 1, 3k + 1), and (3(k + 1) − 1, 3k + 1) for each k = 1, 2, . . . , n − 1. We connect node 1 by adding arcs (1, 2),

(2, 1), (1, 3), and (4, 1). We refer the reader to Figure 4.1. Assign weight αk to arc (3k−1, 3k) and −αk to arc (3k + 1, 3k − 1) for each k = 1, 2, . . . , n. All other arcs have weight zero. Let

46 aij denote the weight of edge (i, j) constructed above and choose another set of weights bij ∗ for edge (i, j), i, j ∈ V such that bij = aij. Then, the objective function of QTSP(1,H)-P on ∗ P 2 ∗ the G constructed above becomes ( (i,j)∈τ aij) where τ is a tour in G . Note that zero is a lower bound on the optimal objective function value of QTSP(1,H)-P constructed above. It can be verified that the optimal objective function value of this QTSP(1,H)-P is zero precisely when the required partition exists. The proof follows from the NP-completeness of PARTITION [67].

3 0 6 0 9 3n

0 0 0 0 0 α1 α2 α3 αn 0 1 2 5 8 11 3n − 1 3n + 2

−α1 −α2 −α3 −αn 0 0 0 0 0

4 0 7 0 10 3n + 1

Figure 4.1: Construction of the graph G∗ used in the proof of Theorem 4.2.2.

Despite this negative result, we now show that QTSP(1,H)-P can be solved in pseudo- polynomial time and when the edge weights are non-negative it also admits FPTAS. Let Hij be the set of Hamiltonian paths from i to j on the node set {1, 2,..., max{i, j}} subject to the condition that the path passes through the nodes in descending order from i to 1 and then through the complementary subset in ascending order from 1 to j. Let Q(i, j, A, B) denote the cost of the least-cost Hamiltonian path HP in Hij with respect to P P the QTSP(1,H) objective function, such that e∈HP ae = A and e∈HP be = B. By expanding the QTSP(1,H) objective function, we derive the following recursion,

     Q i, j − 1,A − a(j−1)j,B − b(j−1)j + a(j−1)j B − b(j−1)j     +b(j−1)j A − a(j−1)j + a(j−1)jb(j−1)j for i < j − 1   min{Q (i, k, A − a ,B − b ) + a (B − b )  kj kj kj kj  k j + 1   min{Q (k, j, A − aik,B − bik) + aik(B − bik)  k

It is possible to compute Q(i, n, A, B) and Q(n, i, A, B) for all i < n, A, and B in O(n2A¯B¯) time using the recursion above, starting from the initial conditions Q(1, 2, a12, b12) = a12b12

47 and Q(2, 1, a21, b21) = a21b21. The length of the shortest pyramidal tour is then given by

    min{Q n − 1, n, A − an(n−1),B − bn(n−1) + an(n−1) B − bn(n−1) A,B   + bn(n−1) A − an(n−1) + an(n−1)bn(n−1),     Q n, n − 1,A − a(n−1)n,B − b(n−1)n + a(n−1)n B − b(n−1)n   + b(n−1)n A − a(n−1)n }.

The foregoing discussion can be summarized in the theorem below.

2 Theorem 4.2.3. QTSP(1,H)-P can be solved in O(n A¯B¯), where A¯ = max{|ai| : i =

1, 2, . . . , n} and B¯ = max{|bi| : i = 1, 2, . . . , n}.

Let Q(i, j, A1,A2,...,Ap,B1,B2,...,Bp) denote the cost of the least-cost Hamiltonian ij P h h path in H with respect to the QTSP(p,H) objective function, such that e∈HP ae = A P h h and e∈HP be = B for all h = 1, 2, . . . , p. By expanding the QTSP(p,H) objective function, a recursion similar to the one described for the QTSP(1,H) case can be obtained.

2 Qp ¯h ¯h ¯h h Theorem 4.2.4. QTSP(p,H)-P can be solved in O(n h=1 A B ), where A = max{|ai | : ¯h h i = 1, 2, . . . , n} and B = max{|bi | : i = 1, 2, . . . , n} for h = 1, 2, . . . , p.

We now turn our attention to establishing that QTSP(p,H)-P admits FPTAS. By modifying the last step in the recursion above, we immediately have a pseudopoly- nomial time algorithm for the exact problem. We now have the following corollary which results from Corollary 3.2.8 and the discussions above.

n Corollary 4.2.5. QTSP(p,H)-P with a, b ∈ Z+ admits FPTAS.

The instance of QTSP(A) when the family of tours is restricted to F (DP ) is denoted by QTSP(A)-P. Without loss of generality, assume that the inputs for QTSP(A)-P is given as costs of paths of length 2 in G. i.e. for any 2-path u − v − w with v as the middle vertex, a cost quvw is given. Let Q(i, j, k, l) be the length of the shortest Hamiltonian path from i to l containing arcs (i, j) and (k, l) on cities 1, 2,..., max{i, l}, such that it passes through cities in descending order from i to 1 and increasing order from 1 to l for the cities in the complementary set. Then

Q(1, j, k, l) = Q(1, j, k − 1, k) + q(k−1)kl

Q(i, j, k, 1) = Q(j, j − 1, k, 1) + qij(j−1)   Q(1, 2, k, l) + qi12 if i = l + 1  Q(i, 1, k, l) = Q(i, 1, k − 1, k) + q(k−1)kl if i < l − 2 or i = l − 1   Q(i, 1, k − 2, k) + q(k−2)kl if i = l − 2

48   Q(j, j − 2, 1, l) + qij(j−2) if i = l + 2  Q(i, j, 1, l) = Q(j, j − 1, 1, l) + qij(j−1) if i > l + 2 or i = l + 1   Q(i, j, 2, 1) + q21l if i = l − 1

 Q(i, j, k − 1, k) + q if i < l − 2  (k−1)kl  Q(i, j, k − 2, k) + q if i = l − 2 > j + 1  (k−2)kl   min{Q(i, j, v, k) + qvkl} if i = l − 2 = j + 1  v j + 2   min{Q(i, j, v, k) + qvkl} if i = l − 1 = k + 1 = j + 2  v k + 3  ij(j−1)  min{Q(j, v, k, l) + q } if i = l + 1 = j + 2 = k + 3  ijv  v k + 3   min{Q(j, v, k, l) + q } if i = l + 2 = k + 3  ijv  v l + 2 It is possible to compute Q(i, j, k, n) and Q(n, j, k, l) for all required i, j, k, l < n in 3 O(n ) time, beginning from the initial conditions Q(1, 2, 3, 4) = q123 + q234, Q(2, 1, 3, 4) = q213 + q134, Q(3, 1, 2, 4) = q312 + q124, Q(3, 2, 1, 4) = q321 + q214, Q(4, 1, 2, 3) = q412 + q123, ∗ Q(4, 2, 1, 3) = q421 + q213, Q(4, 3, 1, 2) = q431 + q312. The length of the shortest tour, τ , is given by  Q(n, v, n − 2, n − 1) + q(n−2)(n−1)n + q(n−1)nv,   Q(n, n − 2, v, n − 1) + qv(n−1)n + q(n−1)n(n−2), q(τ ∗) = min v

Theorem 4.2.6. QTSP(A)-P is solvable in O(n3) time.

4.3 Undirected pyramidal QTSP

In the definition of QTSP, if the set of feasible solutions is restricted to the class of pyra- midal tours on a complete undirected graph with the nodes labelled 1, 2, . . . , n, we have an instances of QTSP-UP. Note that QTSP-UP is the special case of QTSP-P with cij = cji

∀i, j ∈ V and qijkl = qijlk = qjikl = qjilk for all i, j, k, l ∈ V . The complexity proof used in

49 the directed version of the problem cannot be modified to directly apply to the undirected We show that this restricted version is also NP-hard.

Theorem 4.3.1. QTSP-UP is strongly NP-hard.

Proof. We reduce QUBO to QTSP-UP. From an instance of QUBO, we construct an in- stance of QTSP-UP as follows. Let G∗ = (V ∗,E∗) be a complete graph on the vertices {0, 1, . . . , n + 2}. Define S¯ = {{i, i + 1} : 0 < i < n + 1} and define

 ¯ 0 qik if {i, j}, {k, l} ∈ S, q{i,j},{k,l} = 0 otherwise.

The objective function of every pyramidal tour, τ, is

0 X 0 q (τ) = q{i,j},{k,l} {i,j},{k,l}∈E(τ) X 0 X 0 = q{i,j},{k,l} + q{i,j},{k,l} {i,j},{k,l}∈E(τ)∩S¯ {i,j},{k,l}∈E(τ)\{E(τ)∩S¯} X = qik {i,i+1},{k,k+1}∈S¯ n n X X = qikxixk i=1 k=1 = xT Qx where xi = 1 if i ∈ S¯ and xi = 0 if i 6∈ S¯ for i = 1, . . . , n.

Given any solution x = (x1, x2, . . . , xn) of QUBO, we can construct a pyramidal tour τ by constructing the partition [I,J] as follows. Let I = {1}. Then ∀i = 1, 2, . . . , n, i + 1 belongs to the same set as i if xi = 1 and to the opposite set, otherwise. It can be verified that the cost of τ with respect to cost function q0 is precisely xT Qx. Conversely, given an pyramidal tour τ in the G∗ obtained above, construct a vector x = (x1, x2, . . . , xn) by assigning xi = 1 if both i and i + 1 belong to I(τ) or J(τ), and 0 otherwise, for 1 ≤ i ≤ n. The cost of the tour τ with cost function q0 is precisely xT Qx. Since QUBO is strongly NP-hard, the result follows.

As before, we now turn our attention to the special case of the undirected pyramidal QTSP where the cost matrix has fixed rank. If we restrict the solution set to pyramidal tours in the definition of QTSP(p,c), we have the problem QTSP(p,c)-UP. If the linear part is zero, we denote the corresponding problem by QTSP(p,H)-UP. The NP-completeness of QTSP(p,H)-UP does not follow from Theorem 4.2.2, so details are given.

Theorem 4.3.2. QTSP(p,c)-UP is weakly NP-complete even if p = 1 and c(e) = 0 for all e.

50 Proof. We give a reduction from QTSP(1,H)-UP to PARTITION. From a given instance of PARTITION, we construct a instance of QTSP(1,H)-UP on a graph G∗ with 3n + 2 vertices as follows. For each k = 1, 2, . . . , n, create the path (3k, 3k − 1, 3k + 1). We connect the paths by adding edges {3k, 3(k + 1)}, {3k, 3(k + 1) − 1}, {3k + 1, 3(k + 1) − 1} and {3k+1, 3(k+1)+1} for each k = 1, 2, . . . , n−1. We connect vertex 1 by adding edges {1, 2},

{1, 3}, and {1, 4}. Assign edge weight αk to edge {3k−1, 3k} and −αk to edge {3k−1, 3k+1} for each k = 1, 2, . . . , n and 0 for all remaining edges. Let aij denote the weight of edge {i, j} ∗ and choose another set of weights bij for edge {i, j}, i, j ∈ V such that bij = aij. Then, the ∗ P 2 objective function of QTSP(1,H)-UP on the G constructed above becomes ( {i,j}∈τ aij) where τ is a tour in G∗. Note that zero is a lower bound on the optimal objective function value of QTSP(1,H)-UP constructed above. It can be verified that the optimal objective function value of this QTSP(1,H)-UP is zero precisely when the required partition exists. The proof follows from the NP-completeness of PARTITION [67].

3 0 6 0 9 3n

0 0 0 0 0 s1 s2 s3 sn 0 1 2 5 8 11 3n − 1 3n + 2

−s1 −s2 −s3 −sn 0 0 0 0 0

4 0 7 0 10 3n + 1

Figure 4.2: Construction of the graph G∗ used in the proof of Theorem 4.3.2.

It is straightforward to modify the pseudopolynomial algorithm given in the proof of Theorem 4.2.3 to solve the undirected case.

2 Qp ¯h ¯h ¯h h Theorem 4.3.3. QTSP(1,H)-UP can be solved in O(n h=1 A B ), where A = max{|ai | : ¯h h i = 1, 2, . . . , n} and B = max{|bi | : i = 1, 2, . . . , n}.

Again, by applying the result of Mittal and Schulz [78] we get the following result.

n Corollary 4.3.4. QTSP(p,H)-UP with a, b ∈ Z+ admits an FPTAS.

A straightforward modification of the proof of Theorem 4.2.6 yields the following theo- rem.

Theorem 4.3.5. QTSP(A)-UP is solvable in O(n3) time.

51 Chapter 5

Halin graphs

5.1 Introduction

The class of Halin graphs has attracted the interest of researchers for several decades [17, 20, 35, 57, 60, 111, 108, 107, 115]. Halin graphs are Hamiltonian, and it was shown in [20] that the linear TSP can be solved on Halin graphs in linear time. Many other combinatorial optimization problems are solvable on Halin graphs in polynomial time using dynamic programming [12]. In this chapter, we examine QTSP on Halin graphs.

5.2 Notations and definitions

A Halin graph H = T ∪ C is obtained by embedding a tree with no vertices of degree two in the plane and connecting the leaf vertices of T in a cycle C so that the resulting graph remains planar. Unless otherwise stated, we always assume that a Halin graph or its subgraphs are given in the planar embedded form. The non-leaf vertices belonging to T are referred to as tree or internal vertices and the vertices in C are referred to as cycle or outer vertices of H. A Halin graph with exactly one internal vertex is called a wheel. If H has at least two internal vertices and w is an internal vertex of T which is adjacent to exactly one other internal vertex, then w is adjacent to a set of consecutive vertices of C, which we denote by C(w). Note that |C(w)| ≥ 2. The subgraph of H induced by {w} ∪ C(w) is referred to as a fan, and we call w the centre of the fan. See Figure 5.1. We parametrize the description of a Halin graph. Let L be a path in T which contains the largest number of edges, l be the number of edges in L, and w be the maximum distance (in terms of the number of edges) from a vertex in T to the closest vertex in L. Let ∆ be the maximum degree of a vertex in T . We denote the set of Halin graphs with length at most l, width at most w and maximum degree at most ∆ by H(l, w, ∆). Lemma 5.2.1. [20] Every Halin graph which is not a wheel has at least two fans. Let G = (V,E) be a graph and let S ⊆ V be a connected subgraph of G. Let ϕ(S) be the cutset of S, that is, the smallest set of edges whose removal disconnects S from G. Let

52 F

w edge in C edge in T fan in H

Figure 5.1: A Halin graph with 3 fans. w is the centre of fan F .

G/S be the graph obtained by repeatedly contracting edges in S until we are left with a single vertex. The resulting vertex is referred to as a pseudo-node and denoted by vS [20]. The edges in G/S are obtained as follows:

1. An edge with both ends in S is deleted;

2. An edge with both ends in G − S remains unchanged;

3. An edge (v1, v2) with v1 ∈ G − S, v2 ∈ S is replaced by the edge (v1, vs).

Lemma 5.2.2. [20] If F is a fan in a Halin graph H, then H/F is a Halin graph.

Note that each time a fan is contracted using the graph operation H/F , the number of non-leaf vertices of the underlying tree is reduced by one. That is, after fewer than d(n − 1)/2e fan contractions, a Halin graph will be reduced to a wheel. Let w be the centre of a fan F , and label the outer vertices in F in the order they appear in C as, u1, u2, . . . , ur (r ≥ 2). Let {j, k, l} be the 3-edge cutset ϕ(F ) which disconnect F from G such that j is adjacent to u1, k is adjacent to w but not adjacent to ui for any i,

1 ≤ i ≤ r and l is adjacent to ur (See Figure 5.2, r = 4). Note that any Hamilton cycle τ in H contains exactly two edges of {j, k, l}. The pair of edges chosen gives us a small number of possibilities for traversing F in a tour τ. For exam- ple, if τ uses k and l, it contains the subsequence v, u1, u2, . . . , ur (call this a left-traversal of

F ), if τ uses j and k it contains the subsequence u1, u2, . . . ur, v (call this a right-traversal of

F ) and if τ uses j and l, it contains a subsequence of the form u1, u2, . . . , ui, v, ui+1, . . . , ur, for some i ∈ {1, 2, . . . , r − 1} as it must detour through the centre of F (call this a centre- traversal of F ). Let τ(F ) be the restriction of τ to F .

53 j u1 F u2

u3 v k edge in C edge in T fan in H

u4 l

Figure 5.2: A Halin graph H containing fan F . {j, k, l} is a 3-edge cutset which disconnects F from H.

5.3 Complexity results

In the definition of QTSP, if the set of feasible solutions is restricted to the tours belonging to Halin graph H, we have an instance of QTSP-Halin. Although the linear TSP over tours in Halin graph H can be solved in O(n) time, QTSP-Halin is a much more difficult problem. Before discussing our complexity results, we present the definition of two well-known NP-hard problems that are used in our reductions; the unconstrained binary quadratic programming problem (UBQP) and the partition problem (PARTITION). UBQP can be n stated as follows. Given an n × n cost matrix Q = (qij)n×n, find an x ∈ {0, 1} such T that x Qx is minimized. Given n numbers α1, α2, . . . , αn, the PARTITION problem is to determine if there exits subsets S1 and S2 of {1, 2, . . . , n} such that S1 ∪ S2 = {1, 2, . . . , n}, P P S1 ∩ S2 = ∅, and j∈S1 αj = j∈S2 αj. The 3-SAT problem can be stated as follows. Given a Boolean formula R in Conjunctive Normal Form (CNF) containing a finite number of clauses C1,C2,...,Ch on variables x1, x2, . . . , xt such that each clause contains exactly three literals (L1,...,L3h where for each i, Li = xj or Li = ¬xj for some 1 ≤ j ≤ t), determine if there exists a truth assignment such that R yields a value ‘true’. The decision version of QTSP on a Halin graph, denoted by RQTSP, can be stated as follows: “Given a Halin graph H and a constant θ, does there exist a tour τ in H such that P P e∈τ ce + e,f∈τ qef ≤ θ?”

Theorem 5.3.1 (Woods [116]). RQTSP is NP-complete even if the values ce ∈ {0, 1} and qef ∈ {0, 1} for e, f ∈ H.

Proof. RQTSP is clearly in NP. We now show that the 3-SAT problem can be reduced to RQTSP.

54 µ2 µ1 µ3 ` r

v

Figure 5.3: 4-fan gadget constructed by embedding a star on 5 nodes in the plane and adding a path.

From a given instance of 3-SAT, we will construct an instance of RQTSP. The basic building block of our construction is a 4-fan gadget obtained as follows. Embed a star on 5 nodes with center v and two specified nodes ` and r on the plane and add a path P from ` to r covering each of the pendant nodes so that the resulting graph is planar (see Figure 5.3). Call this special graph a 4-fan gadget. The nodes on path P of this gadget are called outer nodes and edges on P are called outer edges. Let µ1, µ2, µ3 be edges with distinct end points in P . Note that any `-r Hamiltonian path of the gadget must contain all the outer edges except one which is skipped to detour through v. We will refer to an `-r Hamiltonian path in a 4-fan gadget as a center-traversal as before. We will construct a Halin graph H using one copy of the gadget for each clause and let µ1, µ2, µ3 correspond to literals contained in that clause. We will assign costs to pairs of edges such that every Hamiltonian cycle with cost 0 must contain a centre-traversal for each clause. To relate a Hamiltonian cycle to a truth assignment, a centre-traversal which does not contain edge µi corresponds to an assignment of a true value to literal Li.

Now construct H as follows. For each clause C1,...,Ch, create a copy of the 4-fan gadget. The r, `, and v nodes of the 4-fan gadget corresponding to the clause Ci are denoted by ri, `i and vi respectively. Connect the node ri to the node `i+1, i = 1, 2, . . . , h. Introduce nodes vx and vy and the edges (`1, vx), (vx, vy), (vy, rh). Also introduce a new node w and connect it to vx, vy and vi for i = 1, 2, . . . , h − 1. The resulting graph is the required Halin graph H. See Figure 5.4.

Assign the cost c(e) = 0 for every edge in H. Let x = (vx, w) and y = (vy, w). Note that every tour which contains edges x and y traverses every gadget using a centre-traversal. For each gadget: assign costs of qef = 1 for pairs of edges which are neither outer edges nor both adjacent to the same literal edge µ1, µ2 or µ3, and for all other pairs of edges within the gadget assign cost 0. For each variable xj, j = 1, . . . , n, and all literals Lm,Lq (m 6= q)

55 C1 µ2 l1 µ1 µ3 r1

l2 vy µ4 v y 1 µ5 C v2 2 µ6 vx r2 x w

v4 v3

r4 l3

µ12 µ7

µ11 µ8 C4 C3 µ10 µ9 l4 r3

Figure 5.4: Example of the Halin graph constructed from F = C1 ∧ C2 ∧ C3 ∧ C4.

0 0 0 0 if xj = Lm = ¬Lq, assign cost qµmµq = 1 where µm and µq are edges connecting µm (and µq) to the respective 4-fan gadget centre v. All other paired costs are assumed to be 0. Suppose B is a valid truth assignment. Then in each clause there exists at least one true literal. Consider a tour τ in H which contains the edges x and y and traverses every gadget such that τ detours around exactly one literal edge which corresponds to a literal which is true in B. Since the truth assignment is valid, such a τ exists. Clearly τ has cost 0, since no costs are incurred by pairs of edges contained in a single gadget, nor are costs incurred of the form q 0 0 where La = ¬Lb. The latter must be true because in any truth µaµb assignment, the variable corresponding to La, say xa, must be either assigned a value of 0 0 true or false. Suppose a cost of 1 is incurred by q(µa, µb) and hence La = ¬Lb. If xa is true, 0 0 and xa = La, then Lb clearly must be false, so τ cannot detour to miss both µa and µb. The same contradiction arises, if xa is false. Hence a yes instance of 3-SAT can be used to construct a yes instance for RQTSP with θ = 0. Now suppose there is a tour which solves RQTSP with θ = 0. Suppose τ 0 is such a tour. Clearly it must use edges x and y, and hence must traverse every gadget via a centre- traversal. Such a detour must skip a literal edge in every gadget, otherwise a cost of 1 is incurred. Suppose D = {L1,...,Ls} is the set of literals which are skipped. Li 6= ¬Lj for any i, j, otherwise a cost of 1 is incurred. This implies that a truth assignment which results in every literal in D being true is a valid truth assignment to the variables x1, . . . , xt. That is, for each literal edge which is skipped in τ 0, assign true or false to the corresponding

56 variable such that the literal evaluates to true (if Li = xj, set xj = true and if Li = ¬xj, set xj = false). The truth values for any remaining variables can be assigned arbitrarily. This truth assignment returns true for each clause since exactly one literal in each clause is detoured, and evaluates to true. Hence this truth assignment is a valid assignment for 3-SAT.

The variation of QTSP restricted to H(l, w, ∆) is denoted by QTSP-H(l, w, ∆). We now give some complexity results on these classes of problems. It is clear that every graph in H(2, 1, ∆) is a wheel. It follows that QTSP-H(2, 1, ∆) can be solved in O(n2) time. It can be verified that graphs belonging to H(3, 1, ∆) contain O(n2) tours, and hence, QTSP-H(3, 1, ∆) can be solved in O(n4) time by enumeration. In fact, for any fixed k, QTSP-H(k, 1, ∆) can be solved in polynomial time. This can be seen by observing that every edge along the central path of length k belongs to a 3-edge cutset consisting of that edge together with two edges of C. Fixing the cutsets containing an edge adjacent to vertex t in T , it is clear that there are at most O(n) possible detours through t. Hence, the number of tours in any graph belonging to H(k, 1, ∆) is at most O(3k−1nk−1). However, when k is a function of n, the situation is quite different.

u u u u v1 v2 v3 vn vl vr vl vr vl vr vl vr 1 1 2 2 3 3 ... n n

va ... vb v1 v2 v3 vn

Figure 5.5: Example of a Halin graph G belonging to H(k, 1, 5), constructed from an instance of UBQP.

Theorem 5.3.2. QTSP-H(k, 1, ∆) is strongly NP-hard for any fixed ∆ ≥ 5, when k = O(n).

Proof. We reduce UBQP to QTSP-H(k, 1, 5). From an instance of UBQP on n variables, we construct an instance of QTSP-Halin(k, 1, 5) as follows. Let G be a graph on 4n + 2 n i i u l r vertices, V (G) = ∪i=1V ∪ {va, vb} where V = {vi, vi , vi, vi }. G contains edges connecting i l r r l each pair of vertices in V except for vi and vi for all i, edges from {(vi , vi+1): i = l r 1, 2, . . . , n−1}∪{(vi, vi+1): i = 1, 2, . . . , n−1}∪{(va, v1), (vn, vb), (va, v1), (vn, vb), (va, vb)}. l u l u Assign costs qef = Qij for e = (vi, vi ) and f = (vj, vj ), for all i, j, and qij = M for i, j ∈ {(vi, vi+1): i = 1, 2, . . . , n − 1}. All other pairs of edges are assigned qef = 0.

57 Given any solution x = (x1, x2, . . . , xn) of UBQP, we can construct a tour τ in G l u r l r containing the edges (vi, vi ) and (vi, vi ) if xi = 1 and the edges (vi, vi) and (vi, vi ) if xi = 0 l r u for each 1 ≤ i ≤ n, as well as the edges contained in {(va, v1), (vn, vb), (va, vb)} ∪ {(vi , vi): r l i = 1, 2, . . . , n} ∪ {(vi , vi+1): i = 1, 2, . . . , n − 1}. It can be verified that the cost of τ is precisely xT Qx. Conversely, given any tour τ in G obtained above, with cost less than M, construct a l u vector x as xi = 1 if and only if the edge (vi, vi ) belongs to τ. The cost of the tour τ is precisely xT Qx. Since UBQP is strongly NP-hard, the proof follows.

Theorem 5.3.3. QTSP-H(4, 2, ∆) is strongly NP-hard.

Proof. We reduce UBQP to QTSP-H(4, 2, ∆). From an instance of UBQP on n variables, construct an instance of QTSP-H(4, 2, ∆) as follows. k k k k k k For each k = {1, 2, . . . , n} create a copy of K4 − (l , r ) on the vertex set {v , l , r , c }. n S k k k k Build the graph H = (V,E) on the vertex set V = { {v , l , r , c } ∪ {w, y1, y2}} and k=1 n edge set E = E1 ∪E2 ∪E3, where E1 = S {(w, vk), (lk, ck), (ck, rk), (ck, vk), (lk, vk), (vk, rk), k=1 n−1 2 S k k+1 3 n 1 E = {(r , l ) and E = {(r , y1), (y1, y2), (y2, l )}}. See Figure 5.6 for an example k=1 of this construction with n = 8. Introduce a weight for each pair of edges (i, j) as follows: i i j j For i, j = 1, 2, . . . , n, qij to pairs of edges (r , c ), (r , c ) and M to pairs of edges containing i (w, v ). Assign weight M to pairs of edges containing (y1, y2). All other pairs of edges P have weight zero. Then, the objective function of QTSP-H(4, 2, ∆) becomes (i,j)∈τ qij where τ is a tour in H. It can be verified that the optimal objective function value of this QTSP-H(4, 2, ∆) is precisely xT Qx. The proof follows from the NP-completeness of UBQP [67].

5.4 QTSP(A)

Theorem 5.4.1. QTSP(A)-Halin is solvable in O(n) time.

Proof. We begin by showing that QTSP(A)-Halin is solvable when H = T ∪ C is a wheel. Every tour in H contains every edge in C except for one, where it detours through the centre vertex (See Figure 5.7). Let w be the centre of H, and label the vertices u1, . . . , un.

Let the edges connecting ui to centre w be labelled ti for every i. Let K = q(C) and for each edge ci = (ui, ui+1) ∈ C define

φ(ci) = K + qci−1ti + qtiti+1 + qti+1ci+1 − qci−1ci − qcici+1

It is clear that selecting the edge which minimizes φ yields the optimal tour.

58 x2

x3

x1

x4 M M M y2 0 M w M M 0 x5 M M M y1

x6

x8

x7

Figure 5.6: Example of a Halin graph in H(4, 2, ∆) constructed from an instance of UBQP with n = 8.

When H is not a wheel, it contains at least one fan F . Contracting F to pseudo-node 0 0 0 vF results in new quadratic costs between edges which are adjacent at vF . Let j , k , l be the edges in H \ F , corresponding to j, k, l in H. Let the vertices in F ∩ C be labelled u1, . . . , ur, the edges in F ∩ C be c1, . . . cr−1, and the edges which connect ui to the centre of F , ti, . . . , tr. Let K = qjc1 + qc1c2 + ... + qcr−2cr−1 + qcr−1l. Then by setting

0 0 qj k = K − qcr−1l + qcr−1tr + qtrk

0 0 qk l = qkt1 + qt1cr−1 + K − qc1j

0 0 qj l = min{K − qci−1ci − qcici+1 + qci−1ti + qtici+1 }, ci∈F where c0 is taken to be j and cr is taken to be l, it is clear that the minimum tour in H \ F has the same cost as the minimum tour in H. By recursively contracting fans in H until we are left with a wheel, and applying the first case, the cost of the optimal tour can be found in O(n) time. Reversing the order of contraction and expanding each pseudo-node, the optimal tour in H can easily be recovered.

59 ui ci ui+1

ci−1 ci+1

ti ti+1

ci−2 ci+2

w

Figure 5.7: A tour τ in a wheel, which skips edge ci.

5.5 Fixed-rank QTSP

In the definition of QTSP(p,c), if we restrict the solution set to tours in H, we have the instance QTSP(p,c)-Halin. i.e. QTSP(p,c)-Halin is precisely the special case of QTSP-Halin where the rank of the associated cost matrix is p and a linear cost function is added to the quadratic costs. If the linear part is zero (i.e. the homogeneous case), we denote the corresponding instance by QTSP(p,H)-Halin. Recall that QTSP-(p,c)-Halin can be stated as

p " ! !# X X h X h X Minimize q(τ) = ae be + ce h=1 e∈τ e∈τ e∈τ Subject to τ ∈ F (H).

We now show that QTSP(p,c) is NP-complete even when graph G is a Halin graph.

Theorem 5.5.1. QTSP(p,c)-Halin is NP-hard even if p = 1 and ce = 0 for all e.

Proof. We reduce the PARTITION problem to QTSP(1,H)-Halin. From an instance of PARTITION, construct an instance of QTSP(1,H)-Halin as follows. k k k k k k For each k = {1, 2, . . . , n} create a copy of K4 − (l , r ) on the vertex set {v , l , r , c }. n S k k k k Build the graph H = (V,E) on the vertex set V = { {v , l , r , c } ∪ {w, y1, y2}} and k=1 n edge set E = { S {(w, vk), (lk, ck), (ck, rk), (ck, vk), (lk, vk), (vk, rk)}∪ k=1 n−1 S k k+1 n 1 {(r , l )} ∪ {(r , y1), (y1, y2), (y2, l )}}. See Figure 5.8 for an example. Introduce a k=1 k k weight for each edge (i, j) as follows: For k = 1, 2, . . . , n, assign weight αk to edge (l , c ), αk k k k to edge (r , c ) and M to edge (w, v ). Assign weight M to edge (y1, y2). All other edges have weight zero. Let aij denote the weight of edge (i, j) constructed above and choose another

60 set of weights, bij for edge (i, j) ∈ E such that bij = aij. Then, the objective function of P 2 QTSP(1,H)-Halin becomes (i,j)∈τ aij where τ is a tour in H. Note that zero is a lower bound on the optimal objective function value of QTSP(1,H)-Halin constructed above. It can be verified that the optimal objective function value of this QTSP(1,H)-Halin is zero precisely when the required partition exists. The proof follows from the NP-completeness of PARTITION [67].

−s2 s2

s1 −s3

−s1 s3

−s4 M M M y2 s4 0 M w M M 0 −s5 M M M y1 s5

s8 −s6

−s8 s6

s7 −s7

Figure 5.8: Example of a Halin graph constructed from an instance of PARTITION with n = 8.

The ideas presented in the proofs of Theorem 5.3.2 and Theorem 5.5.1 can be used to show that QTSP(p,c) further restricted to graphs belonging to H(l, 1, ∆) is NP-hard.

Theorem 5.5.2. QTSP(p,c)-H(l, 1, ∆) is NP-hard even if p = 1 and ce = 0 for all e.

Before turning our attention to establishing that QTSP(p,c) admits FPTAS. We first give some useful results. Consider the equality-constrained travelling salesman problem on a Halin graph:

X EQ − TSP : Minimize ce (5.1) e∈τ X Subject to de = K (5.2) e∈τ τ ∈ F. (5.3)

61 Recall the exact multiple choice knapsack problem (E-MCKP): Given are m mutually disjoint classes of objects N1,...,Nm and a knapsack of capacity W . Each item j ∈ Ni has a profit pij and a weight wij. The problem is to choose exactly one item from each class such that the total profit is maximized while exactly meeting the capacity. Introducing binary variables xij which take value 1 if and only if item j is chosen from class Ni, we have the formulation:

m P P (E-MCKP): Maximize pijxij i=1 j∈Ni m P P Subject to wijxij = W, i=1 j∈Ni P xij = 1, i = 1, . . . , m j∈Ni xij ∈ {0, 1}, i = 1, . . . , m, j ∈ Ni.

It is straightforward to extend the pseudo-polynomial time dynamic programming al- gorithm given by Dudzinski and Walukiewicz [33] to solve the E-MCKP by replacing all inequalities by equalities. Here, for ease of discussion, we extend the proof given by Kellerer et al. [68].

Theorem 5.5.3. E-MCKP can be solved in O(nW ) time through dynamic programming, Pm where n = i=1 |Ni|.

Proof. Let zl(d) be the optimal solution value to (E-MCKP) defined on the first l classes with restricted capacity d.

 l   X X   wijxij = d,     l i=1 j∈Ni  X X  zl(d) := max pijxij X , (5.4) xij = 1, i = 1, . . . , l, i=1 j∈Ni   j∈Ni       xij ∈ {0, 1}, i = 1, . . . , l, j ∈ Ni where zl(d) := −∞ if no solution exists. Initially, we set z0(d) := 0 for all d = 0,...,W . To compute zl(d) for l = 1, . . . , m we can use the recursion:

 zl−1(d − wl1) + pl1 if d = wl1,   zl−1(d − wl2) + pl2 if d = wl2, zl(d) = max . . (5.5) . . . .   zl−1(d − wlnl ) + plnl if d = wlnl ,

62 where ni = |Ni| and maximizing over an empty set returns −∞. The optimal solution value to E-MCKP is found to be z = zm(W ). Each iteration of (5.5) takes ni operations, giving an overall time complexity of O(nW ).

Storing a table of zl(d) values for all values of l = 1, . . . , m and d = 0,...,W , and performing the dynamic programming algorithm in the proof of Theorem 5.5.3, we have the following corollary. The optimal solution for a knapsack of size d is given by zm(d). Corollary 5.5.4. E-MCKP can be solved for all knapsacks of capacity 0 ≤ d ≤ W in O(nW ) time. The separability property for the knapsack problem as given by Horowitz and Sahni [59] is easily generalized to (E-MCKP). Let A, B define a partition of the classes. Introducing variable α which represents the capacity of the A partition, E-MCKP can be written as

P P P P (E-MCKP2): Maximize pijxij + pijxij i∈A j∈Ni i∈B j∈Ni P P Subject to wijxij = α i∈A j∈Ni P P wijxij = W − α i∈B j∈Ni P xij = 1, i = 1, . . . , m, j∈Ni xij ∈ {0, 1}, i = 1, . . . , m, j ∈ Ni.

Note that the constraints imply that 0 ≤ α ≤ W . For any fixed α, E-MCKP2 decomposes into the two E-MCKP problems defined by the partitions A and B, with optimal objective values, zA(α) and zB(W − α), respectively. That is, E-MCKP2 is equivalent to solving n A B o A B maxα z (α) + z (W − α) : 0 ≤ α ≤ W . By Corollary 5.5.4, z (α) and z (α) for all 0 ≤ α ≤ W can be found in O(nW ) time.

Lemma 5.5.5. For any given 2-partition of N1,...,Nm, E-MCKP2 can be solved for all knapsacks of capacity 0 ≤ d ≤ W in O(nW ) total time. We proceed to give a pseudo-polynomial-time algorithm which solves EQ-TSP on a Halin graph. Let τ(F ) be the restriction of τ to F . Let K be an upper bound and K be a lower P bound on e∈τ de, and S = {K,..., K}. We define a penalty function stored at vertices P of C which contains the cost of the minimum traversals of F with e∈τ(F ) de = s for each s ∈ S. Define:  βjk(s) if j, k ∈ τ,  i   jl βi (s) if j, l ∈ τ, Pi(s, τ) = kl β (s) if k, l ∈ τ,  i  0 Otherwise.

63 Additionally, introduce a variable si for i ∈ C which will be used to store the contribution of edges contracted during a fan contraction operation to constraint (5.2). The objective function of the problem now contains a cost for every edge in tour τ and additionally, a penalty at each outer vertex v. To satisfy constraint (5.2), there are the additional contributions from the variables si for i ∈ C. That is, we consider the modified equality-constrained TSP on a Halin graph defined as follows:

X X MEQ − TSP : Minimize ce + Pi(si, τ) e∈τ i∈C X X Subject to de + si = K e∈τ i∈C si ∈ S τ ∈ F.

We will recursively contract fan F in H until we are left with a wheel, storing the information at the new pseudo-node v using βc (s) for c ∈ {“jk”, “jl”, “kl”} and s ∈ S. F vF Note that although there may be an exponential number of tours in H, Pv(s, τ) depends only on the pair of edges incident with i which belong to τ together with s ∈ S, and hence

Pv(s, τ) can be identified in O(|S|) time by storing penalty 3|S|-tuples at each cycle vertex v. The penalties must be updated to store the costs of traversing F when F is contracted c to pseudo-node vF . Initially, for all c ∈ {“jk”, “jl”, “kl”}, i ∈ V (C), assign βi (0) = 0 and c βi (s) = ∞ for s 6= 0. When fan F is contracted to vF ∈ V (C), the penalty for each type of traversal is stored as βc (s) for each s ∈ S. Define c = Pr−1 c and d = Pr−1 d . Since a right- vF F i=1 ui,ui+1 F i=1 ui,ui+1 traversal of F contains the edge (v, u ) and all edges in C ∩ F , the value for βjk (s) must 1 vF jl jk account for the values of βui (sui ) for i = 1, . . . , r − 1, as well as the value for βur (sur ). That is, (r−1 ) βjk (s) = c + c + min X βjl (s ) + βjk(s ) . (5.6) vF F urv ui ui ur ur s=su +...+su 1 r i=1 +dF +durv Similarly for a left-traversal,

( r ) βkl (s) = c + c + min βkl (s ) + X βjl (s ) . (5.7) vF vu1 F u1 u1 ui ui s=su +...+su 1 r i=2 +dF +du1v

64 For a centre-traversal, the path through F detours one edge of C ∩ F , say, (up, up+1).

( βjl (s) = min c − c + c + c vF F upup+1 upv vup+1 s=su1 +...+sur +dF −dupup+1 +dupv+dvup+1 , p∈{1,...r−1} (5.8) r ) X jl jk kl + βui (sui ) + βup (sup ) + βup+1 (sup+1 ) . i=1, i6=p,p+1

Since the cij values in (5.6)-(5.8) are constants, we proceed to show that the minimums may be formulated as E-MCKP problems. The minimization in (5.6) can easily be formulated as an E-MCKP with r classes

N1,...,Nr corresponding to each vertex ui in F ∩ C and containing items correspond- jl ing to the elements of S. For each i = 1, . . . r − 1, each item t ∈ Ni has profit pit = βui (t) for jk t ∈ S and each item t ∈ Nr has prt = βur (t). All items have weight wit = t. The capacity is P W = s − dur,v − e∈F ∩C de. Similarly, the minimization in (5.7) can be formulated as an E-MCKP. For each i = jl 2, . . . r, each item t ∈ Ni has profit pit = βui (t) for t ∈ S and each item t ∈ N1 has kl P p1t = βu1 (t). All items have weight wit = t. The capacity is W = s − du1v − e∈F ∩C de. Finally, the minimization in (5.8) can be formulated as the minimum of r − 1 E-MCKP problems, one for each p ∈ {1, . . . , r − 1}. That is, for each i = 1, . . . , r, i 6= p − 1, p + 2 jl jk kl each item t ∈ Ni has profit pit = βui (t), ppt = −βup (t), and pp+1t = βup+1 (t). All items have P weight wit = t. The capacity is W = s + dupup+1 − dupuv − duvup+1 − e∈F ∩C de. Theorem 5.5.6. Let H = T ∩ C be a Halin graph which is not a wheel, and F be a fan in H. The optimal solution to MEQ-TSP for H has the same objective function value as the optimal solution for H \ F . Moreover, an optimal tour τ 0 in H \ F can be obtained from the optimal tour τ ∗ in H by contracting the edges of τ ∗ ∩ F . Proof. First we show that for any optimal solution to MEQ-TSP in H, there is a solution with the same value in H \ F when the penalties are updated using (5.6)-(5.8). Let (τ, s) be an optimal solution to MEQ-TSP on H with respect to objective function z. That is, τ is a minimum cost tour in H which together with s, satisfies the contraint. Let τ 0 ∈ H \ F be the tour obtained from τ by contracting the edges which are in F . Note τ 0 contains all the same edges as τ which do not lie in F . If τ contains a right-traversal of F , then τ 0 contains edges j and k, if τ contains a left-traversal of F , τ 0 contains k and l, and if τ contains a centre-travesal of F , τ 0 contains j and l. Let s0 be defined on the vertices of C in H \ F , such that s0 = s for i 6= v and s0 = P s + P d . That is, the i i F vF i∈V (F ) i e∈τ∩E(F ) e contributions to the objective function from penalties at vertices and edges not in F are the same for τ and τ 0. Let the contribution to the constraint from pseudo-nodes and edges P P in F be sF = K − e∈τ∩{H−F } de − i∈H−F si. We have the following 3 cases.

65 Case 1. τ contains a right-traversal of F . Then τ contains the edges in F ∩C and the edge r−1 P P (ur, v), which contribute cui,ui+1 + cur,v to the objective, and de + dur,v towards i=1 e∈F ∩C the constraint. Since τ is optimal, the restriction of s to vertices in F , s(F ) = (su1 , . . . , sur ) Pr−1 jl jk minimizes the penalty at the vertices in F , that is, s(F ) minimizes i=1 βui (sui ) + βur (sur ) Pr P such that i=1 sui + e∈F ∩C de + dur,v = sF . Using (5.6),

X X z(τ, s) = ce + Pi(si, τ) e∈τ i∈C X X X X = ce + ce + Pi(si, τ) + Pi(si, τ) e∈τ\F e∈τ∩F i∈C−F i∈C∩F r−1 r−1 X X X X jl jk = ce + cuiui+1 + curv + Pi(si, τ) + βui (sui ) + βur (sur ) e∈τ\F i=1 i∈C−F i=1 = X c + X P (s , τ) + βjk (s ) e i i vF F e∈τ\F i∈C−F = z(τ 0, s0).

Case 2. τ contains a left-traversal of F . Then τ contains the edges in F ∩C and the edge r−1 P P (u1, v), which contribute cuiui+1 + cu1v to the objective, and de + du1v towards the i=1 e∈F ∩C constraint. Since τ is optimal, the restriction of s to vertices in F , s(F ) = (su1 , . . . , sur ) Pr jl kl minimizes the penalty at the vertices in F , that is, s(F ) minimizes i=2 βui (sui ) + βu1 (su1 ) Pr P such that i=1 sui + e∈F ∩C de + durv = sF . Using (5.7),

X X X X z(τ, s) = ce + ce + Pi(si, τ) + Pi(si, τ) e∈τ\F e∈τ∩F i∈C−F i∈C∩F r−1 r X X X X jl kl = ce + cuiui+1 + cu1v + Pi(si, τ) + βui (sui ) + βu1 (su1 ) e∈τ\F i=1 i∈C−F i=2 = X c + X P (s , τ) + βkl (s ) e i i vF F e∈τ\F i∈C−F = z(τ 0, s0).

Case 3. τ contains a centre-traversal of F . Then τ contains the edges in F ∩ C, de- Pp−1 touring a single edge (up, up+1) through v, which contribute i=1 cuiui+1 + cupv + cvup+1 + Pr−1 Pr−1 i=p+1 cuiui+1 to the objective and i=1 duiui+1 + dupv + dvup+1 − dupup+1 towards the con- straint. Since τ is optimal, the restriction of s to vertices in F minimizes the penalty at the Pp−1 jl jk kl Pr jl vertices in F , that is, it minimizes i=1 βui (sui )+βup (sup )+βup+1 (sup+1 )+ i=p+2 βui (sui )

66 Pr Pr−1 such that i=1 sui + i=1 duiui+1 + dupv + dvup+1 − dupup+1 = sF . Using (5.8),

X X X X z(τ, s) = ce + ce + Pi(si, τ) + Pi(si, τ) e∈τ\F e∈τ∩F i∈C−F i∈C∩F r−1 X X X = ce + cuiui+1 + cupv + cvup+1 − cupup+1 + Pi(si, τ) e∈τ\F i=1 i∈C−F p−1 r X jl jk kl X jl + βui (sui ) + βup (sup ) + βup+1 (sup+1 ) + βui (sui ) i=1 i=p+2 = X c + X P (s , τ) + βjl (s ) e i i vF F e∈τ\F i∈C−F = z(τ 0, s0).

It remains to show that (τ 0, s0) is optimal in H \ F . Towards a contradiction, as- sume that (τ, s) is optimal in H, but (τ 0, s0) is not optimal in H \ F , where τ 0 is ob- 0 0 tained from τ by contracting the edges in τ ∩ F . Then there exists some (τ2, s2) in H \ F such that z(τ 0 , s0 ) < z(τ 0, s0). Note that τ 0 induces some penalty βc (s ) at pseudo- 2 2 2 vF vF node vF , c ∈ {“jk”, “kl”, “jl”}. Since this penalty was updated using (5.6)-(5.8), it fol- lows that the pseudo-node vF can be expanded, a traversal of type c and constraint con- 0 0 tribution variables su1 , . . . , sur can be inserted into (τ2, s2) to obtain (τ2, s2) such that 0 0 0 0 z(τ2, s2) = z(τ2, s2) < z(τ , s ) = z(τ, s). This is a contradiction and the proof is com- plete.

For a fan containing r cycle vertices, r+1 E-MCKP problems must be solved. Solving the E-MCKP problems in (5.6) and (5.7) for each s ∈ S, by Corollary 5.5.4 this takes O(|S|2r) time. By naively solving r − 1 E-MCKP problems in (5.8) and taking the minimum for each s ∈ S, the fan contraction operation takes O(|S|2r2) time in total. However, this can be done more efficiently.

Lemma 5.5.7. The fan contraction operation can be performed in O(|S|2r) time on a fan containing r cycle vertices.

Proof. First, we note that the E-MCKP does not depend on the ordering of classes, and hence neither does the dynamic programming algorithm. As a direct consequence, we may redefine zl(d) on the unordered set l of classes. Moreover, the equivalence of E-MCKP2 allows E-MCKP to be decomposed: for any two disjoint sets A and B of classes, we have

zA∪B(d) = max {zA(d − α) + zB(α)} . (5.9) α=0,...,d

Let πjk and πkl be the E-MCKP formulations of the minimizations in (5.6) and (5.7). 2 jk By Corollary 5.5.4, each can be solved in O(|S| r) time for all s ∈ S. Let zt (s) be the optimal solution for the restricted capacity subproblem on the first t classes of πjk, where

67 kl the classes are constructed in the order of u1, . . . , ur. Let zt (s) be similarly defined for πkl using the reverse order: ur, . . . , u1. jk kl Let z (s) and z (s) be the optimal solution values for πjk and πkl, respectively, for each s ∈ S. Then, βjk (s) = zjk(s) + c + c vF F vur and similarly βkl (s) = zkl(s) + c + c . vF F u1v Hence, all βjk and βkl values can be updated in O(|S|2r) time. vF vF We will show that the minimum in (5.8) formulated as the minimum of r − 1 E-MCKP problems, as previously mentioned, can be found for all s ∈ S in O(|S|2r) time using the dynamic programming algorithm in the proof of Corollary 5.5.4 by ordering the classes to jk kl allow us to reuse the restricted capacity subproblems zt (s) and zt (s). Let πp, be the E-MCKP problem constructed in (5.8) corresponding to a centre-traversal of F which detours (up, up+1). For any πp with knapsack of capacity s, decomposing the recursion using (5.9), the optimal solution value can be found using

p z (s) = z{1,...,p}∪{p+1,...,r}(s) (5.10) n o = max z{1,...,p}(s − α) + z{p+1,...,r}(α) . (5.11) α=0,...,s

Note that by ordering the classes N1,...,Np,Nr,...,Np+1 in πp, z{1,...,p}(d) and jk kl z{p+1,...,r}(d) can be found using the previously computed zp−1(d) and zr−(p+2)(d), respec- tively and performing a single step of the recursion (5.5). Then,

jl  p β (s) = min z (s) + cF − cu u + cu v + cvu . (5.12) vF p p p+1 p p+1

2 Computing all z{1,...,p}(d) and z{p+1,...,r}(d) values for all p, d takes O(|S| r) time. The maximization (5.11) is performed in O(|S|) time, so for any p, all zp(s) can be found in O(|S|2r) time. Selecting the minimum (5.12) over all p, for each s takes O(|S|r) time in total, and hence βjl can be updated in O(|S|2r) time. This completes the proof. vF

Theorem 5.5.8. Let W = {w}∩C be a wheel on n vertices. MEQ-TSP on W can be solved in O(|S|2n) time.

Proof. The optimal tour in W skirts the cycle C and detours exactly once through centre w, skipping exactly one edge of C (See Figure 6.4). W can be considered to be a fan F by identifying an edge ci which will be “exterior" to F , as shown in Figure 5.10. The fan in consideration is referred to as Fci . Then the minimum tour in W can be determined by calculating the minimum of the minimum centre-traversal of Fci together with the edge ci, which we refer to as τ1, and the tour τ2 which bypasses ci. The cost of τ1 is computed by

68 ui ci ui+1

ci−1 ci+1

ti ti+1

ci−2 ci+2

w

Figure 5.9: A tour τ in a wheel, which skips edge ci.

jl ci + βv (K − dci ). By considering Fcq for some q 6= i, the cost of τ2 is considered when Fci jl computing cq + β (K − dcq ). That is, vFcq

  jl ci + βv (K − dci ) c(s∗, τ ∗) = min Fci jl cq + β (K − dcq )  vFcq

w

ui ui+1

ti+1 ti

ti+2 ti−1 ci ti+3 ci

ci+1 ci−1 ui+1 ui ci+2 ui+2 ui−1 ui+3

Figure 5.10: A wheel considered as fan Fci .

By Lemma 5.5.7 the fan contraction operation takes O(|S|2n) time, and hence, c(s∗, τ ∗) can be computed in O(|S|2n) time.

Theorem 5.5.9. MEQ-TSP can be solved in O(|S|2n) time on a Halin graph.

Proof. Iteratively contract fans in Halin graph H until H is a wheel, storing the optimal solutions of each subproblem. After solving the problem on a wheel, expand the fans in

69 the reverse order and obtain the optimal solution to the original problem. Since each fan contraction reduces the number of vertices by r, by Lemma 5.5.7, the total time spent for the fan contraction operations is O(|S|2n). Solving MEQ-TSP on a wheel takes O(|S|2n) time by Theorem 5.5.8.

We now establish that QTSP(p,c)-Halin admits FPTAS. By using the result from The- orem 5.5.9 together with Corollary 3.2.8, we get the following.

n Corollary 5.5.10. QTSP(p,c)-Halin admits FPTAS when a, b ∈ R+.

5.6 Multiplicative QTSP

In the previous section, it is shown that QTSP(1,H) is NP-hard on Halin graphs. Theo- rem 5.5.9 can be used to immediately give a pseudopolynomial-time algorithm for QTSP(1,H). n Corollary 5.5.10 establishes that QTSP(1,H) admits FPTAS when a, b ∈ R+. In this section we give a simpler FPTAS using the result of [49]. Recall the linear description of P (H) given by Cornuejols et al. [20].

Theorem 5.6.1. [20] Let H = T ∪ C be a Halin graph. Then

E P (H) ={x ∈ R : 0 ≤ xe ≤ 1 for all e ∈ E, X (xe : e ∈ ϕ(v)) = 2 for all v ∈ V, X (xe : e ∈ K) = 2 for every 3-edge cutset K of G}.

The result by Goyal et al. [49] gives an FPTAS for the QTSP(1,H) whenever there is a polynomially bounded (in terms of the size of the input) linear description of the corresponding polytope, and the cost function is non-negative. The approach rewrites the rank 1 quadratic objective function as the product of two linear functions. The algorithm defines the parametric problem which moves one of the linear functions into the constraints, adding an additional inequality constraint ≤ β. It requires for each value of β, solving a linear system to identify two extreme points of the polytope. We show that for a Halin graph, this can be done in O(n). Moreover, for each solution, x, which is not the midpoint between two extreme points of the polytope, identifying and writing x as a linear combination of two extreme points can be done in O(1). The parametric linear program for QTSP(1,H) on a Halin graph, denoted π(H, β), is defined as:

π(H, β): Minimize aT x bT x ≤ β x ∈ P (H).

70 where P (H) is defined as in Theorem 5.6.1. It is claimed in [44] that for fixed, β, π(H, β) can be solved in pseudopolynomial time, and an FPTAS is given. However, the author was not able to verify these results and hence complete proofs are given here. From the results of Goyal et al. [49] and Cornuejols et al. [20], a (1 + )-approximation u log l can be found by solving O(  ) parametric linear programs.

Corollary 5.6.2. QTSP(1,H) on a Halin graph admits FPTAS. Moreover, if T T u = maxx∈P (H) b x, and l = minx∈P (H) b x, then a (1 + )-approximate solution can be u log l found by solving O(  ) parametric problems.

71 Chapter 6 k-neighbour TSP on Halin graphs and extensions

6.1 Introduction

The edges e = (vi, vi+1) and f = (vj, vj+1), e 6= f, are k-neighbours on τ, if and only if a shortest path between e and f on τ containing these edges has exactly k edges, for k ≥ 2. Here the shortest path refers to the path with the least number of edges, rather than the minimum cost path. Thus e and f are 2-neighbours in τ if and only if they share a common node in τ. Let q(e, f) be the cost of the pair (e, f) of edges and δ(k, τ) = {(e, f): e, f ∈ τ and e and f are p-neighbours on τ for some 2 ≤ p ≤ k}. Assume that q(e, f) = q(f, e) for every pair of edges e, f ∈ E. Then the k-neighbour TSP (TSP(k)) is defined as in [116]

TSP (k): Minimize X q(e, f) + X c(e) (e,f)∈δ(k,τ) e∈τ Subject to τ ∈ F.

The QTSP can be written as follows:

QT SP : Minimize X q(e, f) + X c(e) (e,f)∈τ⊗τ e∈τ Subject to τ ∈ F. where τ ⊗ τ = τ × τ \{(e, e): e ∈ τ}. Note:

 δ(n/2, τ) if n is even τ ⊗ τ = δ((n + 1)/2, τ) if n is odd.

72 Thus when k ≥ n/2 (for n even) or k ≥ (n + 1)/2 (for n odd), the k-neighbour TSP reduces to the Quadratic TSP [121]. Define TSP(1) to be the original TSP. Elsewhere in the literature (e.g. [42], [37]), the term Quadratic TSP is sometimes used for what we refer to as TSP(2). That is, quadratic terms are allowed, but only for pairs of edges that share a node. TSP(2) is equivalent to QTSP(A) found elsewhere in this thesis. The bottleneck version of TSP(k) was introduced by Arkin et al. in [6], denoted as the k-neighbour maximum scatter TSP. Jäger and Molitor [63] encountered TSP(2) while studying the Permuted Variable Length Markov Model. Several heuristics are proposed and compared in [41, 63] as well as a branch and bound algorithm for TSP(2) in [41]. A column generation approach to solve TSP(2) is given in [98], lower bounding procedures discussed in [99], and polyhedral results were reported by Fischer and Helmberg [42], Fischer [37], and Fischer and Fischer [40]. The k-neighbour TSP is also related to the k-peripatetic salesman problem [31, 72] and the watchman problem [18]. Algorithms for maximization and minimization versions of TSP(2) were studied by Staněk [109] and Oswin et al. [83]. To the best of our knowledge, no other works in the literature address TSP(k). In this paper we show that QTSP is NP-hard even if the costs are restricted to 0-1 values and the underlying graph is Halin. In contrast, TSP and TSP(2) on a Halin graph can be solved in O(n) time [20, 121]. Interestingly, we show that TSP(3) can also be solved on a Halin graph in O(n) time, although as we move from TSP(2) to TSP(3), the problem gets much more complicated. In fact, our approach can be extended to obtain polynomial time algorithms for TSP(k) whenever k = O(log n). We note that while Halin graphs have 3, the results on graphs with bounded treewidth (e.g. [12, 23]) usually cannot easily be extended to optimization problems with quadratic objective functions. The chapter is organized as follows. The complexity result for the k-neighbour TSP on Halin graphs is given in Section 6.2. An O(n) algorithm to solve TSP(3) on Halin graphs is given in Section 6.2.1, which can be extended to obtain an O(n2(k−1)/2) algorithm for TSP(k). Further extensions of this result to fully reducible classes of graphs are briefly discussed in Section 6.3. An earlier version of the NP-completeness results presented here were included as part of the M.Sc. thesis of the author of this thesis [116].

6.2 Complexity results

Let G be a planar embedding of a and e and f are two distinct edges of G. Then e and f are said to be cofacial if there exists a face of G which contains both e and f. This may include the outer face.

Theorem 6.2.1. Let τ be a tour in the planar embedding H = T ∪ C of a Halin graph. Then, any two edges adjacent in τ must be cofacial.

73 Proof. Suppose the result is not true. Then, there exists a tour τ in H containing two adjacent edges e = (u, x), f = (x, v) such that e and f are not cofacial. From our previous discussion on fan traversals, we can assume that x 6∈ C. Since e and f are not cofacial at x, there exists edges g = (y, x) and h = (x, z) in H such that the clockwise ordering of edges incident on x is of the form f, . . . , g, . . . , e, . . . , h (See Figure 6.1). Without loss of generality, assume T is rooted at x. Then T has at least four subtrees Tu,Tv,Ty,Tz rooted respectively at u, v, y and z. Since τ is a tour containing the edge e, it must contain a path, say P1, through the subtree Tu from u to uc ∈ C. Note that uc could be the same as u and in this case the subtree Tu is the isolated node u. Similarly, τ must contain a path P2 in Tv from v to vc ∈ C (See Figure 6.1). Note that P = P1 ∪ P2 ∪ {e, f} is a path in τ. Deleting the vertex set V (P ) of P and its incident edges from H yields a disconnected graph. Thus, τ − V (P ) must be disconnected, a contradiction.

A preliminary version of this result is given in [116].

yc

y

g

uc u v vc P1 P2 e x f

h

z

zc

Figure 6.1: A Halin graph H with non-consecutive edges e and f at node x. H − P where P = P1 ∪ P2 ∪ {e, f} has two components, hence no τ contains both edges e and f.

A path in the planar embedding H = T ∪ C of a Halin graph is called a candidate paths if its consecutive edges are cofacial. A candidate path with k-edges is called a candidate k-path. Note that only candidate paths can be subpaths of a tour but it is possible that there are candidate paths that are not part of a tour.

Corollary 6.2.2. Let H = T ∪C be a planar embedding of a Halin graph and e be a specified edge of H. Then, H has at most k · 2k−1 candidate k-paths containing e.

74 Proof. Consider extending e, if necessary in either directions in H, to a candidate k-path P . For a given end point of a sub path of P , say vertex u, by Theorem 6.2.1, there are only two possible edges incident on u, which may belong to P . Thus, there are at most 2k−1 candidate k-paths when the position of e is fixed. Since e can take any of the k positions in a candidate k-path, there are at most k · 2k−1 candidate k-paths containing e.

As an immediate consequence of Corollary 6.2.2, we have an upper bound of 2n−2 on the number of Hamiltonian cycles in a Halin graph. To see this, let r be the number of Hamiltonian cycles in H. From each such cycle, we can generate n distinct Hamiltonian paths (candidate (n − 1)-paths) by ejecting an edge. Repeating this for all Hamiltonian cycles in H, we get rn candidate (n − 1)-paths and all these paths are distinct. Hence rn is a lower bound on the number of candidate (n−1)-paths in H. By Corollary 6.2.2, (n−1)2n−2 is an upper bound on the number of candidate (n − 1)-paths in H. Thus, rn ≤ (n − 1)2n−2 n−1 n−2 n−2 and hence r ≤ n 2 ≤ 2 . Noting that there are at most 2(n−1) edges in H and that the number of quadratic costs which are relevant is the number of candidate k-paths, it follows from Corollary 6.2.2, that the number of quadratic costs which are relevant is bounded above by k · 2k · (n − 1) = O(n) for any fixed k and O(nt+2) if k ≤ t log n. Note that any face of H must contain an outer edge. Moreover, the following Corollary will prove useful. Corollary 6.2.3. If H is embedded in the plane such that it is planar and C defines the outer face, for any outer edge e which is contained in the outer face and face Fe, every tour which does not contain e must contain all other edges of Fe.

6.2.1 TSP(3)

As indicated earlier, TSP(1) is the same as TSP, which is solvable in linear time on Halin graphs [20]. TSP(2) can also be solved in linear time by appropriate modifications of the algorithm of [102] as indicated in [121]. However, for k ≥ 3, such modifications do not seem a viable option. We now develop a linear time algorithm to solve TSP(3). Let us start with an alternative formulation of TSP(3). For any subgraph G of H, let

P3(G) be the collection of all distinct candidate 3-paths in G. For each candidate 3-path

(e, f, g) ∈ P3(H), define

q(e, f) + q(f, g) c(e) + c(f) + c(g) q(e, f, g) = q(e, g) + + . (6.1) 2 3

Now consider the simplified problem:

STSP (3) : Minimize X q(e, f, g)

(e,f,g)∈P3(τ) Subject to τ ∈ F.

75 Theorem 6.2.4. Any optimal solution to the STSP(3) is also optimal solution to TSP(3).

Proof. For any τ ∈ F,

 q(e, f) + q(f, g) c(e) + c(f) + c(g) X q(e, f, g) = X q(e, g) + + 2 3 (e,f,g)∈P3(τ) (e,f,g)∈P3(τ) = X q(e, f) + X c(e). (e,f)∈δ(3,τ) e∈δ(τ)

Thus, the objective function values of STSP(3) and TSP(3) are identical for identical solu- tions. Since the family of feasible solutions of both these problems are the same, the result follows.

In view of Theorem 6.2.4, we restrict our attention to STSP(3). For TSP(1), Cornuejols et al. [20] identified costs of new edges generated by a fan contraction operation by solving a linear system of equations. This approach cannot be extended for any k-neighbour TSP for k ≥ 3 as it leads to an over-determined system of equations which may be infeasible. Instead, we extend the penalty approach used in Phillips et al. [102]. The idea here is to introduce a node-weighted version of the problem STSP(3) where we use a penalty function for the nodes of C, the value of which depends on the edges chosen to enter and exit the node, along with some other ‘candidate’ edges. We iteratively contract the fans in H, storing the appropriate values of suitable subpaths as we traverse the fans in a recursive way. Once we reach a wheel, we can compute an optimal tour for the resulting problem. Backtracking by recovering appropriate subpaths from contracted fans in sequence, an optimal solution can be identified. To formalize the general idea discussed above, let us first discuss the case where H is a Halin graph which is not a wheel. In this case, H will have at least two fans. Let F be an arbitrary fan in H with w as the centre. Label the outer nodes of F in the order they appear in C, say, u1, u2, . . . , ur (r ≥ 2). Let {j, k, l} be the 3-edge cutset

ϕ(F ) which disconnects F from H such that j is adjacent to u1, k is adjacent to w and l is adjacent to ur. Let j = (u1, u0), k = (w, x) and l = (ur, ur+1). There are exactly two edges not connected to F which are cofacial with k and incident on x. The first edge which follows k in the clockwise orientation of edges incident on x is denoted α5, and the other edge incident on x and cofacial with k is denoted by α6. (See Figure 6.2.) There are exactly two edges not connected to F and incident on u0. These edges are labelled α1, α2.

Likewise, there are exactly two edges not connected to F and incident on ur+1. These edges are labelled α3, α4. (See Figure 6.2.) Without loss of generality α1, α3 are in C and α2, α4 are in T . It is possible that α2 could be the same as α5 and also possible that α4 could be the same as α6. To complete a fan contraction operation, we consider the 3 types of traversals of F . We define a penalty function stored at nodes (pseudonodes) of C which contains attributes of a

76 minimum traversal of F of each type. For any left- or right-traversal of F , there is a single path through F using all cycle edges. Any tour which includes j and k must pass through one edge of the pair incident on u0 lying outside F together with edges y1, . . . , yr−1, tr, k, α6. Similarly, any tour which includes k and l must pass through one edge of the pair incident on ur+1 lying outside F together with edges yr−1, . . . , y1, t1, k, α5. Any tour which includes j and l must also pass through one edge in each of the pairs of edges incident on u0 (or ur+1) lying outside F . That is, every tour τ containing j and l must contain a path containing one collection of edges from the set {(α1, j, l, α3), (α1, j, l, α4), (α2, j, l, α3), (α2, j, l, α4)}. We refer to a centre-traversal of F which bypasses y1 ∈ F ∩C as a left path, one which bypasses ys ∈ F ∩ C for some s ∈ [2, r − 2] as a middle path, and one which bypasses yr−1 ∈ F ∩ C as a right path.

x

α5 α6

k

α α α1 2 w 4 α3

u0 ur+1 t1 tr

j l

u1 ur y1 yr−1

Figure 6.2: A fan F with centre w. Every τ containing j and k contains edges y1, . . . , yr−1, tr. Every τ containing k and l contains edges y1, . . . , yr−1, t1. Every τ containing j and l must contain one of the subpaths from the set {α1 −j −l −α3, α1 −j −l −α4, α2 −j −l −α3, α2 − j − l − α4}.

Let S be the set of nodes (pseudonodes) in C at some iteration in the contraction process. In TSP(3), quadratic costs are ‘absorbed’ during each fan contraction operation, depending both on the edges in F and within a distance 2 from F , so care must be taken to retain the proper information. That is, in order to develop an extension of the penalty approach used in Phillips et al. [102] for TSP(3), we extend the penalty function stored at the nodes (pseudonodes) in C that depends on an additional parameter ρ, which specifies the structure of edges around each pseudonode. Note that due to the recursive property of pseudonodes where a fan contraction operation may ‘absorb’ pseudonodes, the parameter ρ specifies a shape of the structure rather than explicitly stating the edges surrounding a pseudonode. Further, we define a function β which stores the penalty values associated with ρ. Let A1 be the collection of ordered pairs {M = (0, 0),L = (1, 0),R = (0, 1),B = (1, 1)} and A2 be the collection of ordered pairs {(1, 3), (1, 4), (1, 6), (2, 3), (2, 4), (2, 6), (5, 3), (5, 4)}.

77 1 2 1 11 12 1 2 21 22 At each node i ∈ S we define ρi = (ρi , ρi ) where ρi = (ρi , ρi ) ∈ A and ρi = (ρi , ρi ) ∈ 2 A . ρi indicates which penalty value (to be defined shortly) stored at pseudonode i is to contribute to the objective function value. The first component of ρi is a binary vector of length 2 which specifies the inner structure of i (edges y1, t1, yr−1 and tr prior to any fan contractions such that the first component is 0 if y1 is selected, and 1 if t1 is instead, and the second component is 0 if yr−1 is selected, and 1 if tr is instead), and the second component of ρi, the outer structure (α1 to α6 prior to any contraction of adjacent pseudonodes). Let

ρ be the vector containing ρi for every i ∈ S. Let ρH/F be the restriction of ρ to the vertices in H/F and augmented by ρvF ∈ {(a, b)}. Let βi(ρi) be the penalty that is incurred if ρi occurs at i. For i ∈ C define:  βi(ρi) if ρi is defined, Pi(τ, ρi) = 0 otherwise.

Since the penalties stored at i ∈ S depend on edges which are not incident with i, and the dependent edges may be ‘absorbed’ into adjacent pseudonodes so that not every ρ is feasible for a given τ. That is, the inner and outer structures of adjacent pseudonodes in C must agree. Formally, we say that ρ is feasible for τ if the following conditions are satisfied for every pseudonode i

22 1. j, k ∈ τ ⇐⇒ ρi = 6 and

21 2. k, l ∈ τ ⇐⇒ ρi = 5, and for every pair of consecutive pseudonodes i, i + 1 ∈ C

12 21 1. ρi = 1 ⇐⇒ ρi+1 = 2,

12 21 2. ρi = 0 ⇐⇒ ρi+1 = 1,

22 11 3. ρi = 3 ⇐⇒ ρi+1 = 0 and

22 11 4. ρi = 4 ⇐⇒ ρi+1 = 1.

Let F 0 be the set of all feasible (τ, ρ) pairs. For an example of a feasible (τ, ρ) pair, see Figure 6.3. The problem now contains a cost for every triplet of consecutive edges in tour τ and additionally, a penalty at each outer node i. Consider the modified 3-Neighbour TSP on a Halin graph defined as follows:

X X MTSP (3) : Minimize z(τ, ρ) = q(e, f, g) + Pi(τ, ρi)

(e,f,g)∈P3(τ) i∈C Subject to (τ, ρ) ∈ F 0.

78 F1 F2 F3

Figure 6.3: A subgraph of H which becomes a fan after contracting F1,F2 and F3. The bold edges depict a centre-traversal of F contained in Hamilton cycle τ.A (τ, ρ) pair containing ρ = ((1, 0), (2, 3)), ρ = ((0, 1), (1, 3)) and ρ = ((0, 0), (2, 6)) is feasible. The edges vF1 vF2 vF3 which correspond to the inner structure of ρ are coloured in blue and the edges which vF2 correspond to the outer structure of ρ are coloured in red. vF2

The necessary costs to construct MTSP(3) can be obtained as required by applying (6.1) or by first embedding H in the plane, and evaluating the candidate k-paths from

Corollary 6.2.2. Note that Pv(τ, ρv) can be computed in O(1) time by storing penalty 24- tuples containing the βv-values described in Table 6.1, at each cycle node v. Also note that there may be O(2n) feasible ρ vectors for a given τ, however, we show that the optimal (τ, ρ) pair can be found in O(n)-time. It is also important to note that the set of pseudonodes is retained for reasons which will become apparent.

In the initial graph, and for all ρi, i ∈ C, set βi(ρi) = 0. For fan F in H, the penalties must be updated to store the costs of traversing F when F is contracted to pseudonode vF . Let K represent the traversal of F which contains only edges in C. That is, K = P j − y1 − · · · − yr−1 − l. Then q(K) = e−f−g∈K q(e, f, g) represents the cost incurred by selecting the edges in K. Let τ(F ) and ρ(F ) be the restrictions of τ and ρ to F , respectively.

Assign the minimum cost of the right-traversal (which contains αs, s ∈ {1, 2} and α6), with inner structure of the first pseudonode a ∈ {L = (1, 0),M = (0, 0)} to βvF (a, (s, 6)).

That is, assign to βvF (a, (s, 6)) the sum of the costs along the traversal, q(αs − j − y1 − · · · − yr−1 − tr − k − α6), together with the minimum feasible set of penalties on the outer nodes contained in F , u1, u2 . . . , ur. Note that for the case that u1 6∈ S, it is not possible to have an inner structure L or B, and βvF (L, (s, 6)) = βvF (B, (s, 6)) = ∞. Otherwise

( r ) X βvF (a, (s, 6)) = q(αs − j − y1 − · · · − yr−1 − tr − k − α6) + min βui (ρui ) (τ(F ),ρ(F ))∈F 0(F ): i=1 ρ1 =a or B,ρ22 =6 u1 ur

= q(αs, j, y1) + q(K) − q(yr−2, yr−1, l) + q(yr−2, yr−1, tr) + q(yr−1, tr, k) ( r ) X + q(tr, k, α6) + min βui (ρui ) . (τ(F ),ρ(F ))∈F 0(F ): i=1 ρ1 =a or B,ρ22 =6 u1 ur (6.2)

79 Penalty Description

1 βvF ((0, ∗), (1, 6)) traversal of F with inner structure (0, ∗) and outer structure (1, 6)

2 βvF ((1, ∗), (1, 6)) traversal of F with inner structure (1, ∗) and outer structure (1, 6)

3 βvF ((0, ∗), (2, 6)) traversal of F with inner structure (0, ∗) and outer structure (2, 6)

4 βvF ((1, ∗), (2, 6)) traversal of F with inner structure (1, ∗) and outer structure (2, 6)

5 βvF ((∗, 0), (5, 3)) traversal of F with inner structure (0, ∗) and outer structure (5, 3)

6 βvF ((∗, 1), (5, 3)) traversal of F with inner structure (1, ∗) and outer structure (5, 3)

7 βvF ((∗, 0), (5, 4)) traversal of F with inner structure (0, ∗) and outer structure (5, 4)

8 βvF ((∗, 1), (5, 4)) traversal of F with inner structure (1, ∗) and outer structure (5, 4)

9 βvF ((0, 0), (1, 3)) traversal of F with inner structure (0, 0) and outer structure (1, 3)

10 βvF ((0, 1), (1, 3)) traversal of F with inner structure (0, 1) and outer structure (1, 3)

11 βvF ((1, 0), (1, 3)) traversal of F with inner structure (1, 0) and outer structure (1, 3)

12 βvF ((1, 1), (1, 3)) traversal of F with inner structure (1, 1) and outer structure (1, 3)

13 βvF ((0, 0), (1, 4)) traversal of F with inner structure (0, 0) and outer structure (1, 4)

14 βvF ((0, 1), (1, 4)) traversal of F with inner structure (0, 1) and outer structure (1, 4)

15 βvF ((1, 0), (1, 4)) traversal of F with inner structure (1, 0) and outer structure (1, 4)

16 βvF ((1, 1), (1, 4)) traversal of F with inner structure (1, 1) and outer structure (1, 4)

17 βvF ((0, 0), (2, 3)) traversal of F with inner structure (0, 0) and outer structure (2, 3)

18 βvF ((0, 1), (2, 3)) traversal of F with inner structure (0, 1) and outer structure (2, 3)

19 βvF ((1, 0), (2, 3)) traversal of F with inner structure (1, 0) and outer structure (2, 3)

20 βvF ((1, 1), (2, 3)) traversal of F with inner structure (1, 1) and outer structure (2, 3)

21 βvF ((0, 0), (2, 4)) traversal of F with inner structure (0, 0) and outer structure (2, 4)

22 βvF ((0, 1), (2, 4)) traversal of F with inner structure (0, 1) and outer structure (2, 4)

23 βvF ((1, 0), (2, 4)) traversal of F with inner structure (1, 0) and outer structure (2, 4)

24 βvF ((1, 1), (2, 4)) traversal of F with inner structure (1, 1) and outer structure (2, 4)

Table 6.1: Description of penalty 24-tuple stored at pseudonodes in C.

80 We will explain how the minimum in (6.2) can be calculated efficiently later in this paper.

Similarly, assign the minimum cost of the left-traversal (which contains αt, t ∈ {3, 4}, and α5) with inner structure a ∈ {M = (0, 0),R = (0, 1)} to βvF (a, (5, t)). In the case that ur 6∈ S, it is not possible to have an inner structure R or B, and βvF (R, (5, t)) =

βvF (B, (5, t)) = ∞. Otherwise

βvF (a, (5, t)) = q(α5, k, t1) + q(k, t1, y1) + q(t1, y1, y2) + q(K) − q(j, y1, y2) + q(yr−1, l, αt) ( r ) X + min βui (ρui ) . (τ(F ),ρ(F ))∈F 0(F ): i=1 ρ1 =a or B,ρ21 =5 ur u1 (6.3)

Let K(yi), i ∈ {1, . . . , r − 1}, be the centre-traversal of F which does not contain yi.

Then q(K(yi)) represents the cost incurred by the edges in K(yi). That is,

q(K(y1)) = q(K) + q(j, t1, t2) + q(t1, t2, y2) + q(t2, y2, y3) − q(j, y1, y2) − q(y1, y2, y3),

q(K(yp)) = q(K) + q(yp−2, yp−1, tp) + q(yp−1, tp, tp+1) + q(tp, tp+1, yp+1) + q(tp+1, yp+1, yp+2)

− q(yp−2, yp−1, yp) − q(yp−1, yp, yp+1) − q(yp, yp+1, yp+2), for p ∈ {2, . . . , r − 2}, and

q(K(yr−1)) = q(K) + q(yr−3, yr−2, tr−1) + q(yr−2, tr−1, tr) + q(tr−1, tr, l)

− q(yr−3, yr−2, yr−1) − q(yr−2, yr−1, l).

Assign the minimum cost of the centre-traversal which contains αs, s ∈ {1, 2}, and αt, t ∈ {3, 4}, which has inner structure a ∈ {L = (1, 0),M = (0, 0),R = (0, 1),B = (1, 1)} to

βvF (a, (s, t)). In the case that u1 6∈ S and a = L, there is a single path traversing F with inner structure L, namely, j − t1 − t2 − y2 − · · · − yr−1 − l, so

( r ) X βvF (L, (s, t)) = q(αs, j, t1) + q(K(y1)) + q(yr, l, αt) + min βui (ρui ) , (τ(F ),ρ(F ))∈F 0(F ): i=2 ρ12 =0,ρ22 =6 ur u2 (6.4)

81 and when u1 ∈ S, we assign the cost of the minimum centre-traversal with inner structure

L. Note that this path detours some yg, g ∈ {2, . . . , r − 1}.

  q(αs, j, t1) + q(K(yg)) + q(yr, l, αt)    ( r )  X  βv (L, (s, t)) = min + min βui (ρui ) . (6.5) F (τ(F ),ρ(F ))∈F 0(F ): g∈{2,...,r−1}  i=1   ρ11 =1,ρ12=0,   u1 r   ρ21 =5,ρ22 =6   ug ug+1 

Similarly, when a = R and ur 6∈ S, there is a single path traversing F with inner structure

R, namely, j − y1 − · · · − yr−2 − rr−1 − tr − l so

(r−1 ) X βvF (R, (s, t)) = q(αs, j, y1) + q(K(y1)) + q(tr, l, αt) + min βui (ρui ) , (τ(F ),ρ(F ))∈F 0(F ): i=1 ρ11 =0,ρ22 =6 u1 ur−1 (6.6) and when ur 6∈ S, we assign the cost of the minimum centre-traversal with structure R.

Note that this path detours some yg, g ∈ {1, . . . , r − 2}.

  q(αs, j, y1) + q(K(yg)) + q(yr, l, αt)    ( r )  X  βv (R, (s, t)) = min + min βui (ρui ) . (6.7) F (τ(F ),ρ(F ))∈F 0(F ): g∈{1,...,r−2}  i=1   ρ11 =0,ρ12=1,   u1 r   ρ21 =5,ρ22 =6   ug ug+1 

Now consider a = M. If u1 ∈ S, ur ∈ S then βvF (M, (s, t)) is assigned the cost of the minimum path detouring yg for g ∈ {1, . . . , r − 1}. If u1 (ur) is not a pseudonode then the centre-traversal must contain y1 (yr−1) and 1 (r − 1) is removed from g from the following equation.

  q(αs, j, y1) + q(K(yg)) + q(yr, l, αt)    (r−1 )  X  βv (M, (s, t)) = min + min βui (ρui ) . (6.8) F (τ(F ),ρ(F ))∈F 0(F ): g∈{1,...,r−1}  i=1   ρ11 =0,ρ12 =0,   u1 ur   ρ21 =5,ρ22 =6  ug ug+1

82 Now consider a = B. This is the same as the case where a = M except for the inner structure.   q(αs, j, y1) + q(K(yg)) + q(yr, l, αt)    (r−1 )  X  βv (B, (s, t)) = min + min βui (ρui ) . (6.9) F (τ(F ),ρ(F ))∈F 0(F ): g∈{1,...,r−1}  i=1   ρ11 =1,ρ12 =1,   u1 ur   ρ21 =5,ρ22 =6  ug ug+1

All βvF which have not been assigned are not associated with a feasible ρvF and are assigned a value ∞.

Theorem 6.2.5. Suppose H = T ∪ C is a Halin graph which is not a wheel and F is a fan ∗ ∗ ∗ in H. If (τ , ρ ) is an optimal tour pair in H then there exists a feasible ρH/F in H/F such ∗ ∗ ∗ ∗ ∗ ∗ that (τ /F, ρH/F ) is optimal in H/F and z(τ , ρ ) = z(τ /F, ρH/F ).

Proof. Let S be the set of pseudonodes in H. Let vF be the pseudonode which results from the contraction of F , and label the vertices and edges of F as in Figure 6.2. Given (τ ∗, ρ∗), we construct (τ ∗/F, ρ∗ ) as follows. Let ρ∗ = ρ∗ ∀i 6∈ F and ρ∗ corresponding to H/F H/F,i i H/F,vF ∗ ∗ the structure of (τ , ρ ) around F in H. That is, τ contains an αi, αj path through F in H, so let

ρ∗ = ((a, b), (c, d)) H/F,vF where

 ∗ ∗11 0 if (u1 6∈ S and y1 ∈ τ ) or (u1 ∈ S and ρ = 0) a = u1  ∗ ∗11 1 if (u1 6∈ S and y1 6∈ τ ) or (u1 ∈ S and ρu1 = 1),

 ∗ ∗12 0 if (ur 6∈ S and yr−1 ∈ τ ) or (ur ∈ S and ρ = 0) b = u1  ∗ ∗12 1 if (ur 6∈ S and yr−1 6∈ τ ) or (ur ∈ S and ρu1 = 1),

 1 if (u 6∈ S and α ∈ τ ∗) or (u ∈ S and ρ∗21 = 1)  1 1 1 u0  c = ∗ ∗21 2 if (u1 6∈ S and α2 ∈ τ ) or (u1 ∈ S and ρu0 = 2)   ∗ ∗21 5 if (u1 6∈ S and α5 ∈ τ ) or (u1 ∈ S and ρu0 = 5),

83 and  3 if (u 6∈ S and t 6∈ τ ∗) or (u ∈ S and ρ∗22 = 3)  r r r ur  d = ∗ ∗22 4 if (ur 6∈ S and tr ∈ τ ) or (ur ∈ S and ρur = 4)   ∗ ∗22 6 if (ur 6∈ S and tr ∈ τ ) or (ur ∈ S and ρur = 6).

Then (τ ∗/F, ρ∗ ) is feasible in H/F . H/F,vF Using equations (6.2)-(6.9) and noting that all new triples which contain vF have q(e, f, g) = 0, we get

∗ ∗ X X ∗ ∗ z(τ , ρ ) = q(e, f, g) + Pi(τ , ρi ) ∗ (e,f,g)∈P3(τ ) i∈C X X X ∗ X ∗ = q(e, f, g) + q(e, f, g) + βi(ρi ) + βi(ρi ) (e,f,g)∈ (e,f,g)∈ i∈C\F i∈F ∗ ∗ ∗ P3(τ −F ) P3(τ )\P3(τ −F ) X X ∗ = q(e, f, g) + βi(ρi ) + βvF (ρvF ) (e,f,g)∈ i∈C\F ∗ P3(τ /F −vF ) ∗ ∗ = z(τ /F, ρH/F ).

∗ ∗ It remains to show that (τ /F, ρH/F ) is optimal in H/F . Towards a contradiction, 0 0 ∗ ∗ 0 0 suppose there exists a tour pair (τ /F, ρH/F ) 6= (τ /F, ρH/F ) such that z(τ /F, ρH/F ) < ∗ ∗ 0 z(τ /F, ρH/F ). The calculations of the minimums in equations (6.2)-(6.9) imply that τ /F 6= ∗ 0 0 00 00 τ /F . Using equations (6.2)-(6.9), we can expand F , extending (τ /F, ρH/F ) to (τ , ρ ) 0 0 00 00 00 00 0 0 ∗ ∗ in H with z(τ /F, ρH/F ) = z(τ , ρ ). Then z(τ , ρ ) = z(τ /F, ρH/F ) < z(τ /F, ρH/F ) = ∗ ∗ ∗ ∗ ∗ ∗ z(τ , ρ ), contradicting the optimality of (τ , ρ ). Hence (τ /F, ρH/F ) is optimal in H/F .

We now show that βvF can be updated in O(|F |)-time, by introducing a structure which allows to optimally chain together the β-values for consecutive nodes in F ∩ C. Refer to the subgraph induced by the nodes {w} ∪ {ua, ua+1, . . . , ub} as pseudo-fan PFa,b for (1 ≤ a ≤ b ≤ r). Define the minimum penalty associated with pseudo-fan PFa,b to be PFa,b(c, d) 2 for a, b ∈ {1, . . . , r} with inner structure c ∈ {0, 1} and outer structure d = (d1, d2) ∈

{(1, 3), (1, 4), (2, 3), (2, 4)}. Note that the inner structure of pseudo-fan PFa,b refers to the edges y1, t1 and yr−1, tr within fans Fa and Fb (which are contracted to pseudonodes ua and ub), respectively. The outer structure refers to the edges α1, α2 and α3, α4 with respect to fans Fa and Fb, if ua and ub are considered as pseudonodes.

To compute PFa,b(c, d) we use the following recursion which chains together the mini- mum β-values through consecutive nodes in C while maintaining feasibility of ρ.

For c1, c2 ∈ {0, 1}, d1 ∈ {1, 2} and d2 ∈ {3, 4}, and 1 ≤ i ≤ r − 1

PF1,1((c1, c2), (d1, d2)) = βu1 ((c1, c2), (d1, d2)) (6.10)

84 PFr,r((c1, c2), (d1, d2)) = βur ((c1, c2), (d1, d2)) (6.11)

PF1,i+1((c1, c2), (d1, d2)) = min {PF1,i((c1, s), (d1, t)) + βui+1 ((t − 3, c2), (s + 1, d2))} s∈{0,1}, t∈{3,4} (6.12) and

PFi−1,r((c1, c2), (d1, d2)) = min {βui−1 ((c1, t − 1), (d1, s + 3)) + PFi,r((s, c2), (t, d2))} s∈{0,1}, t∈{1,2} (6.13)

To prove that the recursions defined by (6.10)-(6.13) are correct, first consider the op- timal

PF1,i+1((c1, c2), (d1, d2)). The minimum feasible assignment of penalties for the nodes within pseudo-fan PF1,i+1 is simply the minimum among optimal assignments of penalties for the nodes within pseudo-fan PF1,i and the penalty at pseudonode ui+1, such that these penal- ties are feasible. That is, the outer structure of PF1,i must match the inner structure of ui+1 and vice-versa. By definition, this is precisely min PF1,i((c1, s), (d1, t)) + βui+1 ((t − s∈{0,1},t∈{3,4} 3, c2), (s + 1, d2)). An analogous argument holds for PFi−1,r((c1, c2), (d1, d2)). It is now possible to compute the minimum traversals of F used in equations (6.2)-(6.9). For example, middle paths through F have a cost which minimizes the sum of the penalties on PF1,i−1 +βi and βi+1 +PFi+2,r, such that both pairs are feasible. Note that the minimum ρ(F ) has been found while performing the recursion defined by equations (6.10)-(6.13). In the worst case, when all outer nodes in F belong to S, we must compute PF1,1,...,PF1,r−1 and PFr,r,...,PF2,r, which can be done in O(|F |)-time. By pre-computing these, one can evaluate the minimum traversals of F used in equations (6.2)-(6.9), in O(|F |)-time and hence one can update βvF in O(|F |)-time. We iteratively perform the fan contraction operation, updating costs and penalties until we are left with a wheel. The optimal tour in H skirts the cycle C and detours exactly once through centre w, skipping exactly one edge of C. Orient the cycle C in the clock- wise direction. τ contains all edges in C except for the skipped edge, say ci = (ui, ui+1), together with the two edges which detour around ci. Define function φ(ci) for each edge ci = (ui, ui+1) ∈ E(C). Let ti and ti+1 be the tree edges adjacent to ui and ui+1, respectively. We will define

φ(ci) = q(ci−2, ci−1, ti) + q(ci−1, ti, ti+1) + q(ti, ti+1, ci+1)

+q(ti+1, ci+1, ci+2) − q(ci−2, ci−1, ci) − q(ci−1, ci, ci+1)

−q(ci, ci+1, ci+2).

85 ui ci ui+1

ci−1 ci+1

ti ti+1

ci−2 ci+2

w

Figure 6.4: A tour τ in a wheel, which skips edge ci.

Then, the optimal tour pair has

  ∗ ∗  X  z(τ , ρ ) = q(C) + min φ(ci) + min βuj (ρuj ) . i:ci∈C feasible ρ  uj ∈C 

Suppose that we fix an edge ci in τ. Then H can be considered to be a fan as shown in Figure 6.5.

w

ui ui+1

ti+1 ti

ti+2 ti−1 ci ti+3 ci

ci+1 ci−1 ui+1 ui ci+2 ui+2 ui−1 ui+3

Figure 6.5: A wheel considered as fan Fci .

Fix edge cr in τ and consider H to be a fan Fcr . Then the minimum tour in H can be determined by calculating the minimum of the minimum centre-traversal of Fcr and the tour which bypasses cr (using, say, fan Fc1 ). This can be computed in O(r)-time using the pseudofan technique described above. The preceeding discussion yields the following algorithm.

86 Algorithm 2 HalinTSP(3)(H, q, β) Require: Halin graph H, quadratic cost function q, and penalty function β if H is a wheel then Use the wheel procedure to find an optimal tour τ in H else Let F be a fan in H Contract F to a single node vF , using the Case 1 procedure. That is, assign penalties β to vF , assign costs of 0 to all triples in H/F and assign costs of q to all remaining triples which are 3-neighbours in H. HalinTSP(3)(H/F , q, β) end if Expand all pseudonodes in reverse order and update τ return τ

Each time that a fan is contracted, the number of tree nodes is reduced by 1, and hence the fan contraction operation is performed one less than the number of non-leaf nodes in H. The fan contraction operation can be performed in O(|F |)-time, and each time it is performed, the number of nodes in H is reduced by |F |−1. Since the wheel procedure takes O(n)-time, the total time for the algorithm is O(n).

6.2.2 TSP(k)

We now show that the previous ideas can be extended to solve TSP(k). For any subgraph G of H, let Pk(G) be the collection of all distinct candidate k-paths in G. For each candidate k-path (e1, e2, . . . ek) ∈ Pk(H), define

q(e , e ) + q(e , e ) q(e , e ) + q(e , e ) + q(e , e ) q(e , e , . . . , e ) =q(e , e ) + 1 k−1 2 k + 1 k−2 2 k−1 3 k 1 2 k 1 k 2 3 c(e ) + c(e ) + ... + c(e ) + ... + 1 2 k . k (6.14)

Now consider the simplified problem:

X STSP (k): Minimize q(e1, e2, . . . , ek)

(e1,e2,...,ek)∈Pk(τ) Subject to τ ∈ F.

Theorem 6.2.6. Any optimal solution to the STSP(k) is also optimal for TSP(k).

Proof. Using equation (6.14), the proof of this follows along the same way as that of The- orem 6.2.4 and hence is omitted.

As a result of Corollary 6.2.2, the preceding algorithm can be extended to solve TSP(k) by extending the penalty functions at outer nodes to accommodate subpaths of length 2d(k+1)/2e.

87 A complete description of these varies as the information that needs to be stored is more involved and is hence omitted. The complexity increases by a factor of (2d(k+1)/2e), which is constant for fixed k and polynomially bounded when k = t log n.

6.3 TSP(k) on fully reducible graph classes

We say that a class C of 3-connected graphs is fully reducible if it satisfies the following:

1. If G ∈ C has a 3-edge cutset which partitions G into components S and S¯, then both G/S and G/S¯ are in C and we call G a reducible graph in C; and

2. TSP can be solved in polynomial time for the graphs in C that do not have non-trivial 3-edge cutsets, i.e. 3-edge cutsets that leave both components Hamiltonian. We call such graphs irreducible.

For instance, Halin graphs can be understood as graphs built up from irreducible fans connected to the remainder of the graph via 3-edge cutsets. Cornuejols et al. [21] show that the ability to solve TSP in polynomial time on irreducible graphs in C allows to solve TSP in polynomial time on all of C using facts about the TSP polyhedron. We remark that the algorithm of Section 4 can be used to show a somewhat similar statement for TSP(k). Here we consider a graph class C that is fully k-reducible in the sense that either it can be subdivided into irreducible graphs via 3-edge cutsets, or it is irreducible and it is possible to solve the k-neighbour Hamiltonian path problem in polynomial time. This requires solving the following problem:

X X MTSP (k): Minimize q(e1, . . . , ek) + Pi(τ)

(e1,...,ek)∈Pk(τ) i∈V Subject to τ ∈ F where Pi(τ) is a penalty function for the pseudonode which depends on how tour τ traverses i, analogous to the construction for the 3-neighbour TSP of section 6.2. We recursively perform the contraction operation on the irreducible subgraphs of G, storing the necessary tour information in the penalty at the resulting pseudonode. A sim- ilar result to Corollary 6.2.2 may be derived to show that for any fixed k, this requires a polynomial number of penalties. The least cost traversals of S can be computed in polyno- mial time using a generalization of the pseudo-fan strategy above. Suppose the contraction operation is performed on a subgraph of size r in time O(P (r)), where P (r) is a polynomial in r. Each time this operation is performed, the number of nodes in the graph is reduced by r. This operation is performed at most n times and it follows that the entire algorithm can be performed in polynomial time.

88 Chapter 7

Approximation algorithms and domination analysis

7.1 Introduction

In the previous chapter, we introduced QTSP and several variations of the objective func- tion. Here, we begin our study on these problems by examining the performance of well- known heuristic algorithms for TSP. The term approximation algorithm is used for algo- rithms with a guaranteed performance ratio. The quality of a heuristic algorithm is often studied by examining a variety of criteria, including the worst-case performance analysis, average-case performance analysis and empirical analysis. This chapter is dedicated to ana- lyzing the worst-case performance of well-known heuristic algorithms for TSP when applied to QTSP, QTSP(A), QTSP(p,H) and QTSP(p,c).

7.2 Approximation algorithms

The performance ratio of an algorithm A which solves problem P is defined as the minimum ratio between the guaranteed objective function value and the optimal objective function A value, over all instances I ∈ F. That is, if xI is the worst solution that A can return, f is ∗ the objective function, and xI is an optimal solution, the performance ratio is

( A ) f(xI ) ∗ PA(F) = sup ∗ : f(xI ) > 0 . I∈F f(xI )

It is clear that PA(F) ≥ 1, and the closer it is to 1, the better the worst-case performance of A is. Usually, it is difficult to compute the exact value for PA(F) so an upper bound on the performance ratio is often used instead. A is an -approximation algorithm if PA(F) ≤ . The performance ratio is the most popular measure used in the worst-case analysis of a heuristic algorithm [113]. Since QTSP, QTSP(p,c), and QTSP(A) are all strongly NP-hard, it is not possible to find a polynomial-time -approximation algorithm for any of them.

89 However, under additional conditions, constant-factor approximation algorithms are indeed possible. In the case of the linear TSP, if the cost function satisfies the triangle inequality, it is referred to as the metric TSP, and approximation algorithms are well-known to exist. For example, the Double Tree heuristic mentioned in [97] and described in Algorithm 3 yields a performance ratio of 2 for the metric TSP.

7.2.1 Double-tree heuristic

Algorithm 3 DoubleTree Heuristic 1: Find a MST T of G with respect to cost function c. 2: Double every edge of the MST to obtain a Eulerian graph H. 3: Find an Eulerian tour E of H. 4: Output the tour that visits vertices of G in the order of their first appearance in E. Denote this tour by τ.

Theorem 7.2.1. Algorithm 3 is a 4-approximation algorithm for QTSP(p,H), where ap and bp satisfy the triangle inequality, for all p.

Proof. Since deleting any edge from an optimal tour yields a spanning tree of G, we imme- diately have that q(T ) ≤ q(τ ∗). Since E contains each edge of T twice,

p X X r X r q(E) = (2 ae)(2 be) = 4 · q(T ). r=1 e∈T e∈T

0 Consider “shortcutting” two edges i = (i1, i2) and j = (j1, j2) in any Eulerian tour E by 00 replacing them with edge k = (i1, j2), and let E be the resulting Eulerian tour. Then, applying the triangle inequality,

p 0 X X r X r q(E ) = ( ae)( be) r=1 e∈E0 e∈E0 p X r r X r r r X r = (ai + aj + ae)(bi + bj + be) r=1 e∈E0\{i,j} e∈E0\{i,j} p X r X r r X r ≥ (ak + ae)(bk + be) r=1 e∈E0\{i,j} e∈E0\{i,j} = q(E00).

Repeating the shortcutting step until E00 is a tour, we obtain τ such that q(τ) ≤ q(E). Combining these we get q(τ) ≤ 4 · q(τ ∗).

To show that this bound is tight for p = 1, consider the complete graph on n vertices with weights a, b ∈ {1, 2}n. Edges belonging to the subgraph formed by the union of a

90 spanning star S and an n − 1 cycle C, which connects the vertices of degree 1 in S are assigned ae = be = 1. All remaining edges are assigned weights ae = be = 2. Assume a node labelling such that 1 is the centre of S, and there are no consecutive numbers labelling C. An optimal tour, τ ∗, has q(τ ∗) = n2. Since q(S) = (n − 1)2, S is a minimum spanning tree. Assume MST returns S, and that Algorithm 3 constructs E = 1, 2, 1, 3, 1, 4,..., 1, n, 1. Then Algorithm 3 returns τ = (1, 2, . . . , n) with q(τ) = 4n2 − 4n + 4. This is asymptotic to 4, and hence, the factor 4 bound is tight. Refer to Figure 7.1 for an example of this construction with n = 6.

3 3 3

5 6 5 6 5 6

1 1 1

2 4 2 4 2 4 (a) Constructed graph. (b) Optimal tour τ ∗. (c) DoubleTree tour τ.

Figure 7.1: Example showing the bound in Theorem 7.2.1 is tight. Dashed edges have ae = be = 1. All other edges have ae = be = 2.

The above example can be extended to give an example showing the bound is tight for r r any arbitrary p using weights ae = be = ae = be for all r, and adding a small perturbation to ensure that the rank of q is p. The triangle inequality is not well-defined for quadratic objective functions, and cannot be immediately applied to the cost function of QTSP(A). Define the extended triangle inequality as q(e12, e23) + q(e23, e34) + q(e34, e45) + c23 + c34 ≥ q(e12, e24) + q(e24, e45) + c24 for all {v1, v2, v3, v4, v5 ∈ V }, where eij = (vi, vj) ∈ E.

Theorem 7.2.2. Algorithm 3 is a 2-approximation algorithm for QTSP(A) if (q, c) satisfies the extended triangle inequality.

Proof. Since deleting any edge from an optimal tour yields a spanning tree of G, we imme- diately have that q(T ) ≤ q(τ ∗). Since E contains each edge of T twice,

q(E) = 2 X q(e, f) + 2 X c(e) = 2 · q(T ). e,f∈T e∈T

0 Suppose that the edges e12, e23, e34 and e45 are consecutive in Eulerian tour E . Consider 0 00 “shortcutting” edges e23 and e34 in E by replacing them with edge e24, and let E be the

91 resulting Eulerian tour. Then, applying the extended triangle inequality,

q(E0) = X q(e, f) + X c(e) e,f∈E0 e∈E0 X = q(e12, e23) + q(e23, e34) + q(e34, e45) + q(e, f) 0 e,f∈E \{e23,e34} X + c(e23) + c(e34) + c(e) 0 e∈E \{e23,e34} X ≥ q(e12, e24) + q(e24, e45) + q(e, f) 0 e,f∈E \{e23,e34} X + c(e24) + c(e) 0 e∈E \{e23,e34} = q(E00).

Repeating the shortcutting step until E00 is a tour, we obtain τ such that q(τ) ≤ q(E). Combining these we get q(τ) ≤ 2 · q(τ ∗).

The construction used to show that the bound of Theorem 7.2.1 is tight, of which an example is shown in Figure 7.1, can be modified to show that the bound of Theorem 7.2.2 is tight by defining q(e, f) = 0 for all e, f ∈ E and c = a, and noting that the resulting (q, c) satisfies the extended triangle inequality.

7.2.2 2-Opt local search

The 2-Opt local search procedure is a simple local search heuristic which begins with a feasible tour and repeatedly performs improving 2-exchange moves [24]. A 2-exchange move ejects two non-adjacent edges, (vi, vi+1), (vj, vj+1) from the tour and replaces them with the only other pair of edges that maintains a tour, (vi, vj), (vi+1, vj+1). Note that one of the subpaths remaining after removing the two edges must be reversed, in order to maintain consistency in the predecessor-successor relationship of the tour. As a result, the 2-Opt algorithm is only applicable to the undirected TSP. We give a formal description of the procedure in Algorithm 4. A tour which cannot be improved by any 2-exchange move is

2-optimal. Define ∆ij to be the solution cost change resulting from a 2-exchange move.

Algorithm 4 2-Opt local search [24]

Require: An initial tour τ = v1, v2, . . . , vn. 1: while there exists ∆ij < 0 for some i, j do 2: Remove edges (vi, vi+1) and (vj, vj+1) from τ. 3: Reverse one of the two remaining subpaths. 4: Add edges (vi, vj), (vi+1, vj+1) to τ. 5: end while 6: Output τ.

92 Interestingly, a bounded performance ratio for the linear TSP for the 2-Opt local search heuristic can be obtained when the costs on edges take value 1 or 2.

Theorem 7.2.3. [70] The 2-Opt local search heuristic is a 3/2-approximation algorithm for the linear TSP when c ∈ {1, 2}E.

To show that this bound is tight, consider the complete graph G = (V,E) on the vertex u set V = {u1, u2, . . . , un} ∪ {v1, v2, . . . , vn} for odd n. Define E = {(ui, vi) : 1 ≤ i ≤ n} ∪ {(ui, vi+2) : 1 ≤ i ≤ n − 2} ∪ {(un−1, v1), (un, v2)} ∪ {(ui, vi+1) : 1 ≤ i ≤ n − 1} ⊂ E. Edges belonging to Eu are assigned cost 1. All other edges have cost 2. See Figure 7.2 for ∗ an example of the construction with n = 7. An optimal tour, τ = u1, v3, u3, v5, u5, . . . , vn, un, v2, u2, v4, u4, . . . , vn−1, un−1, v1, u1 has cost 2n. The tour τ = u1, u2, . . . , un, vn, vn−1, . . . , v1, u1 is 2-optimal and has cost 3n − 1. That is, the performance ratio of the construction is asymptotic to 3/2 and hence, the bound given in Theorem 7.2.3 is tight.

u7 v7

u6 v6

u5 v5

u4 v4

u3 v3

u2 v2

u1 v1

Figure 7.2: Example showing that the bound in Theorem 7.2.3 is tight. Dashed edges have cost 1. All other edges (including all edges which are not drawn) have cost 2.

Theorem 7.2.4. The 2-Opt local search heuristic is a 9/4-approximation algorithm for QTSP(1,H) when a, b ∈ {1, 2}E.

∗ Proof. Let τ = vτ(1), vτ(2), . . . , vτ(n) be a tour which is 2-optimal and τ be an optimal tour ∗ with respect to the QTSP(1,H) objective. With each edge e ∈ τ such that (ae, be) 6= (2, 2), 0 we associate an edge e ∈ τ such that (ae0 , be0 ) 6= (2, 2) as follows. Let e = (vτ(i), vτ(j)) 0 where i < j. If j = i + 1 then e = e, otherwise consider the edges e1 = (vτ(i), vτ(i+1)) and e2 = (vτ(j), vτ(j+1)) in τ. Either (ae1 , be1 ) 6= (2, 2) or (ae2 , be2 ) 6= (2, 2), otherwise performing 0 the 2-exchange deleting e1, e2 and inserting edges e, (vτ(i+1), vτ(j+1)) yields a tour τ with q(τ 0) < q(τ), contradicting that τ is 2-optimal. ∗ Let Uτ ∗ denote the set of edges with (ae, be) 6= (2, 2) in τ and let Uτ denote the set of edges with (ae, be) 6= (2, 2) which form the image of Uτ ∗ under the mapping described above.

93 Let Aτ and Bτ be the subsets of Uτ containing all the edges with ae and be, respectively, 0 equal to 1. Since e = (vτ(i), vτ(i+1)) ∈ Uτ is the image of an edge with (ae, be) 6= (2, 2) ∗ ∗ incident on vτ(i) in τ , and since τ is a tour, there are at most two edges in Uτ ∗ which map 0 to e . It follows that |Uτ | ≥ |Uτ ∗ |/2. Then

2 q(τ) = (|Aτ | + 2(n − |Aτ |)(|Bτ | + 2(n − |Bτ |)) ≤ (|Uτ | + 2(n − |Uτ |)) and ∗ 2 q(τ ) ≥ (|Uτ ∗ | + 2(n − |Uτ ∗ |)) .

The performance ratio is then

2 q(τ) (−|Uτ ∗ |/2 + 2n) 9 ∗ ≤ 2 ≤ . q(τ ) (−|Uτ ∗ | + 2n) 4

The construction used above for the linear TSP, depicted in Figure 7.2, can be extended to show that the bound in Theorem 7.2.4 is tight by assigning costs a = b = c.

7.3 Domination analysis

Recently, Glover and Punnen [48] proposed another measure for the quality of a heuristic algorithm A. Given a cost function f and solutions x1, x2 ∈ F, we say that x1 dominates x2 if and only if f(x2) ≥ f(x1). The domination number of A is defined as

A dom(A) = inf |{x ∈ F : f(x) ≥ f(xI )}|. I∈F Much work has been done studying the domination number of heuristic algorithms for the linear TSP [54, 55, 15, 29, 89, 56, 92, 54]. The domination ratio of A is the ratio dom(A)/|F|. The concept of combinatorial leverage, introduced by Glover and Punnen [90], is closely related to the domination ratio as well. In this section, we consider three common construction heuristics used for the linear TSP. The greedy algorithm (GR) builds a tour by repeatedly choosing the cheapest eligible arc until a tour is formed. The nearest neighbour algorithm (NN) produces a tour by starting at an initial node v1, moving to the nearest node v2, then to the nearest node v3, until all nodes have been visited, then returns to node v1. The repetitive nearest neighbour algorithm (RNN) starts NN from every node and chooses the best tour obtained.

Theorem 7.3.1. [56] The domination number of the GR and NN for TSP is 1.

94 We immediately have the following result for QTSP and QTSP(A) by setting all quadratic costs to 0.

Corollary 7.3.2. The domination number of GR and NN for QTSP and QTSP(A) is 1.

Theorem 7.3.3. [56] Let n ≥ 4. The domination number of RNN for TSP is at least n/2 and at most n − 1.

The domination number for QTSP and QTSP(A) differs from the linear TSP domination number for RNN.

Theorem 7.3.4. The domination number of RNN for QTSP and QTSP(A) is 1.

Proof. Consider the following instance of QTSP(A), which shows that RNN has domination number 1 for both QTSP and QTSP(A). Let all arcs (vi, vi+1), 1 ≤ i < n and arc (n, 1) have cost N > 1. All other arcs have cost N + 1. Define the quadratic costs as follows:

  −n − 1 j 6= i + 1, k = j + 1  q(vi, vj, vk) = −2 i = j + 1, k = j − 1   0 Otherwise.

The NN algorithm at any start node vi will move to node vi+1. For any intermediate step in the NN algorithm, if arc (vi, vi+1) is in τ, arc (vi+1, vi+2) will be added next, inducing cost N. NN and hence RNN selects the tour τ = (1, 2, . . . , n, 1) with q(τ) = nN. Tour τ 0 = (1, n, n − 1,..., 1) has cost q(τ 0) = n(N + 1) + n(−2) = nN − n < q(τ). Every tour τ 00 6= τ, τ 0 contains at least one arc not in τ, so q(τ 0) ≤ n(N +1)−n−1 = nN −1 < q(τ).

7.4 Comparisons against the average

Average value-based analysis of heuristic algorithms began in the Russian literature for the linear TSP [77, 101, 104, 106, 114]. In some sense, computing a tour with objective value no worse than the average objective value appears simple: one might randomly generate tours repeatedly, and upon termination select the minimum. As the number of tours generated increases, the probability of finding a tour no-worse-than-average tends to 1. However, designing an algorithm which is guaranteed to produce such a tour requires careful thought. Let A(G, q) denote the average of the objective function value of all feasible tours in G with respect to cost function q. For the linear TSP, the average cost of all tours in Kn with respect to linear cost function c is

2 A(K , c) = c(K ). n n − 1 n

Lemma 7.4.1. The average cost of all tours in Kn with respect to the QTSP(A) objective 2 function is A(Kn, q) = (n−1)(n−2) q(Kn).

95 Proof. Fixing 2 consecutive edges, say, e1 and e2, there remains (n − 3) vertices which can be permuted. That is, the sequence e1, e2 belongs to (n − 3)! tours. Since the total number of tours in Kn is (n − 1)!, the result follows.

7.4.1 Cheapest insertion

Definition 7.4.2. A heuristic algorithm is called an insertion method if it constructs a tour, τn, through a sequence of subtours τ1, . . . , τn such that: τ1 = v1, τ2 = v1 − v2 − v1 and

τi+1 = τi + (u, vi) + (vi, v) − (u, v) for some vi ∈ V − V (τi) and (u, v) ∈ τi.

The cheapest neighbour algorithm is the insertion method which, in each step, chooses the vertex vi and edge (u, v) which minimizes q(τi+1). We can assume without loss of generality that ties are broken by selecting in lexicographic order.

Let τcn be the tour created by the cheapest neighbour algorithm on Kn.

Theorem 7.4.3. The ratio q(τcn) can be arbitrarily bad for QTSP(A) and QTSP. A(Kn,q)

Proof. Consider the complete graph Kn on n vertices with the following costs. Linear costs are 0.

  1 if (i, j, k) = (2, 1, n),  q(vi, vj, vk) = 1 +  if (i, j, k) = (1, n − 1, n) or (j, j − 1, n), j = 3, . . . , n, (7.1)   0 Otherwise.

The cheapest neighbour algorithm beginning with (v1, v2, v3) and adding vertices in the order v4, v5, . . . , vn terminates with the tour τcn = (1, n, n − 1,..., 2, 1) and q(τcn) = 1.

2(1 + (n − 1)(1 + )) A(K , q) = n (n − 1)(n − 2)

It is clear that for sufficiently small , lim q(τcn) = ∞. n→∞ A(Kn,q) Theorem 7.4.4. The performance ratio of the cheapest neighbour algorithm relative to the average is at least O(n).

Proof. Consider the complete graph with costs defined by (7.1). Then, for sufficiently small 

2 A(Kn, q) − q(τcn) (n − 1)(n − 2) −n + (5 + 2)n − 2 − 2 = 1 − = = O(n). A(Kn, q) 2 + 2(n − 1)(1 + ) (1 + )n − 

96 7.4.2 2-Opt local search

Although it was show in [101] that for TSP on an undirected graph, a tour τ which is 2- optimal is no-worse-than-average, we do not obtain as strong a result for QTSP(A). Recall that the 2-Opt local search heuristic applies only to the undirected case. Let ∆ij be defined as above, and consider QTSP(A). Then

∆ij =q(vi−1, vi, vj) + q(vi+2, vi+1, vj+1) + q(vi+1, vj+1, vj+2) + q(vi, vj, vj−1)

− q(vi−1, vi, vi+1) − q(vi, vi+1, vi+2) − q(vj−1, vj, vj+1) − q(vj, vj+1, vj+2).

For any i in {1, 2, . . . , n}, let Ni = {1, 2, . . . , n} − {i − 1, i, i + 1}.

(n−1) Theorem 7.4.5. If τ is 2-optimal for QTSP(A), then q(τ) ≤ 2 · A(Kn, q).

Proof. Let τ be a 2-optimal tour for QTSP(A). Let ∆ = P ∆ . Then i j∈Ni ij

X ∆i = −(n − 3)[q(vi−1, vi, vi+1) + q(vi, vi+1, vi+2)] + [q(vi−1, vi, vj) + q(vi+2, vi+1, vj+1) j∈Ni +q(vi, vj, vj−1) + q(vi+1, vj+1, vj+2) − q(vj−1, vj, vj+1) − q(vj, vj+1, vj+2)]

= −(n − 3)[q(vi−1, vi, vi+1) + q(vi, vi+1, vi+2)] X + [q(vi−1, vi, vj) + q(vi+2, vi+1, vj+1) + q(vi, vj, vj−1) + q(vi+1, vj+1, vj+2)] j∈Ni −2 · q(τ) + 2 · q(vi, vi+1, vi+2) + 2 · q(vi−1, vi, vi+1) + q(vi−2, vi−1, vi)

+q(vi+1, vi+2, vi+3)

Summing over all i gives

n n X X X ∆ = ∆i = −2(n − 3) · q(τ) + [q(vi−1, vi, vj) + q(vi+2, vi+1, vj+1) i=1 i=1 j∈Ni +q(vi, vj, vj−1) + q(vi+1, vj+1, vj+2)] − 2n · q(τ) + 6 · q(τ)

= −4(n − 2) · q(τ) + 4 · q(Kn).

Since, for any τ that is 2-optimal for QTSP(A), ∆ij ≥ 0 for all i, j, it follows that ∆ ≥ 0. q(Kn) (n−1) Thus we have the result that q(τ) ≤ (n−2) = 2 · A(Kn, q).

The following example shows that this bound is tight. Consider a complete graph Kn with costs ce = 0 for all e ∈ V and q(vi, vi+1, vi+2) = 1 for i = 1, . . . , n, with vn+1 = v1 and vn+2 = v2. Assign costs q(vi−1, vi, vj) = q(vi+1, vi, vj) = 1 + ,  > 0 for all vi, vj ∈ V , j 6= i, i + 1. All other costs are set to 0. The tour τ = v1, v2, v3, . . . , vn, v1 is 2-optimal with cost n.

97 (n − 1) 1 · A(K , q) = · q(K ) 2 n (n − 2) n n + n(n − 3)(1 + ) = n − 2 n2 − 2n + n(n − 3) = n − 2 n(n − 3) = n +  n − 2

n−1 Hence, q(τ) can be made arbitrarily close to 2 · A(Kn, q).

7.4.3 Derandomization method

The QTSP can be stated as follows: Given an n2 × n2 quadratic cost matrix, find a permu- Pn Pn tation π on [1, n] that provides a minimum to φ(π) = i=1 j=1 qiπ(i)jπ(j). The QTSP can be reformulated as the problem: find min{φ(π) = φ(π(1), . . . , π(n)) : π ∈ F}, where F is the set of permutations on [1, n] consisting of a single cycle. Provided that we can compute the conditional expectations in time polynomial in n, we can use the derandomization method provided in [55], [95] to construct a polynomial-time algorithm which is no-worse-than-average for QTSP. Without loss of generality, we may restrict ourselves to showing that E(φ|π(1) = c(1), . . . , π(k) = c(k)), 0 ≤ k ≤ n, can be computed in polynomial time, where c(1), . . . , c(k) are distinct constants from [1, n]. Let M = [1, n] − {c(1), . . . , c(k)}.

98 E(φ|π(1) = c(1), . . . , π(k) = c(k), 0 ≤ k ≤ n) P P P qiπ(i)jπ(j) φ i∈N j∈N = (n − k − 1)! k k k n X X X X X = [(n − k − 1)! qiπ(i)jπ(j) + (n − k − 2)! qiπ(i)jm i=1 j=1 i=1 j=k+1 m∈M n k n X X X X X +(n − k − 2)! qimjπ(j) + (n − k − 2)! qimim i=k+1 j=1 m∈M i=k+1 m∈M k 1 +(n − k − 3)! X X q ] · isjt (n − k − 1)! i,j∈[k+1,n],i6=j s,t∈M,s6=t k k 1 k n = X X q + X X X q iπ(i)jπ(j) (n − k − 1) iπ(i)jm i=1 j=1 i=1 j=k+1 m∈M 1 n k 1 n + X X X q + X X q (n − k − 1) imjπ(j) (n − k − 1) imim i=k+1 j=1 m∈M i=k+1 m∈M 1 k + X X q (n − k − 1)(n − k − 2) isjt i,j∈[k+1,n],i6=j s,t∈M,s6=t

Since the expectation can be calculated in O(n4) time, the derandomization method will obtain a solution which is no worse than average in O(n7) time.

99 Chapter 8

Conclusion

In this thesis we have presented a systematic study of the complexity aspects of QTSP and several of its variations - the adjacent quadratic TSP (QTSP(A)), the fixed-rank QTSPs (QTSP(p,c) and QTSP(p,H)), and the k-neighbour TSP. All of the problems studied in the thesis generalize the linear TSP which has been studied extensively in the literature. The QTSP linearization problem is studied. Necessary and sufficient conditions are presented for a quadratic cost matrix Q associated with QTSP being linearizable. We show that these conditions can be verified in O(n7) time. Also, an O(n7) algorithm is presented to construct a linearization of Q whenever one exists. However, it may be noted that the input size of a general QTSP is O(n4) and hence the complexity of our algorithms is lower than a quadratic function of this input size in the general case. Our characterization extends directly to the case of complete undirected graphs. Some easily verifiable sufficient conditions for linearizability are also given along with some open problems. Since all the versions of QTSP are strongly NP-hard in general, we consider restrictions to polynomially-solvable special cases for the linear TSP which contain an exponential number of solutions. These include the single edge ejection tours on graph G∗ (SEE), double edge ejection tours on G∗ (DEE), paired vertex graphs (PV), matching edge ejection tours (MEE), pyramidal tours (PT), and Halin graphs (H). We have shown that QTSP is NP-hard on several classes of exponential neighbourhoods for which the linear TSP is polynomially-solvable. We investigate a restricted version of the QTSP objective, the fixed-rank QTSP, and examine the complexity of this problem on these classes of exponential neighbourhoods. It is shown that QTSP(p,c)-SEE, QTSP(p,c)- DEE, and QTSP(p,c)-PV can be solved in pseudopolynomial time and they also admit FPTAS. QTSP(p,c)-MEE with p = 1, can be solved in pseudopolynomial time and admits FPTAS. For fixed p > 1, the complexity status is open. For the adjacent QTSP variation, i.e. QTSP(A)-SEE, QTSP(A)-DEE and QTSP(A)-PV, we present polynomial algorithms. The problem QTSP(A)-MEE is shown to be NP-hard. As a by-product, we obtain an FPTAS for the fixed-rank quadratic shortest path problem, and a pseudopolynomial algorithm when the problem is restricted to acyclic graphs. Both the undirected and directed versions of the

100 pyramidal QTSP are studied for each variant of objective function. QTSP on Halin graphs is studied, and the k-neighbour TSP is introduced. Finally, we give some approximation and domination results.

101 Bibliography

[1] W. Adams, R. Forrester, and F. Glover. Comparisons and enhancement strategies for linearizing mixed 0-1 quadratic programs. Discrete Optimization, 1(2):99–120, 2004.

[2] W. Adams and L. Waddell. Linear programming insights into solvable cases of the quadratic assignment problem. Discrete Optimization, 14:46–60, 2014.

[3] A. Aggarwal, D. Coppersmith, S. Khanna, R. Motwani, and B. Schieber. The angular- metric traveling salesman problem. SIAM Journal on Computing, 29(3):697–711, 2000.

[4] R. Ahuja, Ö. Ergun, J. Orlin, and A. Punnen. A survey of very large-scale neighbor- hood search techniques. Discrete Applied Mathematics, 123(1):75–102, 2002.

[5] D. Applegate, R. Bixby, V. Chvatal, and W. Cook. The traveling salesman problem: a computational study. Princeton University Press, 2011.

[6] E. Arkin, Y. Chiang, J. Mitchell, S. Skiena, and T. Yang. On the maximum scatter traveling salesperson problem. SIAM Journal on Computing, 29(2):515–544, 1999.

[7] S. Arora. Polynomial time approximation schemes for euclidean traveling salesman and other geometric problems. Journal of the ACM (JACM), 45(5):753–782, 1998.

[8] B. Aspvall and Y. Shiloach. A fast algorithm for solving systems of linear equations with two variables per equation. Linear Algebra and its Applications, 34:117–124, 1980.

[9] J. Bentley. Fast algorithms for geometric traveling salesman problems. ORSA Journal on computing, 4(4):387–411, 1992.

[10] X. Berenguer. A characterization of linear admissible transformations for the m- travelling salesmen problem. European Journal of Operational Research, 3(3):232–238, 1979.

[11] A. Billionnet, S. Elloumi, and M. Plateau. Improving the performance of standard solvers for quadratic 0-1 programs by a tight convex reformulation: The QCR method. Discrete Applied Mathematics, 157(6):1185–1197, 2009.

[12] H. Bodlaender. Dynamic programming on graphs with bounded treewidth. In In- ternational Colloquium on Automata, Languages, and Programming, pages 105–118. Springer, 1988.

102 [13] R. Burkard. Admissible transformations and assignment problems. Vietnam J. Math, 35(4):373–386, 2007.

[14] R. Burkard, V. Deineko, R. van Dal, J. van der Veen, and G. Woeginger. Well-solvable special cases of the traveling salesman problem: a survey. SIAM review, 40(3):496–546, 1998.

[15] J. Carlier and P. Villon. A new heuristic for the traveling salesman problem. RAIRO- Operations Research, 24(3):245–253, 1990.

[16] E. Çela, V. Deineko, and G. Woeginger. Linearizable special cases of the QAP. Journal of Combinatorial optimization, 31(3):1269–1279, 2016.

[17] G. Chen, H. Enomoto, K. Ozeki, and S. Tsuchiya. Plane triangulations without a spanning halin subgraph: Counterexamples to the lovász–plummer conjecture on halin graphs. SIAM Journal on Discrete Mathematics, 29(3):1423–1426, 2015.

[18] W. Chin and S. Ntafos. Optimum watchman routes. In Proceedings of the second annual symposium on Computational geometry, pages 24–33. ACM, 1986.

[19] W. Cook. In pursuit of the traveling salesman: mathematics at the limits of compu- tation. Princeton University Press, 2012.

[20] G. Cornuéjols, D. Naddef, and W. Pulleyblank. Halin graphs and the travelling salesman problem. Mathematical Programming, 26:287–294, 1983.

[21] G. Cornuéjols, D. Naddef, and W. Pulleyblank. The traveling salesman problem in graphs with 3-edge cutsets. J. ACM, 32(2):383–410, apr 1985.

[22] G. Cornuéjols and G. Nemhauser. Tight bounds for Christofides’ traveling salesman heuristic. Mathematical Programming, 14(1):116–121, 1978.

[23] B. Courcelle. The monadic second-order logic of graphs. i. recognizable sets of finite graphs. Information and computation, 85(1):12–75, 1990.

[24] G. Croes. A method for solving traveling-salesman problems. Operations research, 6(6):791–812, 1958.

[25] H. Crowder and M. Padberg. Solving large-scale symmetric travelling salesman prob- lems to optimality. Management Science, 26(5):495–509, 1980.

[26] A. Ćustić and A. Punnen. A characterization of linearizable instances of the quadratic minimum spanning tree problem. arXiv preprint arXiv:1510.02197, 2015.

[27] A. Ćustić, V. Sokol, A. Punnen, and B. Bhattacharya. The bilinear assignment prob- lem: complexity and polynomially solvable special cases. Mathematical Programming, 166(1-2):185–205, 2017.

[28] M. de Berg, K. Buchin, B. Jansen, and G. Woeginger. Fine-grained complexity anal- ysis of two classic tsp variants. arXiv preprint arXiv:1607.02725, 2016.

[29] V. Deineko. New exponential neighbourhood for polynomially solvable TSPs. Elec- tronic Notes in Discrete Mathematics, 17:111–115, 2004.

103 [30] V. Deineko, B. Klinz, A. Tiskin, and G. Woeginger. Four-point conditions for the TSP: the complete complexity classification. Discrete Optimization, 14:147–159, 2014. [31] F. Della Croce, V. Paschos, and R. Calvo. Approximating the 2-peripatetic salesman problem. In Proc. Workshop on Modelling and Algorithms for Planning and Scheduling Problems, MAPSP, pages 114–116, 2005. [32] V. Demidenko. The traveling salesman problem with asymmetric matrices. Izv. Akad. Nauk. BSSR, Ser. Fiz.-mat. Nauk, 1:29–35, 1979. [33] K. Dudziński and S. Walukiewicz. Exact methods for the knapsack problem and its generalizations. European Journal of Operational Research, 28(1):3–21, 1987. [34] H. Enomoto, Y. Oda, and K. Ota. Pyramidal tours with step-backs and the asymmet- ric traveling salesman problem. Discrete applied mathematics, 87(1-3):57–65, 1998. [35] D. Eppstein. Simple recognition of halin graphs and their generalizations. J. Graph Algorithms Appl., 20(2):323–346, 2016. [36] O. Ergun and J. Orlin. A dynamic programming methodology in very large scale neighborhood search applied to the traveling salesman problem. Discrete Optimiza- tion, 3(1):78 – 85, 2006. The Traveling Salesman Problem. [37] A. Fischer. The asymmetric quadratic traveling salesman problem. Preprint, Decem- ber 2011. [38] A. Fischer. An analysis of the asymmetric quadratic traveling salesman polytope. SIAM Journal on Discrete Mathematics, 28(1):240–276, 2014. [39] A. Fischer. A polyhedral study of the quadratic traveling salesman problem. In Operations Research Proceedings 2014, pages 143–149. Springer, 2016. [40] A. Fischer and F. Fischer. An extended approach for lifting clique tree inequalities. Journal of Combinatorial Optimization, 30(3):489–519, 2015. [41] A. Fischer, F. Fischer, G. Jäger, J. Keilwagen, P. Molitor, and I. Grosse. Exact algo- rithms and heuristics for the quadratic traveling salesman problem with an application in bioinformatics. Discrete Applied Mathematics, 166:97–114, 2014. [42] A. Fischer and C. Helmberg. The symmetric quadratic traveling salesman problem. Mathematical Programming, 142(1-2):205–254, 2013. [43] E. Gabovich. Constant discrete programming problems on substitution sets. Cyber- netics and Systems Analysis, 12(5):786–793, 1976. [44] D. Gahir. Weight constrained travelling salesman problem on Halin graphs. Interna- tional Journal of Science and Research, 3:1473–1480, 2014. [45] L. Galli and A. Letchford. A compact variant of the QCR method for quadratically constrained quadratic 0–1 programs. Optimization Letters, 8(4):1213–1224, 2014. [46] P. Gilmore, E. Lawler, and D. Shmoys. The Traveling Salesman Problem. a guided tour of combinatorial optimization. Lawler, Lenstra, Rinnooy Kan (Eds), pages 87– 143, 1986.

104 [47] F. Glover. Improved linear integer programming formulations of nonlinear integer problems. Management Science, 22(4):455–460, 1975.

[48] F. Glover and A. Punnen. The travelling salesman problem: new solvable cases and linkages with the development of approximation algorithms. Journal of the Opera- tional Research Society, 48(5):502–510, 1997.

[49] V. Goyal, L. Genc-Kaya, and R. Ravi. An FPTAS for minimizing the product of two non-negative linear cost functions. Mathematical programming, 126(2):401–405, 2011.

[50] M. Grötschel and M. Padberg. On the symmetric travelling salesman problem i: inequalities. Mathematical Programming, 16(1):265–280, 1979.

[51] M. Grötschel and M. Padberg. On the symmetric travelling salesman problem ii: Lifting theorems and facets. Mathematical Programming, 16(1):281–302, 1979.

[52] G. Gutin. Exponential neighbourhood local search for the traveling salesman problem. Computers & Operations Research, 26(4):313–320, 1999.

[53] G. Gutin and A. Punnen, editors. The traveling salesman problem and its variations, volume 12 of Combinatorial Optimization. Springer New York, 2002.

[54] G. Gutin and A. Yeo. TSP heuristics with large domination number. Odense Univer- sitet. Institut for Matematik og Datalogi, 1998.

[55] G. Gutin and A. Yeo. Polynomial approximation algorithms for the TSP and the QAP with a factorial domination number. Discrete Applied Mathematics, 119(1– 2):107 – 116, 2002. Special Issue devoted to Foundation of Heuristics in Combinatorial Optimization.

[56] G. Gutin, A. Yeo, and A. Zverovich. Traveling salesman should not be greedy: dom- ination analysis of greedy-type heuristics for the tsp. Discrete Applied Mathematics, 117(1):81–86, 2002.

[57] R. Halin. Studies on minimally n-connected graphs. In Combinatorial Mathematics and its Applications (Proc. Conf., Oxford, 1969), pages 129–136, 1971.

[58] J. Hastad. Clique is hard to approximate within 1-. In Foundations of Computer Science, 1996. Proceedings., 37th Annual Symposium on, pages 627–636. IEEE, 1996.

[59] E. Horowitz and S. Sahni. Computing partitions with applications to the knapsack problem. Journal of the ACM (JACM), 21(2):277–292, 1974.

[60] S. Horton and R. Parker. On halin subgraphs and supergraphs. Discrete Applied Mathematics, 56(1):19–35, January 1995.

[61] H. Hu and R. Sotirov. A polynomial time algorithm for the linearization problem of the QSPP and its applications. arXiv:1802.02426, 2018.

[62] H. Hu and R. Sotirov. Special cases of the quadratic shortest path problem. Journal of Combinatorial, 35:754–777, 2018.

105 [63] G. Jager and P. Molitor. Algorithms and experimental study for the traveling sales- man problem of second order. In Boting Yang, Ding-Zhu Du, and CaoAn Wang, editors, Combinatorial Optimization and Applications, volume 5165 of Lecture Notes in Computer Science, pages 211–224. Springer Berlin Heidelberg, 2008.

[64] S. Kabadi and A. Punnen. Weighted graphs with all Hamiltonian cycles of the same length. Discrete mathematics, 271(1):129–139, 2003.

[65] S. Kabadi and A. Punnen. On cost matrices with two and three distinct values of hamiltonian paths and cycles. SIAM Journal on Discrete Mathematics, 20(4):977–998, 2006.

[66] S. Kabadi and A. Punnen. An O(n4) algorithm for the QAP linearization problem. Mathematics of Operations Research, 36(4):754–761, 2011.

[67] R. Karp. Reducibility among Combinatorial Problems, pages 85–103. Springer US, Boston, MA, 1972.

[68] H. Kellerer, U. Pferschy, and D. Pisinger. Introduction to NP-Completeness of knap- sack problems. Springer, 2004.

[69] W. Kern and G. Woeginger. Quadratic programming and combinatorial minimum weight product problems. Mathematical programming, 110(3):641–649, 2007.

[70] S. Khanna, R. Motwani, M. Sudan, and U. Vazirani. On syntactic versus computa- tional views of approximability. SIAM Journal on Computing, 28(1):164–191, 1998.

[71] P. Klyaus. The structure of the optimal solution of certain classes of the traveling salesman problems. Vestsi Akad. Nauk BSSR, Physics and Math. Sci., Minsk, pages 95–98, 1976.

[72] J. Krarup and I. Spadille. The peripatetic salesman and some related unsolved problems. Combinatorial programming: methods and applications: proceedings of the NATO Advanced Study Institute held at the Palais des Congrès, Versailles, France, 2-13 September 1974, page 173, 1975.

[73] E. Lawler. The quadratic assignment problem. Management science, pages 586–599, 1963.

[74] E. Lawler, J. Lenstra, A. Kan, and D. Shmoys. The Traveling Salesman Problem: a guided tour of combinatorial optimization, volume 3. Wiley New York, 1985.

[75] S. Lendl, A. Ćustić, and A. Punnen. Combinatorial optimization problems with inter- action costs: Complexity and solvable cases. arXiv preprint arXiv:1707.02428, 2017.

[76] S. Lin and B. Kernighan. An effective heuristic algorithm for the traveling-salesman problem. Operations research, 21(2):498–516, 1973.

[77] T. Minina and V. Perekrest. On a method of approximating solutions of the travelling salesman problem. In Soviet Math. Doklady, volume 16, pages 26–30, 1975.

106 [78] S. Mittal and A. Schulz. A general framework for designing approximation schemes for combinatorial optimization problems with many objectives combined into one. Operations Research, 61(2):386–397, 2013.

[79] N. Mladenović and P. Hansen. Variable neighborhood search. Computers & operations research, 24(11):1097–1100, 1997.

[80] Y. Oda. An asymmetric analogue of van der Veen conditions and the traveling sales- man problem. Discrete applied mathematics, 109(3):279–292, 2001.

[81] Y. Oda. An asymmetric analog of van der Veen conditions and the traveling salesman problem (ii). European Journal of Operational Research, 138(1):43–62, 2002.

[82] Y. Oda and K. Ota. Algorithmic aspects of pyramidal tours with restricted jump- backs. Interdisciplinary Information Sciences, 7(1):123–133, 2001.

[83] A. Oswin, A. Fischer, F. Fischer, F. Meier, U. Pferschy, A. Pilz, and R. Staněk. Minimization and maximization versions of the quadratic travelling salesman problem. Optimization, 66(4):521–546, 2017.

[84] M. Padberg and S. Hong. On the symmetric travelling salesman problem: a compu- tational study. In Combinatorial Optimization, pages 78–107. Springer, 1980.

[85] M. Padberg and G. Rinaldi. Facet identification for the symmetric traveling salesman polytope. Mathematical programming, 47(1-3):219–257, 1990.

[86] P. Pardalos, F. Rendl, and H. Wolkowitz. The quadratic assignment problem: A survey and recent developments. quadratic assignment and related problem, 1994.

[87] R. Pörn, O. Nissfolk, A. Skjäl, and T. Westerlund. Solving 0-1 quadratic pro- grams by reformulation techniques. Industrial & Engineering Chemistry Research, 56(45):13444–13453, 2017.

[88] A. Punnen. Combinatorial optimization with multiplicative objective function. Inter- national Journal of Operations and Quantitative Management, 7(3):205–210, 2001.

[89] A. Punnen. The traveling salesman problem: new polynomial approximation algo- rithms and domination analysis. Journal of Information and Optimization Sciences, 22(1):191–206, 2001.

[90] A. Punnen and F. Glover. Ejection chains with combinatorial leverage for the TSP. Technical report, Research Report, University of Colorado-Boulder, 1996.

[91] A. Punnen and S. Kabadi. A linear time algorithm for the koopmans–beckmann QAP linearization and related problems. Discrete Optimization, 10(3):200 – 209, 2013.

[92] A Punnen, F. Margot, and S. Kabadi. TSP heuristics: domination analysis and com- plexity. Algorithmica, 35(2):111–127, 2003.

[93] A. Punnen and P. Pandey. Representations of quadratic combinatorial optimization problems: A case study using the quadratic set covering problem. arXiv preprint arXiv:1802.00897, 2018.

107 [94] M. Queyranne. Performance ratio of polynomial heuristics for triangle inequality quadratic assignment problems. Operations Research Letters, 4(5):231–234, 1986.

[95] P. Raghavan. Probabilistic construction of deterministic algorithms: Approximating packing integer programs. Journal of Computer and System Sciences, 37(2):130 – 143, 1988.

[96] G. Reinelt. The traveling salesman: computational solutions for TSP applications. Springer-Verlag, 1994.

[97] D. Rosenkrantz, R. Stearns, and P. Lewis. An analysis of several heuristics for the traveling salesman problem. SIAM journal on computing, 6(3):563–581, 1977.

[98] B. Rostami, F. Malucelli, P. Belotti, and S. Gualandi. Quadratic TSP: A lower bounding procedure and a column generation approach. In Computer Science and Information Systems (FedCSIS), 2013 Federated Conference on, pages 377–384. IEEE, 2013.

[99] B. Rostami, F. Malucelli, P. Belotti, and S. Gualandi. Lower bounding procedure for the asymmetric quadratic traveling salesman problem. European Journal of Opera- tional Research, 253(3):584–592, 2016.

[100] B. Rostami, F. Malucelli, D. Frey, and C. Buchheim. On the quadratic shortest path problem. In International Symposium on Experimental Algorithms, pages 379–390. Springer, 2015.

[101] V. Rublineckii. Estimates of the accuracy of procedures in the traveling salesman problem (in Russian). Numerical Mathematics and Computer Technology, IV:18–23, 1973.

[102] A. Punnen S. Kabadi, J. Phillips. A linear algorithm for the bottleneck traveling salesman problem on a Halin graph. Information Processing Letters, 67:105–110, 1998.

[103] S. Sahni and T. Gonzalez. P-complete approximation problems. Journal of the ACM (JACM), 23(3):555–565, 1976.

[104] V. Sarvanov. The mean value of the functional of the assignment problem (in russian). Vestsi Akadeii Navuk BSSR. Seryya Fi Zi ka-Matematychnykh Navuk, 143(2):111–114, 1976.

[105] V. Sarvanov and N. Doroshko. The approximate solution of the traveling salesman problem by a local algorithm that searches neighborhoods of exponential cardinality in quadratic time. Software: Algorithms and Programs, 31:8–11, 1981.

[106] V. Sarvanov and N. Doroshko. Approximate solution of the traveling salesman prob- lem by a local algorithm with scanning neighbourhoods of factorial cardinality in cubic time. Software: Algorithms and Programs, 31:11–13, 1981.

[107] M. Skowrońska. The pancyclicity of halin graphs and their exterior contractions. In North-Holland Mathematics Studies, volume 115, pages 179–194. Elsevier, 1985.

108 [108] M. Skowrońska and M. Sysło. Hamiltonian cycles in skirted trees. Applicationes Mathematicae, 19(3-4):599–610, 1987.

[109] R. Stanek. Problems on tours and trees in combinatorial optimization. Unpublished doctoral thesis, University of Graz, Graz, Austria, 2016.

[110] O. Svensson, J. Tarnawski, and L. Végh. A constant-factor approximation algorithm for the asymmetric traveling salesman problem. arXiv preprint arXiv:1708.04215, 2017.

[111] M. Sysło and A. Proskurowski. On halin graphs. In , pages 248–256. Springer, 1983.

[112] J. Van der Veen. A new class of pyramidally solvable symmetric traveling salesman problems. SIAM Journal on Discrete Mathematics, 7(4):585–592, 1994.

[113] V. Vazirani. Approximation algorithms. Springer Science & Business Media, 2013.

[114] V. Vizing. Values of the target functional in order-of-priority problems, majorized by the mean value. Cybernetics, 9(5):809–812, 1973.

[115] S. Wang, D. Chen, and S. Pang. The number of halin graphs and outerplanar graphs. Discrete Mathematics, 256(1-2):397–405, 2002.

[116] B. Woods. Generalized travelling salesman problems on Halin graphs. Master’s thesis, Department of Mathematics, Simon Fraser University, 2010.

[117] B. Woods and A. Punnen. The pyramidal quadratic travelling salesman problem. In preparation.

[118] B. Woods and A. Punnen. The quadratic travelling salesman problem and the PQ- tree. In preparation.

[119] B. Woods and A. Punnen. The quadratic travelling salesman problem on Halin graphs. In preparation.

[120] B. Woods and A. Punnen. A class of exponential neighbourhoods for the quadratic travelling salesman problem. arXiv preprint arXiv:1705.05393, 2017.

[121] B. Woods, A. Punnen, and T. Stephen. A linear time algorithm for the 3-neighbour travelling salesman problem on a Halin graph and extensions. Discrete Optimization, 26:163 – 182, 2017.

109