Continuous Relaxations for the Traveling Salesman Problem
Tuhin Sahai, Adrian Ziessler, Stefan Klus, Michael Dellnitz

TL;DR
This paper introduces a novel approach to the TSP by embedding it into manifolds using dynamical systems, providing a biasing method for heuristics that often reduces the number of local search steps needed.
Contribution
It develops a new relaxation technique for the TSP on the manifold of orthogonal matrices and integrates it with the Lin--Kernighan heuristic to improve solution biasing.
Findings
Procrustes-based solutions often converge to undesirable equilibria.
The approach biases the Lin--Kernighan heuristic towards better solutions.
Fewer k-opt moves are needed compared to traditional methods.
Abstract
In this work, we aim to explore connections between dynamical systems techniques and combinatorial optimization problems. In particular, we construct heuristic approaches for the traveling salesman problem (TSP) based on embedding the relaxed discrete optimization problem into appropriate manifolds. We explore multiple embedding techniques -- namely, the construction of new dynamical systems on the manifold of orthogonal matrices and associated Procrustes approximations of the TSP cost function. Using these dynamical systems, we analyze the local neighborhood around the optimal TSP solutions (which are equilibria) using computations to approximate the associated \emph{stable manifolds}. We find that these flows frequently converge to undesirable equilibria. However, the solutions of the dynamical systems and the associated Procrustes approximation provide an interesting biasing approach…
Click any figure to enlarge with its caption.
Figure 1
Figure 2
Figure 3
Figure 4
Figure 5
Figure 6
Figure 7
Figure 8
Figure 9
Figure 10
Figure 11
Figure 12
Figure 13
Figure 14
Figure 15
Figure 16
Figure 17
Figure 18
Figure 19
Figure 20
Figure 21
Figure 22
Figure 23
Figure 24
Figure 25
Figure 26
Figure 27
Figure 28| TSP | -nearness | -nearness | improvement |
|---|---|---|---|
| d198 | 16540 | 16465 | 0.45 % |
| pcb442 | 50785 | 50832 | -0.09 % |
| d493 | 36028 | 35023 | 2.79 % |
| u574 | 36984 | 36926 | 0.16 % |
| rat575 | 6796 | 6790 | 0.09 % |
| p654 | 35716 | 37039 | -3.70 % |
| d657 | 49504 | 49158 | 0.70 % |
| u724 | 42295 | 41904 | 0.92 % |
| rat783 | 9054 | 8810 | 2.69 % |
| pr1002 | 261797 | 259810 | 0.76 % |
| u1060 | 224510 | 224552 | -0.20 % |
| vm1084 | 244411 | 242573 | 0.75 % |
| pcb1173 | 56934 | 56915 | 0.03 % |
| d1291 | 53357 | 51610 | 3.27 % |
| rl1323 | 279810 | 275904 | 1.40 % |
| nrw1379 | 141510 | 67035 | 52.63 % |
| fl1400 | 21319 | 22775 | -6.83 % |
| u1432 | 153213 | 153054 | 0.10 % |
| fl1577 | 28217 | 24357 | 13.68 % |
| d1655 | 95532 | 64837 | 32.13 % |
| u1817 | 58351 | 58213 | 0.24 % |
| rl1889 | 345475 | 340271 | 1.51 % |
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Continuous Relaxations for the Traveling Salesman Problem
Tuhin Sahai
United Technologies Research Center, 2855 Telegraph Ave, Suite 410,
Berkeley, CA, 94705, USA.
Adrian Ziessler
Department of Mathematics, Paderborn University,
Warburger Straße 100, 33098 Paderborn, Germany.
Stefan Klus
Department of Mathematics and Computer Science, Freie Universität Berlin,
Arnimallee 9, 14195 Berlin, Germany.
Michael Dellnitz
Department of Mathematics, Paderborn University,
Warburger Straße 100, 33098 Paderborn, Germany.
Abstract
In this work, we aim to explore connections between dynamical systems techniques and combinatorial optimization problems. In particular, we construct heuristic approaches for the traveling salesman problem (TSP) based on embedding the relaxed discrete optimization problem into appropriate manifolds. We explore multiple embedding techniques – namely, the construction of new dynamical systems on the manifold of orthogonal matrices and associated Procrustes approximations of the TSP cost function. Using these dynamical systems, we analyze the local neighborhood around the optimal TSP solutions (which are equilibria) using computations to approximate the associated stable manifolds. We find that these flows frequently converge to undesirable equilibria. However, the solutions of the dynamical systems and the associated Procrustes approximation provide an interesting biasing approach for the popular Lin–Kernighan heuristic which yields fast convergence. The Lin–Kernighan heuristic is typically based on the computation of edges that have a “high probability” of being in the shortest tour, thereby effectively pruning the search space. Our new approach, instead, relies on a natural relaxation of the combinatorial optimization problem to the manifold of orthogonal matrices and the subsequent use of this solution to bias the Lin–Kernighan heuristic. Although the initial cost of computing these edges using the Procrustes solution is higher than existing methods, we find that the Procrustes solution, when coupled with a homotopy computation, contains valuable information regarding the optimal edges. We explore the Procrustes based approach on several TSP instances and find that our approach often requires fewer -opt moves than existing approaches. Broadly, we hope that this work initiates more work in the intersection of dynamical systems theory and combinatorial optimization.
1 Introduction
The use of dynamical systems based methods for analyzing optimization algorithms is a burgeoning area of interest. For example, it has been found that if one embeds sufficiently hard instances of the satisfiability problem [BHvM09] into a corresponding dynamical system, one observes transient chaos [ERT11]. In the continuous optimization setting, accelerated momentum methods were analyzed using dynamical systems and calculus of variation based approaches, providing intuitive insight into convergence properties [SBC14, WWJ16]. However, concrete examples of the direct application of dynamical systems and continuous processes to construct new state-of-the-art algorithms are limited. In this work, we aim to use dynamical systems and their associated manifolds of the traveling salesman problem (TSP) to extract computational and algorithmic insights.
The TSP is an iconic NP-hard problem that has received decades of interest [Coo11]. This combinatorial optimization problem arises in a wide variety of applications related to genome map construction [AAM*+*00], telescope management [Car97, KK07], and drilling circuit boards [GJR91]. The TSP also naturally arises in applications related to target tracking [ESC13], vehicle routing [LK81], and communication networks [GLO03] to name a few. Recently, a history dependent TSP was used to construct efficient techniques for learning the structure of Bayesian networks [SK15]. For further information about applications related to the TSP, we refer the reader to [Coo11].
In its basic form, the statement of the TSP is exceedingly simple. The task is to find the shortest Hamiltonian circuit through a list of cities, given their pairwise distances. Despite its simplistic appearance, the underlying problem is NP-hard [Kar10]. Several heuristics have been developed over the years to solve the problem including ant colony optimization [DG97], cutting plane methods [ABCC98, PR91], Christofides heuristic algorithm [Chr76], and the Lin–Kernighan heuristic [LK73].
In this work, we concentrate on exploring novel orthogonal relaxation and embedding based approximations to the TSP that are inspired from dynamical systems theory. In the first part, we construct a dynamical systems approach for computing locally optimal solutions of the TSP. This flow on the manifold of orthogonal matrices converges to a permutation matrix that minimizes the tour length. Although the method is interesting and elegant, the flow often converges to local minima. For TSP instances with more than cities, these minima are not competitive when compared to state-of-the-art heuristics [ABCC98, Coo11, LK73, PR91].
However, inspired by this continuous relaxation, we compute the solution to a two-sided orthogonal Procrustes problem [GD04] that relaxes the TSP to the manifold of orthogonal matrices. We find that this Procrustes approach can be combined with the Lin–Kernighan heuristic [LK73] for computing solutions of the TSP. The Lin–Kernighan heuristic is an extremely popular method for the TSP and has been credited with finding the best known solutions for several large instances [Hel98, Hel06]. It has been particularly successful in finding the best known solutions for several asymmetric TSPs [Hel98]. We provide a detailed description of the Lin–Kernighan heuristic in Section 2.1.
Helsgaun’s software package LKH [Hel98] is a highly successful software implementation of the approach. This implementation uses minimum spanning trees [HK70, HK71] to pre-compute candidate sets that contain edges that are likely to be a part of the optimal solution. This biasing methodology is found to reduce the number of -opt moves compared to baseline minimum tree based methods [Hel98]. In our work, the Procrustes solution is used to bias the Lin–Kernighan heuristic algorithm to pick edges are that more likely to be in the optimal tour. We remark that our approach is tightly connected to spectral methods for graphs [KS18]. Although, the Procrustes based methodology has a higher overall computational cost due to the required eigenvector computations – compared to in the case of the traditional Lin–Kernighan heuristic [LK73]. However, the Procrustes based Lin–Kernighan computation frequently converges faster (in fewer iterations) than the -tree based approach.
Our goals are twofold: First, we would like to demonstrate that the spectral structure of the associated matrices of these classes of problems contain valuable information that can be exploited for analysis and construction of novel heuristics. Second, we envision that by approximating the spectral structure [SSO17], one could potentially construct competitive methods for the TSP and the quadratic assignment problem (QAP). Moreover, we note that although eigenvalue and orthogonal approximations have been constructed for the TSP, they have traditionally been used for deriving bounds for the solutions [FBR87, HRW90]. To the best of the authors knowledge, this work is the first attempt to use the orthogonal relaxations and dynamical systems theory to construct computational methods for the TSP.
Our paper is organized as follows: We start with the mathematical formulation of the TSP in section 2. In section 2.1-2.3, we describe the standard Lin–Kernighan heuristic along with techniques to limit the search space using -nearness values (based on minimum spanning trees). In section 3, we construct dynamical systems on the manifold of orthogonal matrices that converge to Hamiltonian cycles. Using these dynamical systems, we analyze the stability and subsets of the stable manifold of the optimal TSP solutions using set-oriented numerical methods implemented in the software package GAIO [DFJ01]. We perform the computations in an effort to gain insights into the local dynamics of the flow in the neighborhood of the optimal solutions. In general, we find that the basin of attraction is typically quite small and therefore, these dynamical systems converge to undesirable local minima. Inspired by these insights, we use a Procrustes-based approach for biasing the Lin–Kernighan heuristic based on “-nearness values” in section 4. Numerical results are presented in section 5. Finally, we conclude with future work in section 6.
2 The traveling salesman problem
Given a list of cities and the associated distances between cities and , denoted by , the TSP aims to find an ordering of such that the tour cost, given by
[TABLE]
is minimized. For the Euclidean TSP, for instance, , where is the position of . In general, however, the distance matrix does not have to be symmetric. The ordering can be represented as a unique permutation matrix . Note, however, that due to the underlying cyclic symmetry, multiple orderings – corresponding to different permutation matrices – have the same cost.
There are several equivalent ways to define the cost function of the TSP. We restrict ourselves to the trace111The trace of a matrix is defined to be the sum of all diagonal entries, i.e., . formulation proposed in [Won95]. Let denote the set of all permutation matrices, then the TSP can be written as a combinatorial optimization problem of the form
[TABLE]
where and . Here, is defined to be the adjacency matrix of the cycle graph of length . In what follows, we use the undirected cycle graph adjacency matrix for symmetric TSPs and the one corresponding to the directed cycle graphs for asymmetric TSPs. The matrices are defined as,
[TABLE]
The equivalence of (1) and (2) can be derived easily using the observation that is a permuted tour matrix, i.e., the entry is if the tour goes from city to city . Thus, for any permutation, is simply the sum of the distances associated with each edge. In what follows, we restrict our work to symmetric matrices; thus, we simply consider tour matrix for undirected graphs.
The TSP can also be regarded as a special case of the general QAP [BcPP98, KB57], given by
[TABLE]
or, alternatively as, a special case of the graph matching problem. The relationship between various combinatorial optimization problems is explored in Figure 1. In order to convert the minimization problem into an equivalent maximization problem, note that
[TABLE]
Thus, the norm is minimized if the trace is maximized and vice versa. We note that similar trace formulations for the QAP were derived in [FBR87].
Over the last few decades, a plethora of heuristics has been developed to solve the TSP efficiently. In order to find a good approximation of the optimal tour, typically different global and local heuristics are combined. A very efficient and powerful methodology is to construct an initial solution with the aid of greedy algorithms, for instance the nearest neighbor heuristic, and to improve the solution successively using local heuristics such as -opt move based methods (as described in section 2.1). As noted previously, one of the best available TSP solvers is Helsgaun’s LKH software [Hel98]. We now provide more details on LKH and its implementation.
2.1 The Lin–Kernighan heuristic
The Lin–Kernighan heuristic is a popular heuristic for the TSP introduced in [LK73]. Starting from an initial tour, the approach progresses by extracting edges from the tour and replacing them with new edges, while maintaining the Hamiltonian cycle constraint. If edges in the tour are simultaneously replaced, this is known as the -opt move [Hel09]. To prune the search space, the algorithm relies on minimum spanning trees [HK70, HK71] to identify edges that are more likely to be in the tour. This “importance” metric for edges is called -nearness and described subsequently. The algorithm has found great success on large instances of the TSP [Hel98, Hel06]. Note that this algorithm has been extended to generalized TSPs [Hel14b] and clustered TSPs [Hel14a].
The LKH package [Hel98, Hel06] offers different heuristics to compute an initial tour. The standard method is to choose one node at random and to iteratively add edges based on computed -nearness values and related candidate sets until a tour is found. When an initial tour has been found, LKH improves it using local heuristics. A very popular and efficient local heuristic is the -opt move. The simplest version, -opt, removes two edges of the tour and reconnects the subtours as shown in Figure 2. If the resulting tour is shorter than the original tour, the step is accepted and rejected otherwise. Similarly, -opt removes three edges of the current tour, reconnects the subtours and picks the shortest tour.
2.2 Candidate sets and –nearness
LKH uses -opt with varying . The basic move is a sequential -opt step. In order to limit the search space and to increase the efficiency of -opt moves, candidate sets that contain promising edges are computed for all cities. Methods to construct candidate sets for large TSPs have to be efficient in terms of both CPU time and memory usage. As mentioned previously, the standard approach implemented in LKH, called -nearness, is based on minimum spanning trees or, to be more precise, on 1-trees (a slight variant of minimum spanning trees).
Definition 2.1**.**
Let be a graph with vertices and edges . A 1-tree for is defined to be a spanning tree for the vertices plus two additional edges incident to vertex .
A 1-tree with minimum weight is called a minimum 1-tree. Note that every tour is a 1-tree with the additional property that the degree of each vertex is two. It has been found that the minimum 1-tree typically contains several edges that lie in the optimal tour. The definition of -nearness is based on a sensitivity analysis using 1-trees. The -nearness value for the cities and is, roughly speaking, the difference between a minimum 1-tree and a 1-tree that is required to contain edge . That is, if an edge belongs to the minimum 1-tree, then the -nearness value is [math] and the edge is assigned a high probability of being part of the shortest tour.
For each city, the candidate set is then defined to be the set of the incident edges with the lowest -nearness values. The candidate sets are used to limit and direct the search. Candidate sets based solely on the distance between cities are typically not connected (for instance, see Figure 11) and convergence to a good solution of the TSP is expected to be slow. It was shown by Stewart [Ste87] that minimum spanning trees, which are by definition always connected, can be used to increase the efficiency of local heuristics.
2.3 Subgradient optimization
The -nearness values, typically do not give rise to optimal tours when coupled with k-opt moves. In order to improve the -nearness values, a subgradient optimization method is often used. This method modifies the original distance matrix in a way such that the degree of almost all vertices of the optimized 1-tree converge to a value of . The entries of the new distance matrix, , are computed as
[TABLE]
The values, sometimes called penalties, change the distances between the cities. The basic idea is to make edges incident to vertices with a low degree shorter and edges incident to vertices with a high degree longer so that the resulting 1-tree is close to a tour. This transformation of the distance matrix does not change the shortest tour and leads to significantly improved -nearness values [Hel98]. This method can also be used to compute a lower bound which is in general very close to the optimal tour length [HK70, HK71]. Figure 3 shows the impact of the subgradient optimization. In the example, most of the edges of the optimal tour are already present in the optimized 1-tree. For a more detailed description of -nearness, 1-trees, and the subgradient optimization scheme, we refer to [HK70, HK71, Hel98].
3 Dynamical systems approach
In this section, we construct a dynamical systems approach for computing optimal tours for the TSP. In particular, we use matrix differential equations defined on the manifold of orthogonal matrices. As mentioned in previous sections, solutions of the TSP can be represented as permutation matrices. It is well known that permutation matrices lie on the manifold of orthogonal matrices. Our goal is to construct flows that minimize the TSP cost as they evolve. Note that gradient flow methods were first used by Brockett to compute eigenvalues and to solve linear programming or least squares matching problems [Bro89, Bro91]. This approach was subsequently also used for combinatorial optimization problems [WY10, Won95, ZP08]. We will now formulate multiple cost functions for constructing gradient flows for the TSP. In what follows, let us denote by the set of all orthogonal matrices. In this section, we consider the following orthogonal relaxation of the combinatorial optimization problem (2),
[TABLE]
Given that we will use the solution of the Procrustes problem in both the dynamical systems approach and Lin-Kernighan heuristic, we start by defining the problem and its solution.
3.1 The two-sided orthogonal Procrustes problem
We start by considering the standard formulation of the Procrustes problem. We will then modify it to the TSP setting. Let and be two symmetric matrices. Then
[TABLE]
is called the two-sided orthogonal Procrustes problem. As shown in (4), cost function (5) is minimized if the cost function of the Procrustes problem is maximized and vice versa. Since , the cost of the orthogonal matrix is always lower than (or equal to if the matrices and are permutation-similar) the cost of the permutation matrix.
Theorem 3.1**.**
Given two symmetric matrices and , whose eigenvalues are distinct, let and be eigendecompositions, with , , and as well as . Then every orthogonal matrix which minimizes (6) has the form
[TABLE]
where .
A proof of this theorem can be found in [Sch68], for example. If the eigenvalues of and are distinct, then there exist different solutions with the same cost. If one or both of the matrices possess repeated eigenvalues, then the eigenvectors in the matrices and are determined only up to basis rotations, which further increases the solution space.
We note that, as shown in (4), the minimization of the TSP cost corresponds to the maximization of the cost in (6) and not the standard minimization found in literature. The theorem states that in order to minimize the cost function in (6), the eigenvalues and corresponding eigenvectors have to be sorted both in either increasing or decreasing order. On the other hand, from the proof of the theorem it can be seen that in order to compute the solution of (5), the eigenvalues and eigenvectors of and , respectively, have to be sorted in opposite order (which corresponds to the maximization of the cost in (6)). A similar condition was noted in [AW00].
Let us now consider gradient flows for orthogonal and tour matrices. We note that the Procrustes problem is relevant for the resulting dynamical systems as demonstrated below.
3.2 Gradient flows for orthogonal matrices
The orthogonal relaxation of the combinatorial optimization problem (2), given by (5), can be solved using a steepest descent method on the manifold of orthogonal matrices. Given a cost function , the gradient flow is defined as
[TABLE]
which is a matrix differential equation evolving on the manifold of orthogonal matrices. That is, starting with an orthogonal matrix , the trajectory remains for all time in . Let be the standard Lie bracket and the generalized Lie bracket. The gradient of a function defined on the manifold of orthogonal matrices is
[TABLE]
where is the matrix of partial derivatives [EAS98], i.e., .
Lemma 3.2**.**
For the cost function , we obtain
[TABLE]
Proof.
Since , see [PP08], using (8) it directly follows that , which can be rewritten as above. ∎
This is our generalization of the matrix flow defined in [ZP08] for the symmetric graph matching problem. If and are symmetric, this can be simplified to
[TABLE]
Since the optimal solution of this optimization problem is in general not a permutation matrix, Zavlanos and Pappas [ZP08] use a second term for solving the graph matching problem, which penalizes nonnegative entries. Note that the set of permutation matrices is the intersection of the sets of orthogonal and nonnegative matrices. In order to force the gradient flow to converge to a permutation matrix, a cubic penalty function is used.
Lemma 3.3**.**
Let denote the Hadamard or element-wise product of two matrices. For the penalty function , the gradient is given by
[TABLE]
Proof.
Note that . Using (8) results in the above gradient. ∎
By combining the two functions and , it is possible to compute a permutation matrix which is “close” to the optimal orthogonal solution. In [ZP08], the steady state solution of the superimposed gradient flows for and , given by
[TABLE]
is computed for , then the parameter is set to a value sufficiently close to so that the flow converges to a permutation matrix. Another approach is to apply a homotopy-based scheme, where is the continuation parameter which is gradually increased until the solution is close to a permutation matrix.
In what follows, we will consider the TSP as a constrained optimization problem of the form,
[TABLE]
This formulation gives rise to the following set of equations,
[TABLE]
The above set of equations are obtained by using gradient descent on the Lagrangian cost function, as described in [PB88], for general constrained optimization problems. Note that in (12) is the Lagrange multiplier.
Example 3.4**.**
In order to illustrate the gradient flow approach, let us consider a simple TSP with 10 cities. Using (12), we obtain the results shown in Figure 4. In this example, the dynamical system converges to the optimal tour.
Next, we will perform a detailed numerical study of the gradient flow (12) for a simple TSP with five cities. We first consider (12) without the equality constraints, i.e.,
[TABLE]
As mentioned previously, for the symmetric TSP, we set and . Solving (13) forward in time yields a solution that minimizes the cost function in . This solution can also be computed by solving the two-sided orthogonal Procrustes problem (6). However, since the matrix possesses repeated eigenvalues, the Procrustes problem has infinitely many solutions due to rotational degeneracy. An illustration of the Procrustes sets is shown in Figure 5. We note that the structure of a Procrustes set becomes more and more complex for larger since the number of repeated eigenvalues also increases with .
To shed light on the stability and local dynamics around the optimal TSP solutions we approximate subsets of the stable manifold of the Procrustes solutions such that two permutation matrices are inside these sets. Note that the two matrices are explicitly shown in (14). This numerical study will help us to understand if the Procrustes solutions are robust under small perturbations of the initial permutation matrix and whether or not the Procrustes solution is, in general, a viable approach to constructing useful initial conditions and determine how close the Procrustes solution is to the optimal permutation matrix. In order to compute the sets of interest, we will use a set-oriented continuation technique developed in [DH96], which recently has been extended to the computation of unstable manifolds for infinite dimensional dynamical systems [ZDG18].
Let be a compact set within which we want to approximate the subset of the stable manifold of a permutation matrix . We define a partition of to be a finite family of compact subsets of such that
[TABLE]
Moreover, we denote by the element of containing . In our context, is a reordering of an (orthogonal) matrix into a vector, i.e., (cf. [PP08]). We consider a nested sequence , of successively finer partitions of , requiring that for all there exist cells such that and . A set is said to be of level . The partition is computed by a subdivision procedure, where we subdivide each cell of the previous partition with respect to the -th coordinate, where is varied cyclically (for more details see [DH97]). However, these subdivision steps are only done virtually and we do not store the cells of the partition .
We assume that is the cell which contains the initial permutation matrix in vector form. Furthermore, let us denote by the time--map of (13). Then the numerical realization of the continuation algorithm for the approximation of the subsets of the stable manifold can be described as follows:
Remark 3.5**.**
- a)
In the application of Algorithm 1 we have to perform the continuation step
[TABLE]
Numerically this is realized as follows: First, is evaluated for a large number of test matrices , for each cell . Then a cell is added to the collection if there is at least one such that . In practice, the components of the test matrices can be chosen according to several different strategies: For low-dimensional problems one can choose them from a regular grid within each cell . Alternatively, one can select them via a Monte-Carlo sampling. Observe however that, in general, for . Hence, in order to construct an orthogonal matrix we compute a polar decomposition of (cf. **[Hig86]**). The polar decomposition yields a small perturbation of the permutation matrix . 2. b)
The number of continuation steps crucially depends on the choice of the integration time . In general, the smaller we choose the more continuation steps are done which leads to a higher computational cost. However, to prevent isolated cells in the covering, has to be chosen sufficiently small. 3. c)
The choice of the integration time can be relaxed by choosing a finite time grid , for , where we mark all cells in which are hit in each time step. This allows us to increase the integration time without decreasing the quality of the covering obtained by Algorithm 1.
For the five-dimensional example, we choose , and a fine partition of for . In particular, this means that is subdivided into cells of radius , for . Moreover, we use the strategy described in Remark 3.5 c). In Figure 6, we illustrate two subsets of the stable manifold containing the permutation matrices
[TABLE]
Small perturbations of these matrices result in different Procrustes solutions on the corresponding Procrustes set.
Note that by using (13) we will always obtain a Procrustes solution, which is in general not a permutation matrix. In fact, a stability analysis shows that the optimal permutation matrix is hyperbolic with four unstable directions. We expect that those directions become stable as we enable the equality constraint in (11) and use the gradient flow (12). To this end, let us consider the flow (12). By using a forward difference scheme, we approximate the Jacobian in a small perturbation of the optimal permutation matrix and compute the eigenvalues. The unstable directions become stable, but there are still four eigenvalues with positive (but small) real part. Note that the Lagrange multiplier, unfortunately, maps the optimal solution of the TSP to saddle points. Hence, although the optimal permutation matrix is still not stable, we expect the trajectories to stay in a small neighborhood of the optimal permutation matrix since the positive (unstable) eigenvalues have a small real part. Then we can extract the optimal permutation matrix.
Next we will numerically analyze how likely it is to obtain the optimal permutation matrix by using (12). Hence, we compute the basin of attraction (subsets of the stable manifold) of the optimal permutation matrix
[TABLE]
Again, we use an adaption of the set-oriented continuation technique by Dellnitz et al., where we integrate (12) backward in time. Therefore, we only have to change the time--map in Algorithm 1 to the one that corresponds to the new dynamical system shown in (12). We compute the small perturbations of the optimal permutation matrix by polar decomposition. We set and choose and as before. In Figure 7 (a)–(b) we show different three-dimensional projections of the basin of attraction of . The dark cells depict the stationary solutions of the gradient flow (12) backward in time. There are four different stationary solutions which are also permutation matrices, two of which are shown below,
[TABLE]
Observe that the Procrustes sets of the gradient flow (13) are not covered by the basin of attraction. In fact, this is clear since we start in a local minimizer and we solve the gradient flow backward in time. This is equivalent to maximizing the cost function (11) subject to the equality constraints. Since the Procrustes solution is the global minimizer of the cost function without the constraints, it is, in general, not possible to find this solution via the gradient flow backward in time. Hence, it cannot be in the basin of attraction of the optimal solution of the TSP when using the dynamical system given by (12). The box-counting dimension (see, e.g., [HK99]) of the covering of the basin of attraction is (about million cells in the -dimensional space).
In an effort to address the complications due to the infinite number of Procrustes solutions, we now reformulate the dynamical systems using tour matrix representations of the solutions.
3.3 Gradient flows for tour matrices
Instead of forcing the gradient flow to converge to a permutation matrix, an alternative approach is to define a cost function in such a way that the flow converges directly to a permutation of the initial tour matrix . For the symmetric case (9), Brockett [Bro91] introduces a change of variables, given by . The resulting double bracket flow, , then evolves in the space of symmetric matrices and is only quadratic in .
We now extend this to the nonsymmetric case. Assuming that the objective function can be rewritten as a function , we want to derive a gradient flow for the new variable . For the TSP, again and . Note that, as before, the matrix is replaced by and for symmetric and asymmetric TSP instances respectively. With the aforementioned transformation, the cost function for the relaxed TSP from Lemma 3.2 can be written as
[TABLE]
where .
Remark 3.6**.**
For directed cycle graphs, i.e., , the non-relaxed version of (15) is identical to the cost of the linear assignment problem (LAP) [KS18], with the difference that here the set of feasible solutions is constrained to a subset of , which makes the problem NP-hard.
Theorem 3.7**.**
Let be a given cost function, then the gradient flow is given by
[TABLE]
Proof.
Since , using (7) and (8) we obtain
[TABLE]
Applying the chain rule, this leads to
[TABLE]
where is a single-entry matrix [PP08], i.e., . It follows that
[TABLE]
Inserting this into the equation for concludes the proof. ∎
For the cost function , we simply obtain . With the aid of Theorem 3.7, we can then compute the corresponding gradient flow. In addition to the cost function, a penalty function has to be used to find an admissible solution.
One possibility would be to penalize negative entries as described in Section 3.2. However, for the tour matrix approach we use a combination of two penalty functions. The first penalty function is given by,
[TABLE]
which penalizes entries that are not zero or one. Furthermore, we also use a second penalty function
[TABLE]
where are linear equality constraints that force the flow to converge to a matrix with row and column sums equal to two and diagonal entries equal to zero. Given both penalty functions, we consider the following TSP as a constrained optimization problem,
[TABLE]
In order to solve (18), we will solve the resulting system of differential equations
[TABLE]
where and . Here, denotes the matrix of ones. Again, we perform a gradient descent for the cost function and a gradient ascent for the Lagrange multipliers.
Example 3.8**.**
Let us illustrate the gradient flow with the same TSP with 10 cities as in Example 3.4. Using (19), we obtain the results shown in Figure 8. We plot only the entries of the matrix that are greater than zero. The dynamical system converges to a tour that is slightly longer than the optimal tour.
Analogously to Section 3.2, we will numerically analyze the tour matrix flow (19) for the simple TSP with five cities. We first note that there exists only one Procrustes solution in , i.e., , where (since the distances between cities are symmetric). We note that the advantage of this formulation is that it avoids the infinite number of Procrustes solutions that were described in the previous section. In other words, even though there exist an infinite number of solutions, is unique. Furthermore, the Procrustes solution in is invariant under basis rotations due to repeated eigenvalues. Hence, the corresponding Procrustes set is entirely captured by . In order to analyze the stability of the optimal tour matrix, we take a small perturbation of the optimal tour and solve the tour matrix flow (19). This results in a matrix with the corresponding Lagrange multipliers and . Observe that only lies in a small neighborhood of the optimal tour. Now we are in a position to compute the Jacobian in using a forward difference scheme. There exist five eigenvalues with positive (but small) real part, thereby giving rise to saddle points. Thus, the optimal tour is again not stable, but we do expect that by using the tour flow (19) we will stay in a small neighborhood of the optimal tour.
Finally, we again compute the basin of attraction of the optimal tour matrix for the five cities example,
[TABLE]
Observe that a symmetric matrix is fully described by the lower left or upper right part of the matrix. Moreover, as described previously, the tour matrix flow (19) is a matrix differential equation evolving on the manifold of . Thus, starting with a symmetric matrix , the trajectory remains for all time in . This allows us to choose and a fine partition of for . Again, we set and make use of Remark 3.5 c). Small perturbations of the optimal tour matrix are computed as follows: Let be the cell which contains the components of the optimal tour matrix . A point defines the components of a lower triangular matrix. By taking the lower left part of , we can directly create a symmetric matrix, which is a small perturbation of the optimal tour. Observe that has to be adapted accordingly.
In Figure 9 (a)–(b) we show different three-dimensional projections of the basin of attraction of . The dark cells depict the stationary solutions of (19) backward in time. We note that there are five different tour matrices to which the gradient flow converges backward in time, two of the five unique matrices (each one depending on a permutation matrix with a unique cycle) are shown below,
[TABLE]
Furthermore, the box-counting dimension of the basin of attraction is about .
Although the flows described above are interesting and display the complexity and challenges presented by NP-hard problems from a dynamical system lens, we find that the solutions computed by the above methods are not competitive when compared to state-of-the-art methods. Our goal in the next section is to construct new variants of existing state-of-the-art methods that are inspired by our work above.
4 Procrustes-based Lin–Kernighan heuristic
In this section, we will propose a method to compute candidate sets based on the relaxed problem (5) or (15), respectively. The solution, which is given by the solution of the Procrustes problem (see section 3.1), can be computed analytically. Note that the solutions computed using this approach are optimal solutions of flows (for and ) described in previous sections.
Thus, the optimal solution which minimizes the relaxed TSP cost function (5) can be obtained using the solution of the Procrustes problem described in Section 3.1. Namely, the solution is given in terms of matrix [AW00, HRW92], where the eigenvectors in the two matrices are sorted with respect to increasing eigenvalues of and decreasing eigenvalues of or vice versa. Define to be the solution of the two-sided orthogonal Procrustes problem or the minimum of the tour flow. Note that is also the optimal solution of the gradient flow (19) without both equality constraints, i.e.,
[TABLE]
Roughly speaking, can be interpreted as a continuous solution of the relaxed TSP where the entry describes the strength of edge . We would like to now use the entries of to help inform the Lin–Kernighan heuristic. In particular, we use the solution of the Procrustes problem to limit the search space and to improve the efficiency of local heuristics. The aim is to bias -opt moves in a manner such that edges with high edge strengths are included with high probability. We compute candidate sets based on the entries of the matrix and call these matrix values -nearness. In our proposed approach, for each city, we pick the cities with the largest entries .
Example 4.1**.**
Let us consider again the TSP from Examples 3.4 and 3.8. Figure 10 shows the difference between the optimal solution of the TSP and the optimal solution of the Procrustes problem. We use a linear interpolation between blue (large value) and white (small value). Note that this is the same matrix as in Figure 8d, with the difference that we are plotting a few more edges here to illustrate -nearness. Clearly, some edges of the optimal tour are already visible in Figure 10b, for example and , while other edges such as or have a much lower weight. For city , different choices exist, , , , and , for instance, have a high probability of being part of the shortest tour.
In Figure 11, we show the edges computed using the Procrustes solution. In particular, for two random TSP instances ( city and city examples), we show the shortest edges in the left-most column and the edges from the Procrustes solution in the right-most column. The optimal tour is plotted in the middle column. It is evident from the figure that the Procrustes solution tends to capture most of the edges in the optimal tour. Note that, while the -nearness values can be computed in [HK70, Hel98, Hel06], the computation of the -nearness values is .
4.1 Improving the Procrustes solution
Analogous to the -nearness approach, we now describe our methodology to obtain better -nearness values than those computed from the solution of the Procrustes problem alone. As described in section 2.3, the -nearness values were improved using subgradient optimization. In the -nearness setting, the principal idea is to construct a homotopy between the original TSP distance matrix and the solution of the Procrustes solution. Intuitively, one desires the candidate sets to include ‘several’ short edges and a ‘few’ long edges. Note that simply picking the shortest edges from gives rise to greedy solutions that are usually not competitive since they require the addition of long edges to complete the tours [Coo11].
We find that the Procrustes solution tends to select too many long edges (as shown in Figure 12a). If we use the entries of to bias the Lin–Kernighan heuristic, the solutions are found to be close, but less competitive than the standard approach. An effort to reduce the number of long edges is equivalent to making the computed solution “greedy” by picking edges based on the distance matrix . Thus, we construct a homotopy of the form,
[TABLE]
The candidate sets for varying are shown for an example TSP instance in Figure 12. To find the optimal we use ideas from graph clustering [SSB12], where one computes the existence of disconnected clusters in the graph. In particular, we increase until the graph of candidate sets is almost disconnected (separated into clusters). This optimal is found by either marching in or using a bisection approach.
There are multiple ways that one can compute the connectedness of a graph. In particular, one can use a depth-first search based approach [Cor09] or perform computations on the graph Laplacian [Chu97, Fie73, Fie89]. The rank of the graph Laplacian matrix is related to the number of connected components in the graph [Chu97]. In our work, we pick the graph Laplacian approach for computing connected components in the graph (by looking at the multiplicity of the zero eigenvalue). Note that these computations can also be performed in the distributed setting [SSB10, SSB12]. If varying does not give rise to a disconnected graph, we set . Alternatively, one can use the matrix (in place of ) to bias the -opt moves in the Lin–Kernighan heuristic. If the candidate sets based on distance only are connected, this typically implies that the -opt moves converge quickly to the shortest tour.
5 Results
To compare different candidate sets or methods to bias -opt, Helsgaun computes the “average rank” of the edges which form the shortest tour [Hel98]. The ranking is essentially an ordering on set of edges for each node. This ordering captures the “likelihood” of an edge being in the optimal tour and is typically computed using the -nearness values. In our proposed approach, the -nearness values are replaced by -nearness values. Thus, the optimal average rank is , all edges belonging to the shortest tour have either rank or . We found that the average rank is in general not a good metric for the quality of the nearness values or candidate sets. Although the average rank of the Procrustes solution is typically much higher than the average rank of the -nearness values, -opt often converges faster to the shortest tour.
In order to compare -nearness and -nearness, we compute tours using Helsgaun’s LKH package. For each LKH run, we generate the candidate sets based on the -nearness and -nearness values. Starting from initial tours computed using -nearness and -nearness, respectively, we compare the resulting tour lengths after a fixed number of -opt steps.
In Table 1, we compare well-known instances of the TSP from the TSPLIB database [Rei91]. The size of the candidate sets in these computations is fixed, we compute candidates for each city using -nearness or -nearness values, respectively. Starting from a random initial tour that is generated from the respective candidate sets, we perform a fixed number of -opt moves, where is the number of cities. We find that in this setting, the -nearness based approach typically converges faster than -nearness. For example, after steps, -nearness based LKH converges to lower cost values in of the instances when compared to -nearness based LKH. Moreover, we ran random TSP instances of size (cities) and found that -nearness had lower tour costs after a fixed number of -opt moves in of the instances, hence resulting in better solutions in of the instances. Note that if we run both, -nearness and -nearness based LKH, to convergence, both methods compute the best known optimal tours in these instances. Since the initial tours are constructed using the candidate sets, the starting costs may occasionally differ slightly when comparing -nearness with -nearness.
We do not present runtime results comparing the two algorithms since our prototype code was implemented in MATLAB and is consequently unable to compete with LKH (implemented in C) in speed. Our MATLAB implementation also limits the size of the TSP instances that we can handle. In future work, we intend to re-implement our algorithm in C for greater scalability and performance. Moreover, our approach will have higher computational cost than -nearness based methods due to the eigenvector computations. However, given that the -nearness requires fewer iterations of the Lin–Kernighan heuristic, we conjecture that by combining our approach with fast spectral methods [SSO17], one can construct a highly competitive TSP approach.
6 Conclusion and future work
In this work, we explored the use of continuous relaxations and dynamical systems theory for constructing algorithms for the TSP. Our approach aimed to exploit the observation that the solution of the TSP can be represented as a permutation matrix which lies on the manifold of orthogonal matrices. In the first part of this manuscript, we constructed a dynamical system on the manifold of orthogonal matrices that converges to solutions of the TSP. We also explored the construction of gradient flows for tour matrices in Section 3.3. We found that although the dynamical systems approach is elegant and sheds light on the structure and complexity of NP-hard problems, it often converges to local optima. We also used homotopy continuation methods to compute subsets of the stable manifolds of the optimal solutions.
Inspired by the dynamical systems approach, we then exploited a Procrustes based approximation that computes an orthogonal matrix that minimizes the TSP cost. Our approach was based on the computation of the solution of the two-sided orthogonal Procrustes problem which is based on the eigendecomposition of the corresponding tour and distance matrices of the TSP instance. We then constructed a homotopy of the Procrustes solution with the distance matrix that is then used to bias the popular Lin–Kernighan heuristic.
In certain TSP instances, the candidate sets constructed from the homotopy are found to give faster convergence than minimum spanning tree (-tree) based approaches. Our algorithm was implemented in the LKH software framework and demonstrated on multiple TSPLIB and random TSP instances.
Future work includes the testing of the Procrustes approach on larger instances of the TSP by exploiting parallel eigenvector computation packages [BCC*+*97]. On the theoretical side, we aim to pursue the generalization of our proposed approach to the quadratic assignment problem (QAP). The aim is to develop efficient heuristics utilizing the results of the Procrustes problem and dynamical systems theory for solving strongly NP-hard problems. We are also exploring the use of subgradient optimization for improving the Procrustes solution which is expected to provide faster convergence rates for the TSP and related optimization problems. Additionally, we are exploring the use of fast spectral methods [SSO17] for accelerating the candidate set computations. Moreover, we hope that this work increases interest in the area at the intersection of dynamical systems theory and combinatorial optimization. There appear to be deep connections between the two areas [WWJ16] that may enable the construction of new optimization algorithms for a wide class of optimization problems.
Acknowledgments
The authors thank Prof. Keld Helsgaun for discussions related to the Lin–Kernighan heuristic and his software and also Dr. Mirko Hessel-von Molo and Steffen Ridderbusch for discussions related to the approach. This material is based upon work supported by the Defense Advanced Research Projects Agency (DARPA) and Space and Naval Warfare Systems Center, Pacific (SSC Pacific) under Contract No. N6600118C4031.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[AAM + 00] R. Agarwala, D.L. Applegate, D. Maglott, G.D. Schuler, and A.A. Schäffer. A fast and scalable radiation hybrid map construction and integration strategy. Genome Research , 10(3):350–364, 2000.
- 2[ABCC 98] D. Applegate, R. Bixby, W. Cook, and V. Chvátal. On the solution of traveling salesman problems . Rheinische Friedrich-Wilhelms-Universität Bonn, 1998.
- 3[AW 00] K. Anstreicher and H. Wolkowicz. On Lagrangian relaxation of quadratic matrix constraints. SIAM Journal on Matrix Analysis and Applications , 22(1):41–55, 2000.
- 4[BCC + 97] L Susan Blackford, Jaeyoung Choi, Andy Cleary, Eduardo D’Azevedo, James Demmel, Inderjit Dhillon, Jack Dongarra, Sven Hammarling, Greg Henry, Antoine Petitet, et al. Sca LAPACK users’ guide . SIAM, 1997.
- 5[Bc PP 98] R. E. Burkard, E. Çela, P. M. Pardalos, and L. S. Pitsoulis. The quadratic assignment problem. In P. M. Pardalos and D.-Z. Du, editors, Handbook of Combinatorial Optimization , pages 1713–1809. Springer, 1998.
- 6[B Hv M 09] Armin Biere, Marijn Heule, and Hans van Maaren. Handbook of satisfiability , volume 185. IOS press, 2009.
- 7[Bro 89] R. W. Brockett. Least squares matching problems. Linear Algebra and its Applications , 122–124:761–777, 1989.
- 8[Bro 91] R. W. Brockett. Dynamical systems that sort lists, diagonalize matrices and solve linear programming problems. Linear Algebra and Its Applications , 146:79–91, 1991.
