International Journal of Engineering and Information Technology Research (IJCSEITR) ISSN 2249-6831 Vol. 3, Issue 2, Jun 2013, 183-186 © TJPRC Pvt. Ltd.

MEMETIC A APPROACH TO SOLVE RTSP

NITESH M SUREJA1 & BHARAT V CHAWDA2 1Associate Professor, G H Patel College of Engineering & Technology, Vallabh Vidyanagar, Gujarat, India 2Lecturer, B & B Institute of Technology, Vallabh Vidyanagar, Gujarat, India

ABSTRACT

There are some real world problems like TSP which cannot be solved with traditional mathematical methods. Difficulties associated while solving them traditionally forced the researchers to find some alternative solutions. Nature inspired are one of the proposed solutions. (GA), Memetic algorithms (MA), Ant colony optimization (ACO) and (SA) are some examples of them. All these algorithms are also considered as optimization algorithms as they give solutions which are very near to optimal. In this paper, a Memetic algorithm is proposed to solve a variant of TSP known as Random Traveling Salesman Problem (RTSP). RTSP is a problem in which the TSP dataset is created randomly, and then it is passed to one of the selected algorithm to solve it. Results obtained are compared to the results obtained by Genetic Algorithm and a conclusion is given.

KEYWORDS: Memetic Algorithms, Genetic Algorithms, Local Search, Traveling Salesman Problem, Random Traveling Salesman Problem

INTRODUCTION

No traditional method can solve the NP-hard problems like TSP in reasonable time with speed and accuracy as the complexity of the problem increases exponentially with the increase in problem size. Many alternate methods which belong to nature inspired algorithms have been proposed to solve TSP. Some of them are: Simulated Annealing (SA) [1], Genetic Algorithms (GA) [2], Particle Swarm Optimization (PSO) [3], Bee Colony Optimization (BCO) [4], Artificial Immune System (AIS) [5], Firefly Algorithms (FA) [6], Monkey Search (MS) [7], Harmony Search (HS) [8], Bat Inspired Approach (BIA) [9], Ant Colony Optimization (ACO) [10] and Memetic Algorithm (MA) [11]. We apply Memetic Algorithm to Random Traveling Salesman Problem (RTSP) [1][2][10] in this paper.

RANDOM TRAVELING SALESMAN PROBLEM

Traveling Salesman Problem (TSP) is one of the bench mark problem for researchers to test their new methods for optimization. TSP is very difficult to solve conventionally though it is a very simple problem to understand. In this problem, a traveling salesman has to visit all the cities and return back to the starting city without visiting any city twice. As the number of cities increases, the complexity of the problem increases exponentially due to the number of possible solutions increased very heavily. This paper presents a Memetic Algorithm for solving a variant of TSP known as Random Traveling Salesman (RTSP) [1][2][10]. In this variant TSP dataset is generated randomly instead of using available dataset on TSPLIB. All the city coordinates are generated in pre-defined range like 0 to 100.

MEMETIC ALGORITHMS

A Memetic Algorithm (MA) is a search technique used to find the solutions of optimization problems. Memetic Algorithm is considered as an advanced or Hybrid GA as it is inspired by Darwin’s principles of natural evolution [2] as well as Dawkin’s notion of a [11]. Meme is a unit of cultural evolution capable of individual learning. Every meme 184 Nitesh M Sureja & Bharat V Chawda gains some experience through a local search before going in to evolution of new generations. Memetic Algorithms use techniques inspired by natural selection such as mutation, selection, and crossover with the addition of local search. They use same parameters as in GA [2] added with the parameters of local search [12] [13].

The flowchart of the Memetic Algorithm is given in figure 1.

Figure 1: Flowchart for Memetic Algorithm

PROPOSED MA-RTSP ALGORITHM Random Traveling Salesman problem (RTSP) has been already mentioned previously. To repeat it, the datasets of this problem are generated randomly. In other words, we have created our own datasets instead of using standard datasets from TSPLIB. Pseudo code of the proposed MA-RTSP algorithm to solve RTSP is given as per following:

Figure 2: Pseudocode for Proposed MA-RTSP Algorithm

Here, city coordinates are generated randomly in range of 0 to 100 to prepare a TSP dataset. Once a TSP dataset is prepared, population of initial solutions is initialized by generating tours using random permutation of cities. Each tour represents a solution in a population. All these tours are optimized by applying simple hill-climbing local search method. In this method, each city in a tour is swapped with its next city in a tour to get a new tour. If new tour is better than the current one, it is accepted as a current tour. This type of swapping continues till the quality of the new tour gets improvement. Memetic Algorithm a Metaheuristic Approach to Solve RTSP 185

