An Exact Ranked Linear Assignments Solution to the Symmetric Traveling Salesman Problem

Abstract

In this paper, we show how Murty’s ranked linear assignment algorithm can be applied to exactly solve the symmetric Traveling Salesman Problem (TSP). To increase the Murty algorithm’s computational efficiency in solving the TSP, we develop a simple algorithm that determines whether a node that is generated in Murty’s sequential node partitioning process contains a sub-cycle of length less than n, where n is the number of cities to be visited. Each such node cannot generate a genuine solution, which must be a full n-cycle, and can thus be eliminated from further partitioning. In exactly, solving the TSP Murty’s ranking process continues, discarding all such nodes, terminating in a finite number of rankings when the first such ranked solution is encountered that is a full n-cycle. This first ranked n-cycle is the exact solution to the given TSP problem.

Share and Cite:

Danchick, R. (2020) An Exact Ranked Linear Assignments Solution to the Symmetric Traveling Salesman Problem. Open Access Library Journal, 7, 1-8. doi: 10.4236/oalib.1106159.

1. Introduction

The NP-hard Traveling Salesman Problem (TSP) is a paradigm of computational complexity. It continues to be one of the most intensively investigated problems in Operations Research. The famed Irish mathematician William Rowan Hamilton first formulated the TSP problem in the 1800’s. Merrill Flood, the American mathematician, popularized the TSP as a worthy object for investigation in the 1940’s [1] . The Rand Corporation, in the 1950’s was a focal point for research on the TSP. At Rand Richard Bellman, George Dantzig, Ray Fulkerson and Selmer Johnson made fundamental contributions to the solution of the TSP. Bellman in [2] proposed a dynamic programming approach to solving the TSP that was limited to a small number of cities. Bellmans’s algorithm was rediscovered and improved by Held and Karp in [3] . Their approach provides both sharp bounds for the solution as well as the computational complexity for attaining an approximate solution and was able to find an exact solution for the TSP problem of 64 cities.

Bellman’s and the Held-Karp’s algorithms are based on a branch and bound approach. The branch and bound approach is based on the principle that the total set of feasible solutions can be partitioned into smaller subsets of solutions. Branch and bound-based TSP algorithms are not exact. Mathematicians and Computer Scientists have since worked to improve their computational efficiency, even at the margins, of the best available of these algorithms. Gutin and Punnin summarized the state of the art of TSP algorithms as of 20,002 in [4] . The record for the solved-for number of cities is 85,900 at Bell laboratories in 2006.

Branch-and-cut is a second general technique to solve the symmetric TSP problem. It requires an exponential number of cut-set elimination constraints. David P. Williams has compiled a very accessible overview of progress on the TSP in [5] which includes a section on branch and cut methods in conjunction with linear programming algorithms. To complete the picture, there is an extensive literature on heuristic TSP solvers [6] .

In this paper, we adapt Murty’s ranked linear assignment algorithm [7] to the symmetric TSP application. The Murty algorithm solves the ranked linear assignment problem in a sequence of stages. In the first stage, it uses, say, the Jonker-Volgenant (JV) [8] fast 0 - 1 integer linear assignment algorithm to find the exact minimizing solution on the original assignment problem matrix. The first stage solution then generates a set of n nodes from the initial solution by partitioning this first stage solution. Each such node specifies which matrix elements in the first stage solution are to be included in the next solution and which are to be excluded. For each node, the included elements specify which rows and columns are to be struck out of the original first stage matrix to provide the assignment matrices in the next stage while the excluded elements specify which elements in the original matrix are to be replaced by machine infinity. This produces a set of node-correspondent square matrices of decreasing order. Each such node-specific matrix is subjected to the JV algorithm thus producing an assignment value; the smallest of these values is then the second ranked value. The method proceeds recursively from one stage to the next to generate the third ranked solution, the fourth, etc. Our TSP-specific implementation continues the ranking until the first full n-cycle is found, thus making our proposed algorithm exact.

To further adapt the Murty ranked linear assignment algorithm to the TSP for computational efficiency, we construct a simple algorithm that determines whether a node contains a sub-cycle of length < n. Such nodes cannot generate a full cycle. We will show that most nodes contain sub-cycles of length l , 2 l < n . We can thus expect that the Murty algorithm, equipped with this node sub-cycle identification and elimination algorithm along with a core fast JV 0 - 1 integer linear assignment problem solution algorithm, which is O ( r 3 ) in complexity, 2 r n , will compare well in speed with the currently best available symmetric TSP algorithms but in contrast with them always provide exact answers.

We assume the assignment matrix of distances between the cities to be visited is symmetric and positive except for zeros along the main diagonal. We use the device of replacement of each diagonal zero entry with a positive number that is greater than any other matrix entry. This trick guarantees that no ranked solution contains a 1-cycle. Importantly we show that eliminating all such permutations containing a 1-cycle asymptotically shrinks the number of possible permutations that must be processed by Murty’s ranked linear assignment algorithm by a factor of ≈0.6321. The sub-cycle node elimination algorithm removes the remaining 0.3679 ( 1 1 / n ) n ! possible permutations as n . The space of solutions is thus reduced to the set of ( n 1 ) ! full n-cycles.

