Advanced Techniques for Computational and Information SciencesView this Special Issue
An Improved Genetic Algorithm with Initial Population Strategy for Symmetric TSP
A new initial population strategy has been developed to improve the genetic algorithm for solving the well-known combinatorial optimization problem, traveling salesman problem. Based on the k-means algorithm, we propose a strategy to restructure the traveling route by reconnecting each cluster. The clusters, which randomly disconnect a link to connect its neighbors, have been ranked in advance according to the distance among cluster centers, so that the initial population can be composed of the random traveling routes. This process is -means initial population strategy. To test the performance of our strategy, a series of experiments on 14 different TSP examples selected from TSPLIB have been carried out. The results show that KIP can decrease best error value of random initial population strategy and greedy initial population strategy with the ratio of approximately between 29.15% and 37.87%, average error value between 25.16% and 34.39% in the same running time.
Traveling salesman problem (TSP) is a well-known NP-hard problem in many real-world applications, such as job-shop scheduling and VLSI routing [1, 2]. The aim of TSP is to find a complete, minimal-cost tour when a salesman is required to visit each of given cities once and only once . So far, TSP has often been a touchstone for new strategies and algorithms proposed to solve combinatorial optimization problem. In this paper, we consider the symmetric TSP, where the distance from city to city is the same as from city to city .
Many methods have been developed for solving TSP, including exact algorithms and approximate algorithms. The exact algorithms are carried out to find the optimal solution from all valid solutions in a number of steps. But, because of exponential complexity , they are always infeasible if the scale of TSP becomes large, for example, 100 cities with approximately different solutions. In contrast, the approximate algorithms, especially many bioinspired algorithms [4–9], can obtain accepted solutions for many NP-hard problems with (relatively) short running time. These approaches are usually very simple, like Lin-Kernigan , colony optimization (ACO) , and so on [12, 13]. All of them are efficient approaches in most of the problems, but ACO, for example, is not suitable for large-scale TSP because of its computational cost , in which is the ant numbers and is the number of cities.
Genetic algorithm (GA)  is a global search algorithm appropriate for problems with huge search, for example, TSP, in which the initial population decides iterations, the crossover realizes the construction of the offspring, and the mutation operator maintains the diversity of the individuals. So far, there is a lot of literature to improve the effectiveness of crossover and mutation [2, 15–19]. Besides, as the first step of any GA, how to initialize an efficient population plays an important role in the process of solving a problem based on GA. Toǧan and Daloǧlu  adopted the member grouping strategy to reduce the size of the problem and the initial population strategy to reduce the number of generations. Chen et al.  developed a feature-based initial population method for the optimization of job-shop problem. Sharma et al.  proposed a domain-specific initial population strategy for compliant mechanisms. Ahmed  used a sequential sampling method for generating initial population.
In this paper, a new initial population method has been developed to increase the quality of initial population. Based on this method, the application performance of GA on TSP becomes more efficient. The rest of the paper is organized as follows. In Section 2, some related background theories are presented. In Section 3, the proposed method is described. In Section 4, experimental results are evaluated. In the final section, a brief conclusion is given.
Some basic theories are shown in this section, including TSP, GA, and -means clustering.
2.1. Traveling Salesman Problem
TSP is one of the most widely studied combination optimization problems . Mathematically, this problem can be stated as follows:where path set is a permutation of cities and represents the distance from city to city . The aim of TSP is to find a path from path set to minimize .
2.2. Genetic Algorithm
Genetic algorithm (GA) is an evolutionary algorithm based on natural election, developed by Holland . It is to find approximate solutions for optimization and search problems by computer simulation . The aim of GA is to achieve better results through selection, crossover, and mutation. Selection is to select the best solutions preferentially according to the fitness function from the population. The fitness function () is defined over the genetic representation and measures the quality of the represented solution. In this paper, is assigned to . Crossover and mutation are used to generate a second generation population of solutions from those selected. Crossover can vary the population from one generation to the next by recombining “parent” solutions. Mutation alters some gene of one solution to avoid local optimal solutions. In general, the basic steps of GA for a problem are shown in Algorithm 1.
2.3. -Means Clustering
-means clustering is as well-known as Lloyd’s algorithm , which aims to find centers from observations to minimize the mean distance from each observation to their nearest center. More details about the concepts and description of -means clustering can be found in a lot of literature [26–28]. In this paper, we present a simple -means clustering to the initial population.
3. Proposed Method
The first step of GA is to generate an initial population in which a set of possible solutions is contained. The quality of this population plays an important role in solving a problem by GA [20, 29]. As can be seen from Figure 1, in which a TSP of 14 cities is considered, Figure 1(d) is the best solution obtained from 3000 solutions generated randomly (RIP)  and Figure 1(b) is the best solution from 3000 alternatives with the proposed method (KIP), respectively. Figure 1(c) is the best solution of this problem.
(a) -means clustering
(b) Randomly rewire to generate initial population
(c) The best solution
(d) Randomly initial population
KIG is developed for TSP solution based on -means clustering and GA. -means clustering is used to divide a large-scale TSP into some small problems to obtain local optimal solutions. Then, GA is carried out to globally optimize the alternatives generated by randomly rewiring each local optimal solution. Without loss of generality, consider a TSP with cities, in which denotes the location of city , . An initial population can be obtained as follows.
Step 1. cities cluster into groups with based on -means clustering.
Step 2. GA is used to obtain the local optimal path of each group and a global optimal path of groups.
Step 3. According to the global optimal path, one edge of each local optimal path disconnects to rewire the front and back groups.
Step 4. Repeating Step 3, an initial population can be generated.
Considering the 14 cities example as shown in Figure 1, 14 cities cluster into 4 groups . A global optimal path (the black path) and 3 local optimal paths (the red and blue paths) can be seen from Figure 1(a). Then, select one edge from each group () and disconnect to rewire the front and back group, such as Figure 1(a) (disconnect) to Figure 1(b) (rewire). From Figure 1(b) (the best solution from the initial population) to Figure 1(c) (the best solution of this problem), one step () can be achieved. Besides, a performance about three methods on example a280 selected from TSPLIB  is shown in Figure 2.
(a) Randomly initial population
(b) Greedy initial population
(c) -means clustering initial population
(d) The best solution
4. Experimental Results
We conduct the experiments on a computer with Intel Core i3-2120 3.30 GHz processor using MATLAB R2013a. To test the efficiency of the proposed method, 14 different TSP are taken from the TSPLIB  and 10 trials are examined for each problem. Without loss of generality, an improved GA developed by Kirk  was used to test the efficiency of the proposed method. The basic steps of this improved method are shown in Algorithm 2.
Firstly, the same iteration (20000) is considered to analyze the time cost and the quality of the solutions. There is no crossover but three mutations occurred at each iteration in the software. As we can see from Table 1, KIP is superior to other methods: of best error results and of average error results. Then, the same running time is used to analyze the iterations and the quality of the solutions by three methods on each problem. of best error results and of average error results demonstrate KIP more efficiently as shown in Table 2. Besides, Figure 3 shows the best solution varies by time about example pcb442.
In this paper, we present a new initial population strategy (KIP) to improve GA that is used to find the optimal solution for the well-known traveling salesman problem (TSP). To test the performance of this strategy, 14 different TSP examples selected from TSPLIB and two other methods (RIP and GIP) are used to experimentalize. The results show that the proposed method is efficient: of best error results and of average error results (Tables 1 and 2). KIP can decrease best error value of RIP and GIP with the ratio of approximately between and , average error value between and in the same iterations (Table 1). KIP can decrease best error value of RIP and GIP with the ratio of approximately between and , average error value between and in the same running time.
Conflict of Interests
No conflict of interests exists between the authors regarding the publication of this paper.
The work is partially supported by National High Technology Research and Development Program of China (863 Program) (Grant no. 2013AA013801) and the open funding project of State Key Laboratory of Virtual Reality Technology and Systems, Beihang University (Grant no. BUAA-VR-14KF-02).
G. Gutin and A. P. Punnen, The Traveling Salesman Problem and Its Variations, vol. 12, Springer, 2002.
A. Adamatzky, L. Bull, and B. D. L. Costello, Unconventional Computing 2007, Luniver Press, 2007.
D. S. Johnson and L. A. McGeoch, “The traveling salesman problem: a case study in local optimization,” in Local Search in Combinatorial Optimization, vol. 1, pp. 215–310, John Wiley & Sons, 1997.View at: Google Scholar
H. Braun, “On solving travelling salesman problems by genetic algorithms,” in Parallel Problem Solving from Nature, pp. 129–133, Springer, 1991.View at: Google Scholar
S. Roy, “Genetic algorithm based approach to solve travelling salesman problem with one point crossover operator,” International Journal of Computers & Technology, vol. 10, no. 3, pp. 1393–1400, 2013.View at: Google Scholar
J. H. Holland, Adaptation in Natural and Artificial Systems: An Introductory Analysis with Applications to Biology, Control, and Artificial Intelligence, University of Michigan Press, Ann Arbor, Mich, USA, 1975.
S. Lloyd, “Least squares quantization in PCM,” IEEE Transactions on Information Theory, vol. 28, no. 2, pp. 129–137, 1982.View at: Google Scholar
E. Osaba, R. Carballedo, F. Diaz, and A. Perallos, “Analysis of the suitability of using blind crossover operators in genetic algorithms for solving routing problems,” in Proceedings of the 8th IEEE International Symposium on Applied Computational Intelligence and Informatics (SACI '13), pp. 17–22, IEEE, Timisoara, Romania, May 2013.View at: Publisher Site | Google Scholar
R. Hinterding, “Gaussian mutation and self-adaption for numeric genetic algorithms,” in Proceedings of the IEEE International Conference on Evolutionary Computation, pp. 384–388, IEEE, December 1995.View at: Google Scholar
J. Kirk, Traveling Saleman Problem Genetic Algorithm, 2011, http://www.mathworks.com/matlabcentral/fileexchange/13680-traveling-salesman-problem-genetic-algorithm.