Mathematical Problems in Engineering

Volume 2015 (2015), Article ID 854218, 8 pages

http://dx.doi.org/10.1155/2015/854218

## Solving Large-Scale TSP Using a Fast Wedging Insertion Partitioning Approach

^{1}School of Science, Central South University of Forestry and Technology, Changsha, Hunan 410004, China^{2}China Electric Power Research Institute, Beijing 100192, China^{3}Institute of Computing Technology, Chinese Academy of Sciences, Beijing 100190, China^{4}State Grid Fujian Electric Power Research Institute, Fuzhou, Fujian 350007, China

Received 10 November 2014; Accepted 18 May 2015

Academic Editor: P. Balasubramaniam

Copyright © 2015 Zuoyong Xiang et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

#### Abstract

A new partitioning method, called Wedging Insertion, is proposed for solving large-scale symmetric Traveling Salesman Problem (TSP). The idea of our proposed algorithm is to cut a TSP tour into four segments by nodes’ coordinate (not by rectangle, such as Strip, FRP, and Karp). Each node is located in one of their segments, which excludes four particular nodes, and each segment does not twist with other segments. After the partitioning process, this algorithm utilizes traditional construction method, that is, the insertion method, for each segment to improve the quality of tour, and then connects the starting node and the ending node of each segment to obtain the complete tour. In order to test the performance of our proposed algorithm, we conduct the experiments on various TSPLIB instances. The experimental results show that our proposed algorithm in this paper is more efficient for solving large-scale TSPs. Specifically, our approach is able to obviously reduce the time complexity for running the algorithm; meanwhile, it will lose only about 10% of the algorithm’s performance.

#### 1. Introduction

In the field of combinatorial optimization, the Traveling Salesman Problem (TSP) is probably the most famous and extensively studied problem, which aims to find the shortest Hamiltonian Cycle in a graph. This problem is NP-hard [1–19]: that is to say, no polynomial time algorithm is known for solving this problem at present.

The algorithms for solving the TSP can be categorized into two main paradigms: exact algorithms and heuristic algorithms. The exact algorithms are guaranteed to find the optimal solution in an exponential number of steps. The well-known exact algorithms are branch and cut algorithms [20], with which large TSP instances have been solved [21]. The major limitation of these algorithms is that they are quite complex and have heavy requirement of computing time [22]. For such reason, it is very difficult to find optimal solution for the TSP, especially for problems with a very large number of cities. Heuristic algorithms attempt to solve the Traveling Salesman Problem focusing on tour construction methods and tour improvement methods. Tour construction methods build up a solution step by step, while tour improvement methods start with an initial tour then try to transform it into a shortest tour.

In the past decades, a major technological breakthrough was obtained with the introduction of metaheuristics, such as simulated annealing, tabu search, genetic algorithms, ant colony optimization, particle swarm optimization, variable neighborhood search, and neural networks. These mentioned algorithms have the possibility to find their ways out of local optimization [23, 24].

Since there are so many algorithms for the solution, we have to evaluate the quality of each algorithm. A general way is to compare the obtained routine using the algorithm with the optimal solution, through which we could judge the quality for the obtained solution; that is, the closer the better to the optimal solution. However, we do not know the optimal solution for the TSP instances in many cases, especially for the very large number of cities in the era of big data nowadays, with a variety of real-world applications ranging from multimedia [25–35] to mobile sensing [36–49]. Therefore, there will be an alternative and commonly used method: for each specific instance, we use a certain method to obtain the lower bound for the optimal solution, and then we evaluate the quality of the algorithm based on the lower bound, which is called Held and Karp bound (HK bound) [2–4].

There are lots of applications for the TSP problems in the real-world, also along with several variations of TSP. What we concern about is called Symmetric TSP (STSP), which is the type of most widely used TSP. In this kind of TSP, the distances between any two nodes are symmetric and equivalent: that is, . Another one is Asymmetric TSP (ATSP), where , while we would not discuss this kind of problem in this paper. One thing that should be mentioned is that we focus on geometric TSP in two-dimensional space, because at present the most widely applied one is this kind of TSP with geometric information, and a considerable portion of the algorithms are designed according to this kind of problem; accordingly our proposed algorithm in this paper is such kind of TSP.