Section 2 Contains our definitions and notation.

Section 3. Provides our key proofs and a computational example

Section 4. Supplies our conclusions

Section 5. Sketches a map for future research.

Section 6. Lists references.

2. Definitions and Notation

We closely follow the definitions and notation found in [7] in which:

n = the number of cities along the traveling salesman’s route.

C = ( c i j ) i , j = 1 , 2 , , n is the assignment matrix of inter-city distances such that c i j = c j i > 0 , i j , c i i = d > c i j , i , j 1 , 2 , , n .

Paraphrasing Murty in [7] and specializing the general ranked assignment problem down to the TSP we can define it as the 0 - 1 integer linear programming problem with an additional full n-cycle constraint (4):

Minimize Z = i = 1 n j = 1 n c i j x i j

Subject to: 1) j = 1 n x i j = 1 , i = 1 , 2 , , n (1)

2) i = 1 n x i j = 1 , j = 1 , 2 , , n

3) x i j = 1 or x i j = 0 , i , j = 1 , 2 , , n

4) If ( 1 , j 1 ) , ( 2 , j 2 ) , , ( n , j n ) are the indices of the variables x i j taking on the value 1 then the corresponding group element that is contained in the symmetric group of permutations on n letters, S n , is a full cycle of length n.

A node, M, that is generated on the kth stage of the ranking process is given by:

M = { ( i 1 , j 1 ) , ( i 2 , j 2 ) , , ( i r , j r ) ; ( m 1 , p 1 ) ¯ , ( m 2 , p 2 ) ¯ , , ( m n r , p n r ) ¯ } ,

( i 1 , j 1 ) , ( i 2 , j 2 ) , , ( i r , j r ) specify which original matrix entries are to retained in the solution and ( m 1 , p 1 ) ¯ , ( m 2 , p 2 ) ¯ , , ( m n r , p n r ) ¯ specify which original matrix entries are to be excluded from the solution by inserting machine ∞ into the entries ( m i , p i ) , i = 1 , 2 , , n r , r < n .

3. Derivations

3.1. Node Rejection and Solution Identification

The basic idea is to sequentially form the node-correspondent product of 2-cycles, ( i 1 , j 1 ) , ( i 2 , j 2 ) , , ( i r , j r ) S r , into a product of disjoint cycles. A necessary condition for the node to generate a genuine solution to the TSP is that this product must not contain a single cycle of length ≤ r. We have constructed a simple algorithm to determine whether this necessary condition is met. It requires O ( r 2 ) integer comparisons. The MATLAB code implementation of this algorithm is shown below. The input variables are defined as the integer vectors:

I = [ i 1 , i 2 , , i r ] J = [ j 1 , j 2 , , j r ]

The output variable is: test = { 0 if the node does not contain a sub-cycle 1 if the node contains a sub-cycle .

An important consequence of sub-cycle identification and rejection is that the node partitioning process for a given ranked assignment solution stops whenever a sub-cycle is encountered. The same algorithm can be exploited to determine whether a node-partitioning solution is a genuine n-cycle and is a solution candidate, depending on whether its Z value is smallest among those from the set of eligible nodes―those whose two-cycle products do not contain sub-cycles in their representation as products of disjoint sub-cycles.

3.2. Diagonal ∞’s and Node Elimination Algorithm Probabilities and Statistics

The efficiency advantage that the Murty ranked assignment approach confers to the TSP problem derives from two essential features: 1) The large fraction of the n ! possible permutation solutions that are eliminated by the machine ∞’s main diagonal entries and 2) the elimination of candidate nodes by the node rejection algorithm.

Table 1 below shows the number of permutations that keep at least 1 of the n letters fixed and are thus eliminated by the node identification and rejection algorithm. Table 2 shows the result of a set of Monte Carlo sampling experiments with a sample number of 1000 per each case of the number of cities.

Examination of Table 1 motivates the key ansatz:

The number of permutations, R n , eliminated because of diagonal ∞’s is given by the recursion:

Table 1. Diagonal ∞ permutation elimination.

Table 2. Node rejection fractions.

R n = { n R n 1 1 if n is even n R n 1 + 1 if n is odd , n = 3 , 4 , 5 , (2)

If (2) holds for all n 3 then the corresponding diagonal ∞’s permutation rejection probability recursion is given by:

p n = { p n 1 1 / n ! if n is even p n 1 + 1 / n ! if n is odd , n = 3 , 4 , 5 , (3)

If the recursion (2) above holds for all n 3 we can expand recursion (3) to obtain

p n + 1 = p 2 + k = 3 n ( 1 ) i 1 / k ! (4)

From (4) it is easy to see that

lim n p n = 1 exp ( 1 ) 0.6321 (5)

which is agreement with what Table 1 and Table 2 show.

We will use the four California cities: 1) Los Angeles, 2) San Diego, 3) San Jose, and 4) San Francisco, to pose a “toy problem” that nevertheless captures the essential features and potential effectiveness of our approach. The corresponding assignment matrix, with entries rounded to the nearest mile, is:

C = [ 120 340 382 120 466 508 340 466 48 382 508 48 ]

By inspection the optimal stage 1 solution is:

( 1 , 2 ) , ( 2 , 1 ) , ( 3 , 4 ) , ( 4 , 3 ) , Z = 336.

Note that this stage 1 solution is not a solution of the TSP problem because it contains two sub-cycles of length 2.

The stage 2 nodes that are partitioned by the optimal solution of stage 1 are:

M 1 = ( 1 , 2 ) ¯ , M 2 = ( 1 , 2 ) , ( 2 , 1 ) ¯ , M 3 = ( 1 , 2 ) , ( 2 , 1 ) , ( 3 , 4 ) ¯ , M 4 = ( 1 , 2 ) , ( 2 , 1 ) , ( 3 , 4 ) , ( 4 , 3 ) ¯ .

The node rejection test tells us that only M 1 and M 2 need be processed.

The optimal stage 2 solution on M 1 is the 4-cycle: ( 1 , 4 ) , ( 4 , 3 ) , ( 3 , 2 ) , ( 2 , 1 ) , Z = 966

The optimal stage 2 solution on M 2 is the 4-cycle ( 1 , 2 ) , ( 2 , 3 ) , ( 3 , 4 ) , ( 4 , 1 ) , Z = 1010 .

Thus the solution to the given TSP problem is the solution is on M 1 .

4. Conclusions

We have proposed an exact algorithm for the solution the symmetric traveling salesman problem that exploits Murty’s ranked linear assignment algorithm. We have shown how the Murty algorithm can be equipped with a simple test that eliminates from further processing any node that cannot generate a full n-cycle. We have proved that if the recursion (2) holds that the device of inserting machine ∞’s down the main diagonal asymptotically reduces the number of candidate permutations by a factor of 1 exp ( 1 ) 0.6321 . The remaining 0.3679 ( 1 1 / n ) n ! permutations, each of which corresponds to a sub-cycles of length < n, are eliminated by the node rejection test. Exploiting the fast JV algorithm as the core 0 - 1 integer linear assignment problem solution method gives the proposed algorithm the potential for great efficiency in exactly solving large problems with n 1 .

5. Directions for Future Research

Our first objective would be to prove the conjecture that the recursion (2) holds for all n 3 , say, by mathematical induction.

Second would be the derivation of the computational complexity of our proposed algorithm.

Finally, we would either acquire reliable Murty and JV codes or program them from scratch, equip the Murty code with the node rejection algorithm and run the Murty + JV + node rejection combination on sample problems in the literature. We would then compare run times for our proposed algorithm with those of the best current symmetric TSP codes.

Conflicts of Interest

The authors declare no conflicts of interest regarding the publication of this paper.

References

[1] Flood, M. (1956) The Traveling-Salesman Problem. Operations Research, 4, 61-75.
https://doi.org/10.1287/opre.4.1.61
[2] Bellman, R. (1962) Dynamic Programming Treatment of the Traveling Salesman Problem. Journal of the ACM, 9, 61-63. https://doi.org/10.1145/321105.321111
[3] Held, M. and Karp, R. (1962) A Dynamic Programming Approach to Sequencing. Journal for the Society for Industrial and Applied Mathematics, 10, 1-10. https://doi.org/10.1137/0110015
[4] Gutin, G. and Punnen, E. (2002) The Traveling Salesman Problem and Its Variation. Vol. 12, Springer, New York.
[5] Williamson, D. (2014) The Traveling Salesman Problem: An Overview. Lecture Notes, Cornell University Ebay Research, 21 January.
[6] Rego, C., Gamboa, D., Glover, F. and Osterman, C. (2011) Traveling Salesman Problem Heuristics: Leading Methods, Implementations and Latest Advances. European Journal of Operational Research, 211, 427-441. https://doi.org/10.1016/j.ejor.2010.09.010
[7] Murty, K. (1968) An Algorithm for Ranking All the Assignments in Order of Increasing Cost. Operations Research, 16, 682-687. https://doi.org/10.1287/opre.16.3.682
[8] Jonker, R. and Volgenant, A. (1987) A Shortest Path Algorithm for Dense and Sparse Linear Assignment Problems. Computing, 38, 325-340. https://doi.org/10.1007/BF02278710

Copyright © 2024 by authors and Scientific Research Publishing Inc.

Creative Commons License

This work and the related PDF file are licensed under a Creative Commons Attribution 4.0 International License.