A PARAMETRIC HYBRID METHOD FOR THE TRAVELING SALESMAN PROBLEM

-The traveling salesman problem (TSP) is one of the typical NP–Hard problems of combinatorial optimization area. This paper proposes a new hyper heuristic algorithm named Parametric Hybrid Method (PHM) based on The Farthest Vertex (FV) and Greedy heuristics for solving the traveling salesman problem. In addition, many problem instances from TSPLIB (traveling salesman problem library) were solved with NN, Greedy and PHM algorithms. The experimental results show that the new hybrid algorithm is more effective and efficient than both Greedy and Nearest Neighbor algorithms.


INTRODUCTION
TSP is a well-known and important combinatorial optimization problem which is studied in operations research and computer science [2,3].TSP can be described briefly as follows: a salesman wants to sell his goods in n city.Salesman visits each city only once and has to go back into initial city.The problem is investigating the route which has minimum cost to do this job.In this paper, we will consider the symmetric TSP [7].
Formally, the TSP can be stated as follows [14].The distances between n cities are stored in a distance matrix D with elements where and the diagonal elements are zero.A tour can be represented by a cyclic permutation of where represents the city that follows city i on the tour.The traveling salesman problem is then the optimization problem to find a permutation that minimizes the length of the tour denoted by TSP has important part of applications in many areas including vehicle routing, network design, computer wiring, machine sequencing and scheduling, frequency assignment in communication networks, electronic circuit design, transportation and logic applications [4,8,9].
Since the TSP belongs to NP-Hard, it is very hard to develop an efficient algorithm for the problem.It is very important to find quality results in reasonable times for the problem, due to its large application area [6].
The rest of this paper is organized as follows.Section 2 describes some approaches for solving the traveling salesman problem.Section 3 presents our proposed parametric hybrid algorithm.Section 4 illustrates our experimental results.Finally, section 5 concludes the paper.

