Travelling Salesman Problem (TSP) is a well-known NP-hard combinatorial optimization problem. Given a complete digraph with the set of vertices , the set of arcs and arc weights (lengths) of each arc , the TSP asks for a Hamiltonian circuit of minimum length. If for at least one pair then the TSP is called the Asymmetric Travelling Salesman Problem (ATSP). Numerous metaheuristics and heuristics have been proposed for the TSP and the genetic algorithms (GAs) are among them (see e.g. [2, 3, 7, 16, 18]).
The performance of GAs depends significantly upon the choice of the crossover operator, where the components of parent solutions are combined to build the offspring. A supplementary problem that emerges in some versions of crossover operator is called Optimal Recombination Problem (ORP). Given two feasible parent solutions, ORP consists in finding the best possible offspring in view of the basic principles of crossover . Experimental results [3, 16, 18] indicate that ORP may be used successfully in genetic algorithms.
In this paper, we propose a new GA using the ORP with adjacency-based representation to solve the ATSP. Two simple crossover-based GAs for ATSP using ORPs were investigated in  but no problem-specific local search procedures or fine-tuning of parameters were used. In comparison to the GAs from , the GA proposed in this paper uses a 3-opt local search heuristic and a problem-specific heuristic of W. Zhang  to generate the initial population. In addition, this GA applies a new mutation operator, which performs a random jump within 3-opt or 4-opt neighborhood. The current GA is based on the steady state replacement , while the GAs in  were based on the elitist recombination (see e.g. 
). The experimental evaluation on instances from TSPLIB library shows that the proposed GA yields results competitive to those obtained by some other well-known evolutionary algorithms for the ATSP.
2 Genetic Algorithm
The genetic algorithm is a random search method that models a process of evolution of a population of individuals . Each individual is a sample solution to the optimization problem being solved. The components of an individual are called genes. Individuals of a new population are built by means of reproduction operators (crossover and/or mutation). The crossover operator produces the offspring from two parent individuals by combining and exchanging their genes. The mutation adds small random changes to an individual.
The formal scheme of the GA with steady state replacement is as follows:
Steady State Genetic Algorithm
Step 1. Construct the initial population and assign .
Step 2. Repeat steps 2.1-2.4 until some stopping criterion is satisfied:
2.1. Choose two parent individuals from the population.
2.2. Apply mutation to and and obtain individuals .
2.3. Create an offspring , applying a crossover to and .
2.4. Choose a least fit individual in population and replace it by .
2.5. Set .
Step 3. The result is the best found individual w.r.t. objective function.
Our implementation of the GA is initiated by generating initial solutions, and the population size remains constant during the execution of the GA. Two individuals of the initial population are constructed by means of the problem-specific heuristic of W. Zhang . The heuristic first solves the Assignment Problem, and then patches the cycles of the optimum assignment together to form a feasible tour. R. Karp  proposed two variants of the patching. In the first one, some cycle of maximum length is selected and the remaining cycles are patched into it. In the second one, cycles are patched one by one in a special sequence, starting with a shortest cycle. All other individuals of the initial population are generated using the arbitrary insertion method , followed by a local search heuristic with a 3-opt neighborhood (see Subsection 2.2).
Each parent on Step 2.1 is chosen by -tournament selection: sample randomly individuals from the current population and select a fittest among them.
2.1 Recombination Operators
Suppose that feasible solutions to the ATSP are encoded as vectors of adjacencies, where the immediate predecessor is indicated for each vertex. Then theoptimal recombination problem with adjacency-based representation  consists in finding a shortest travelling salesman’s tour which coincides with two given feasible parent solutions in arcs belonging to both solutions and does not contain the arcs absent in both solutions. These constraints are equivalent to a requirement that the recombination should be respectful and gene transmitting as defined in . The ORP with adjacency-based representation for the ATSP is shown to be NP-hard but it can be reduced to the TSP on graphs with bounded vertex degrees . The resulting TSP may be solved in time by means of an adaptation of the algorithm proposed by D. Eppstein . A detailed description of the reduction can be found in . An experimental evaluation of the ORP with adjacency-based representation in a crossover-based GA was carried out in . The experiments showed that the CPU cost of solving the ORPs in this GA is acceptable and decreases with iterations count, due to decreasing population diversity. In what follows, the optimized crossover operator, which solves the ORP with adjacency-based representation will be called Optimized Directed Edge Crossover (ODEC). This operator may be considered as a deterministic ‘‘direct descendant’’ of Directed Edge Crossover (DEC) . Unlike DEC, Optimized Directed Edge Crossover guarantees genes transmission.
An alternative way for solution encoding to the ATSP is the position-based representation, where a feasible solution is encoded as a sequence of the vertices of the TSP tour. The computational experiment performed in  indicates that the ORP for the adjacency-based representation has an advantage over the ORP for the position-based representation on ATSP instances from TSPLIB library. Therefore, in this paper we consider only the adjacency-based representation.
2.2 Local Search Heuristic
In general, -opt neighborhood for TSP is defined as the set of tours that can be obtained from a given tour by replacing arcs. Our Local Search Heuristic is a typical local search heuristic that explores a subset of -opt neighborhood.
We try to improve the current tour by changing three of its arcs (see Figure 1). To this end, we consider all possible arcs of the current tour as candidates for arc to be deleted in the order of decreasing length. Observe that, in our search, the possibilities for choosing (arc is added) may be limited to those vertices that are closer to than . To use this property, for each vertex we store a list of the remaining vertices in the order of increasing length from . Considering candidates for , we start at the beginning of ’s list and proceed down the list until a vertex with is reached. Moreover, only the nearest vertices are stored in the sorted list of each vertex, which allows to reduce the running time and the memory usage as observed in . Finally, among all vertices belonging to the closed cycle created by we choose a vertex that would produce the most favorable 3-change. Local Search Heuristic stops if no favorable 3-change is possible, otherwise it proceeds to the next step with a new tour obtained.
In order to reduce the running time of the presented local search heuristic, we use the well-known ‘‘don t look bits’’ and ‘‘first improving move’’ strategies presented in  for local search based on -opt neighborhood.
2.3 Mutation Operators
The mutation is applied to each parent solution on Step 2.2 with probability, which is a tunable parameter of the GA. We implement two mutation operators that perform a random jump within 3-opt or 4-opt neighborhood. Each time one of the operators is used for mutation with equal probability.
The first mutation operator makes a 3-change (see Section 2.2). First of all, an arc is chosen at random among all arcs of the given tour. After that, an arc is chosen using the following idea from . For each possible arc , we calculate , where is the immediate predecessor of in the given tour, is the length of the cycle created by and is the average weight of arcs in graph . Then an arc is chosen uniformly at random among the top of arcs w.r.t. value. The reason for taking into account the value of when is being chosen is that the bigger the value of the more options for will become available subsequently. Finally, we choose the arc among the arcs of so that the most favorable 3-change is produced.
3 Computational Experiments
This section presents the results of computational experiments on the ATSP instances from TSPLIB library . The GA was programmed in Java (NetBeans IDE 7.2.1) and tested on a computer with Intel Core 2 Duo CPU E7200 2.53 GHz processor, 2 Gb RAM. In the experiments, we set the population size , the tournament size and the mutation probability .
Our GA is restarted every time as soon as the current iteration number becomes twice the iteration number when the best incumbent was found, until the overall execution time reached the limit. Moreover, if the greedy heuristic of W. Zhang generates only one subcycle, this indicates that the ATSP instance was solved to optimality, and the algorithm stops. The best solution found over all restarts was returned as the result. We have also tested an alternative approach, where the GA runs for the whole given period of time without restarts but it turned to be inferior to the GA with the restart rule.
The first computational experiment is aimed at comparison of the performance of our GA based on ODEC () with SAX/RAI memetic algorithm () from , which has one of the best results in the literature on metaheuristics for the ATSP. In order to put the considered algorithms into equal positions, was given the CPU-time limit (denoted as ) by a factor less than the CPU resource used by in . This scaling factor chosen on the basis a rough comparison of computers by means of performance table . For a statistical comparison, on each instance we executed times. In each execution was given the same CPU-time limit indicated above. In , was run times on each instance. Table 1 shows the obtained results, where represents the frequency of finding an optimum, is the average percentage deviation of the length of a resulting solution from the optimum, denotes the average percentage deviation of the length of the best initial solution from the optimum. As seen from Table 1, achieved success rate on out of instances. On each instance, found optima in not less than of runs.
The statistical analysis of experimental data was carried out using a significance test of the null hypothesis from, Ch. 8, §2. Suppose that two algorithms are compared in terms of probability of ‘‘success’’, where ‘‘success’’ corresponds to finding an optimal solution. Let and denote the probabilities of success for the considered algorithms. The null hypothesis is expressed by .
The test procedure is as follows. Under the null hypothesis, the estimate of common success rate is, where denotes the frequency of success in runs for the first algorithm and is the frequency of success in runs for the second algorithm. Then the difference
is expressed in units of the standard deviation by calculating the statistic, where is the estimation of the standard deviation.
It is supposed that statistic
is normally distributed. To test the null hypothesis versus the alternative one at a confidence level, we compare the computed
to the quantile of standard normal distribution. If is lager than the null hypothesis is rejected. Otherwise the null hypothesis is accepted. At we have . The values of statistic for algorithms and are found and presented in the last column of Table 1 (‘’ indicates the statistical significance difference between and at level ).
In out of instances, finds an optimum more frequently than (in cases among these, the difference between the frequencies of finding an optimum is statistically significant). Both algorithms demonstrate frequency of obtaining an optimum on problems. Note that the heuristic of W. Zhang is very efficient on series rbg and the optimal solutions to all rbg instances were found in the considered algorithms at the initialization stage. slightly outperforms only on two instances ftv90 and ftv100, but the differences are not statistically significant. Moreover, the average quality of the resulting solutions for is approximately in times better than the average quality for . The quality of initial solutions is better in our algorithm. (Note that we use the local search at the initialization stage, while applies a local search only on GA iterations.)
Recently, Tinós at el.  proposed a GA with new crossover operator GAPX, which presents very competitive results in terms of frequencies of finding an optimum, but its CPU resource usage is significantly higher than that of . On all of TSPLIB-instances tested in  GA with GAPX demonstrated success, while displayed success on average. However, the average CPU-time of our GA was sec. on these instances, and the overall CPU-time of GA with GAPX was sec. on a similar computer.
In the second experiment, we compare our steady state GA to the similar GA with the population management strategy known as elitist recombination  () under the same CPU-time limit. The results are also listed in Table 1. The eighth column represents the values of statistic for comparison of against on all ATSP instances. We estimate the average frequency of finding optimal solutions for as approximately of the average frequency for (the difference between the frequencies is statistically significant), except for of instances where both algorithms have success. Note that the GA with elitist recombination maintains the population diversity better. Due to this reason, the GA with elitist recombination outperformed the steady state GA in our preliminary experiments with no restarts, which were organized analogously to the experiments in . The restarts performed in allow to avoid localization of the search and restore the population diversity, leading to better results.
We carried out the third experiment in order to compare the optimized crossover ODEC to its randomized prototype DEC. This experiment clearly showed an advantage of ODEC over DEC. The modification of where operator DEC substitutes ODEC, on average gave only frequency of obtaining an optimum within the same CPU time limit. Moreover, for the large-scale problems such as ftv120, ftv130, ftv140, ftv150 and ftv170 the GA with DEC found optimal solution no more than once out of 1000 runs.
We proposed a steady-state GA with adjacency-based representation using an optimal recombination and a local search to solve the ATSP. An experimental evaluation on instances from TSPLIB library shows that the proposed GA yields results competitive to those of some other state-of-the-art genetic algorithms. The experiments also indicate that the proposed GA dominates a similar GA based on the population management strategy, known as elitist recombination. The restarts performed in the proposed GA allow to avoid localization of search and restore the population diversity, leading to better results when the steady-state population management is used. The experiments also show an advantage of the deterministic optimized crossover over its randomized prototype.
-  Brown, B.W., Hollander, M.: Statistics: A Biomedical Introduction. John Wiley & Sons, Inc (1977)
-  Buriol, L.S., Franca, P.M., Moscato, P.: A new memetic algorithm for the asymmetric traveling salesman problem. Journal of Heuristics 10, 483–506 (2004)
-  Cook, W., Seymour, P.: Tour merging via branch-decomposition. INFORMS Journal on Computing 15(2), 233–248 (2003)
-  Dongarra, J.J.: Performance of various computers using standard linear equations software. Tech. Rep. CS-89-85, University of Manchester (2014), 110 p.
-  Eppstein, D.: The traveling salesman problem for cubic graphs. Journal of Graph Algorithms and Applications 11(1) (2007)
-  Eremeev, A.V., Kovalenko, J.V.: Optimal recombination in genetic algorithms for combinatorial optimization problems: Part II. Yugoslav Journal of Operations Research 24(2), 165–186 (2014)
-  Eremeev, A.V., Kovalenko, J.V.: Experimental evaluation of two approaches to optimal recombination for permutation problems. In: 16th European Conference, EvoCOP 2016, LNCS. pp. 138–153. Porto, Portugal (2016)
-  Garey, M.R., Johnson, D.S.: Computers and Intractability. A Guide to the Theory of NP-completeness. W. H. Freeman and Company, San Francisco (1979)
-  Goldberg, D., Thierens, D.: Elitist recombination: An integrated selection recombination GA. In: First IEEE World Congress on Computational Intelligence,. vol. 1, pp. 508–512. IEEE Service Center, Piscataway, New Jersey (1994)
-  Johnson, D.S., McGeorch, L.A.: The traveling salesman problem: a case study. In: Aarts, E., Lenstra, J.K. (eds.) Local Search in Combinatorial Optimization, pp. 215–336. John Wiley & Sons Ltd. (1997)
-  Kanellakis, P.C., Papadimitriou, C.H.: Local search for the asymmetric traveling salesman problem. Oper. Res. 28, 1086–1099 (1980)
-  Karp, R.M.: A patching algorithm for the nonsymmetric traveling-salesman problem. SIAM Journal on Computing 8, 561–573 (1979)
Radcliffe, N.J.: The algebra of genetic algorithms. Annals of Mathematics and Artificial Intelligence 10(4), 339–384 (1994)
-  Reeves, C.R.: Genetic algorithms for the operations researcher. INFORMS Journal on Computing 9(3), 231–250 (1997)
-  Reinelt, G.: TSPLIB – a traveling salesman problem library. ORSA Journal on Computing 3(4), 376–384 (1991)
Tinós, R., Whitley, D., Ochoa, G.: Generalized asymmetric partition
crossover (GAPX) for the asymmetric TSP
. In: The 2014 Annual Conference on Genetic and Evolutionary Computation. pp. 501–508. ACM New York, NY (2014)
-  Whitley, D., Starkweather, T., Shaner, D.: The traveling salesman and sequence scheduling: Quality solutions using genetic edge recombination. In: Davis, L. (ed.) Handbook of Genetic Algorithms, pp. 350–372. Van Nostrand Reinhold, NY (1991)
-  Yagiura, M., Ibaraki, T.: The use of dynamic programming in genetic algorithms for permutation problems. Eur. Jour. Oper. Res. 92, 387–401 (1996)
-  Zhang, W.: Depth-first branch-and-bound versus local search: A case study. In: 17th National Conf. on Artificial Intelligence. pp. 930––935. Austin, TX (2000)