The rest of this paper is organized as follows. In Section 2, we briefly introduce the construction methods. Section 3 briefly reviews several types of partitioning methods. In Section 4, we detail the first stage of our method. For the second stage the proposed algorithm is described in Section 5. Section 6 shows the experimental results, and we finally make the conclusion in Section 7.

#### 2. Construction Method

There are a variety of solutions for TSP, which include several kinds of construction methods. The construction method is starting from a city, adding the unvisited cities into the tour constantly, and the process will be ended until all the cities have been inserted.

Insertion method is a typical kind of construction methods. Firstly, it selects a city randomly from all the cities and finds the nearest city. Furthermore, it inserts the unvisited city into the constructed sequence according to different rules. Finally, the method stops until all the cities have been inserted into the sequence. Insertion methods can be divided into these four categories by selected different rules: Nearest Insertion (NI), Cheapest Insertion (CI), Farthest Insertion (FI), and Random Insertion (RI). For the NI, it selects the nearest city for the next city to be inserted; for the CI, it chooses the next city with the shortest added distance after inserting; for the FI, it selects the farthest distance city from all nearest cities as the next one; for the RI, it chooses the inserted city randomly. Among these insertion methods, the performances of FI and RI are better than others, which averagely exceed about 15% compared to the HK bound, while the performances of NI and CI are a little worse with around 20%.

Spacefilling Curve [50] is another heuristics construction method for TSP. It firstly sorts the nodes in the order of their appearance along the spacefilling curve and then visits these nodes in the plane to make the short tour. The time complexity of this method is , and the space complexity is .

#### 3. Partitioning Method

When the scale of TSP becomes larger, in order to improve the running time or solve the memory limitation issue, it is necessary to utilize partitioning methods for solving large-scale TSP. The partitioning method firstly divides the cities to several segments. Secondly, it finds the shortest tour for each segment. Finally, the partitioning method connects each segment and obtains the final tour. There are two kinds of partitioning methods: one is Geometric Partitioning and the other is Tour-Based Partitioning [16–18].

Karp’s Partitioning Heuristic (Karp) is proposed in [10]. For the construction of K-d tree, even though both of the subsets of cities contain the median city by the cut, through the median cities, we start to recursively divide the cities into parts using cuts from horizontal and vertical direction. When any set of the partition has no more than cities, which is a setting parameter, the entire of recursion process will be stopped. By employing the DP (dynamic programming) approach proposed by Bellman [11], derived from the sets of cities, we cope with the subissues by optimal way in the final partition. At last, by utilizing the shared medians, we recursively fix the solutions along with fixed , which is time-consuming parameter.

In Strip, firstly we partition the rectangle of minimal enclosure into equal-width vertical strips, secondly for each strip order the cities by top-bottom way, and thirdly we obtain the tour leveraging the process running the strip from the leftmost to the rightmost, alternately traveling around by up-and-down way, with finally the edge being from the last city in rightmost strip to the first in leftmost strip. Obviously, we can see that Strip’s tours could be as much as times optimum in the worst case. For equivalently distributed node ones in the unit of square, the anticipant Strip’s tour length could be no more than , and for these instances no more than 0.71 over Held-Karp bound, which indicates that for these instances Strip’s anticipant excess should be less than 31% [6–8].

Fast Recursive Partitioning (FRP) has been proposed in [9]. This begins with the rectangle of minimal enclosure; next recursively partition each rectangle, which includes more than 15 cities, into two rectangles with half of numerous cities approximately. If the rectangle of parent one is longer than it is wide, in the rectangle we could find the median -coordinate of cities and make a vertical partition at the value; likewise, we could find the median -coordinate and make a horizontal partition at the value. Call the final rectangles, all including 15 or less cities, buckets. For all the buckets, we can construct nearest neighbor tours, which are then fixed along to make an overall tour.

#### 4. The First Stage—Partitioning

The first stage of the algorithm is to partition the cities by the rule of avoiding any cross for all the partitions.

##### 4.1. The Simple Instance

As shown in Figure 1, we suppose the recent TSP instance includes only 4 cities, and any of the 3 cities are not in a straight line. The shortest way is always A-B-C-D-A, no matter how the distances between 2 cities change.