APPROACHES FOR SOLVING TSP
TSP is a simple problem, yet it is dramatically hard to solve [1].Various methods are used to generate solutions for the TSP [15], however, there is no known algorithm that finds an exact solution to the problem in polynomial time.The problem gets extremely difficult after a certain number of cities.Thus, heuristic and hyper heuristic methods are often preferred.
Heuristic algorithms can produce good solutions, but they do not guarantee that the solution they find is optimal.In general, the heuristic algorithms for TSP are subdivided into the following three classes: tour construction algorithms, tour improvement algorithms and hybrid algorithms [16].The tour construction algorithms gradually build a tour by adding a new city at each step, the tour improvement algorithms improve upon a tour by performing various exchanges, and finally hybrid algorithms use both composing and improving heuristics at the same time [5,[10][11][12][13].The best results are obviously obtained by using hybrid approaches [1,15].
Hyper heuristics are algorithms searching the "heuristic space" for solving the hard optimization problems.In this sense, a hyper heuristic decides which heuristic is more efficient to solve the problem instead of using a fixed method.In other words, if there are more than one successful heuristics for a problem, deciding which one of these will be even more successful is called as hyper heuristic.A deciding algorithm in situations where there is more than one heuristic applied to the problem is also called a hyper heuristic.
New hybrid heuristic algorithm we propose is based on our previous algorithms NND and The Farthest Vertex (FV), as well as the well-known Greedy and Nearest Neighbor algorithms.Next, we briefly review those.

The nearest neighbor algorithm (NN)
Among the tour construction heuristics, the nearest neighbor heuristic is the most simple one.The nearest neighbor (NN) algorithm for determining a traveling salesman tour is as follows.The salesman starts at a city then visits the city nearest to the starting city.Afterwards, he visits the nearest unvisited city, and repeats this process until he has visited all the cities, in the end, he returns to the starting city.
The steps of the algorithm are as following: NN Algorithm Step 1. Select a random city.
Step 2. Find the nearest unvisited city and go there.
Step 3. Are there any unvisited cities left?If yes, go to Step 2.
Step 4. Return to the first city.
A better result can be obtained by running the algorithm over again for each vertex and repeat it for n times.

The nearest neighbor algorithm from both end points (NND)
The algorithm starts with a vertex chosen randomly in the graph.Then, the algorithm continues with the nearest unvisited vertex to the chosen vertex.We will have two end vertices.We add a vertex to the tour such that this vertex has not visited before and it is the nearest vertex to these two end vertices.We update the end vertices.The algorithm ends after visiting all vertices.
The steps of the algorithm are as following: NND Algorithm Step 1. Choose an arbitrary vertex in the graph.
Step 2. Visit the nearest unvisited vertex to this vertex.
Step 3. Visit the nearest unvisited vertex to these two vertices and update the end vertices.
Step 4. Is there any unvisited vertex left?If yes, then go to Step 3.
Step 5. Go to the end vertex from the other end vertex.

The greedy algorithm
The Greedy heuristic gradually constructs a tour by repeatedly selecting the shortest edge and adding it to the tour as long as it does not build a cycle with less than N edges, or increase the degree of any node to more than 2.
The steps of the algorithm are as following: Greedy Algorithm Step 1. Sort edges by increasing lengths.
Step 2. Select the shortest edge and add it to our tour if it doesn't violate any of the above constraints.
Step 3. Do we have n edges in our tour?If no, go to Step 2.

The farthest vertex algorithm (FV)
This algorithm is about finding the sums of each row in the adjacent matrix.The algorithm continues to add the minimum two distances of each row which includes the maximum distance to the tour.This process is applied to each row.
The steps of the algorithm are as following: FV Algorithm Step 1. Find the sums for each row in the adjacency matrix and add them to SUM column.
Step 2. Find the maximum sum of SUM column.
Step 3. From the same row in which this maximum sum exists, select the two minimum distances which do not contain a sub tour and add them to the tour.
Step 4. Delete the row and the column which correspond to the maximum sum.
Step 5. Increase the number of selected vertices by 1.
Step 6.If the number of selected vertices is less than n then go to step 2.

A NEW PARAMETRIC HYBRID ALGORITHM
A new Hyper Heuristic algorithm is proposed below: Initially, NN algorithm is to determine a path whose end vertices are used in NND algorithm.Then NND algorithm continues with an implementation of FV algorithm where the farthest vertices are being considered.Finally, k parameter is included to the method so that FV and the Greedy algorithm work together.The parameter k determines the contribution ratio of the algorithms.For k = 0, the hybrid algorithm will only use the Greedy algorithm; likewise, for k = n, the hybrid algorithm will only use FV algorithm.When k is in interval (0, n), for the first k farthest vertices FV (or the NN algorithm for these vertices) is performed and the Greedy algorithm runs on the rest of the vertices.We call this hybrid algorithm PFVGH.
The steps of the algorithm are as following: PFVGH Algorithm Step 1. Find the sums for each row in the adjacency matrix.
Step 2. Sort the sums in descending order.
Step 3. Identify the k parameter.
Step 4. For the first k vertices of the sorted sums, select the two edges with minimum distances that don't form a sub tour, and add them to the tour.
Step 5. Perform the Greedy algorithm for choosing rest of the edges to complete the tour.

Computational experiments with PFVGH
The results of the computational experiments conducted on the problems ulysses16 and ulysses22 of TSPLIB [18] are represented below.As shown in Table 1, on the problem ulysses16 the best result was achieved when k was 9.As shown in Table 2, on the problem ulysses22 the best result was achieved when k was 12 and 13.
Similarly, Figure 1 shows the results PFVGH produces for the problem Eil76, depending on the parameter k.As it is seen in Figure 1, PFVGH produces better results with larger k values, until a particular value.
The experimental results are shown in Table 3, on 10 different problems with a variety of dimensions from TSPLIB.The first column contains names of the problems and their dimensions.Second column contains the optimum tour length and third column contains the best result achieved with PFVGH and associated k values.Likewise, fourth column contains the worst results and associated k values.Last 2 columns contain the results achieved for k = 0 and k = n.As seen in Table 3, the better results are always achieved for (0 < k < n).

EXPERIMENTAL RESULTS
This section presents the results of the computational experiments for the proposed hyper heuristic algorithm.The sample problems used in these experiments are taken from the [17].And the optimum solutions for each of these problems are taken from the [18].
Table 4 shows the length of the optimal tour and the tours produced by different heuristic algorithms and the new hybrid algorithm.In Table 4, filled cells show the best results achieved by heuristics.As seen in Table 4, PFVGH outperforms the NN algorithm and the Greedy algorithm in any instance.

CONCLUSION
In this work, we proposed a hyper heuristic that uses the previous algorithms we developed [11][12][13] and some well-known heuristics.The implementations of the algorithms were coded in C++ language.Then, we conducted computational experiments with the new algorithm and the other heuristics on a variety of problems.These experiments showed that the new algorithm outperforms the other heuristics.

Figure 1 .
Figure 1.Correlation between the parameter k and the results PFVGH produces for the problem Eil76.

Table 1 .
The results of the computational experiments on the problem ulysses16

Table 2 .
The results of the computational experiments on the problem ulysses22

Table 3 .
The results PFVGH produces on 10 different problems

Table 4 .
The experimental results