After optimizing initial population, betters tours are selected using tournament selection to create a matting pool. Partially mapped crossover is applied on the randomly selected each pair (parent) of tours from a matting pool to get two offspring. Based on a given mutation rate, each offspring is mutated to explore the problem space. After this, local search is applied to improve the quality of each solution. Updated population is evaluated and the entire procedure is repeated until the best solution reaches its stagnation state.

IMPLEMENTATION AND RESULTS

Results obtained by Genetic and Memetic algorithm are shown in Table 1 and Figures 3 to 7.

Table 1: Results of Proposed MA-RTSP along with Genetic Algorithm

Genetic Algorithms Memetic Algorithms City Tour No. of Time Tour No. of Time Problem Length Iterations (Seconds) Length Iterations (Seconds) 25 448.06 104 1.28 420.51 100 3.08 50 634.33 413 3.03 572.41 267 7.33 75 818.63 566 5.69 757.96 642 18.47 100 894.48 1909 16.75 840.24 1154 34.02 125 1066.13 1456 17.70 987.66 1707 54.50 150 1091.18 1847 22.33 1050.67 1633 67.91 175 1180.38 2731 33.98 1155.09 2535 113.51 200 1296.90 3338 45.98 1216.19 3002 138.59

The performance of algorithm for each TSP dataset is studied for tour length, time, iterations required and quality. We find that results start to degrade slowly with the increase in the size of TSP dataset in terms of time and iterations required. Application of Local Search increases the time of convergence which is really noteworthy here. Results of our proposed algorithm are also compared with results obtained by our implemented Genetic Algorithm [2] to the same TSP datasets. Results show that our proposed algorithm performs better than the Genetic Algorithm for all kind of TSP datasets. 186 Nitesh M Sureja & Bharat V Chawda

CONCLUSIONS

Searching an optimal route for a Traveling Salesman Problem is very important to save time and cost. We have presented a Memetic Algorithm to find the optimal solution for Random Traveling Salesman Problem. We have also implemented Genetic algorithm approach for the same. Both the approaches are tested using RTSP datasets of size ranging from 25 to 200 cities. The results show that our algorithm produces the best solutions in terms of tour length, quality, iterations and accuracy with the ignorance of time required. At the end, we conclude that this algorithm has capacity to solve various optimization problems if applied properly.

REFERENCES

1. Nitesh M Sureja, Bharat V Chawda, “Random Travelling Salesman Problem using SA”, International Journal of Emerging Technology and Advanced Engineering, Volume 2, Issue 3, March 2012.

2. Nitesh M Sureja, Bharat V Chawda, “Random Travelling Salesman Problem using Genetic Algorithms”, IFRSA’s International Journal Of Computing, Volume 2, Issue 2, April 2012.

3. Kennedy, J.; Eberhart, R. (1995), "Particle Swarm Optimization", Proceedings of IEEE International Conference on Neural Networks IV, pp. 1942–1948.

4. D. Karaboga, B. Basturk, “A Powerful and Efficient Algorithm for Numerical Function Optimization: Artificial Bee Colony (ABC) Algorithm”, Journal of , pp. 459–471, (2007).

5. D. Dasgupta, “Artificial Immune Systems and Their Applications”, Springer, Berlin, (1999).

6. X.S Yang, “Firefly algorithm for multimodal optimization”, in proceedings of the stochastic Algorithms, Foundations and Applications (SAGA 109) vol. 5792 of Lecture notes in Computer Sciences, Springer, (2009).

7. R. Zhao, W. Tang, “Monkey Algorithm for Global Numerical Optimization”, Journal of Uncertain Systems, Vol. 2, No. 3, pp. 165-176, (2008).

8. X.S. Yang, “Harmony Search as a Metaheuristic Algorithm”, Studies in Computational Intelligence, Springer Berlin, Vol. 191, pp. 1-14 (2009).

9. X.-S. Yang, “A New Metaheuristic Bat-Inspired Algorithm”, Studies in Computational Intelligence, Springer Berlin, 284, Springer, 65-74 (2010).

10. Nitesh M Sureja, Bharat V Chawda, “An ACO Approach to Solve a Variant of TSP”, International Journal of Advanced Research in Computer Engineering & Technology, Volume 1, Issue 5, July 2012.

11. E. Elbeltagi, T. Hegazy, D. Grierson, “Comparison among Five Evolutionary-based Optimization Algorithms”, Advanced Engineering Informatics - Artificial, vol. 19, no. 1, pp. 43-53, (2005).

12. P, Moscato, “On Evolution, Search, Optimization, Genetic Algorithms and Martial Arts: toward Memetic Algorithms”, Technical Report Caltech Concurrent Computation Program, Report 826, California Institute of Technology, Pasadena, CA, (1989).

13. P, Garg, “A Comparison between Memetic algorithm and Genetic Algorithm for the Cryptanalysis of Simplified Data Encryption Standard algorithm”, International Journal of Network Security & Its Applications (IJNSA), Vol.1, No 1, April 2009.