Asia Pacific Journal of Education, Arts and Sciences | Vol. 1, No. 1 | March 2014 ________________________________________________________________________________________________________ 38 ISSN 2362 8022 | www.apjeas.apjmr.com A Molecular Dynamics Heuristic for Solving the Traveling Salesperson Problem Jaderick P. Pabico 1 , Jose Rene L. Micor 2 and Ma. Christine A. Gendrano 3 1 jppabico@uplb.edu.ph, 2 jrlmicor@uplb.edu.ph, 3 ma.christine.gendrano@dlsu.edu.ph 1 Institute of Computer Science, University of the Philippines Los Baños 2 Institute of Chemistry, University of the Philippines Los Baños 3 College of Computer Studies, De La Salle University Science and Technology Complex Abstract In this paper, a nature-based metaphor for computation is presented as a heuristic solution for a popular combinatorial optimization problem, the traveling salesperson problem (TSP). The metaphor was aptly named artificial chemistry (ACHEM) because the computational process is based on molecular dynamics. It is designed as a distributed stochastic algorithm that simulates reaction systems of algorithmic objects whose behavior is inspired by natural chemical systems. Finding the optimal solutions for TSP are particularly intractable for problem instances that are very large. This is the reason why a heuristic, such as the ACHEM, is a preferred solution than a computational procedure that provides optimal ones. To evaluate the utility of the heuristic, ACHEM was applied to find near-optimal solutions to large instances of the TSP. Results show that ACHEM outperformed other nature-based heuristics such as the simulated annealing and the self organizing maps, while it performed as good as the genetic algorithm and the ant colony optimization. Thus, ACHEM provides another natural metaphor for solving hard instances of the TSP. Keywords Artificial chemistry, combinatorial optimization, traveling salesperson problem, TSP I. INTRODUCTION The traveling salesperson problem (TSP) has been used as a paradigm for solving real-world problems such as shop floor control, scheduling, distribution of goods and services, vehicle routing, product design, and VLSI layout [1]. Given a set of cities, and known distances between each pair of cities, the TSP is the problem of finding a Hamiltonian tour such that the total distance traveled is minimum. A Hamiltonian tour is a tour that visits each city exactly once. TSP may also be stated as the search for the minimum Hamiltonian cycle instead, which is actually a Hamiltonian tour with the requirement that the salesperson return to the city where it started. Other TSP variants consider the cost of traveling between two cities, or the time it will take to travel between them, but the problem does not change [2],[3]. Exact solutions to solving TSP have been proposed by many researchers but these solutions are only efficient for small problem instances. TSP has proved to be intractable for large problem instances, where intractability of a solution means that even the fastest known computer will take a very long time to solve the problem. The TSP is intractable because if there are n cities, the number of possible tours is (n 1)!/2. If, for example, the recent fastest computer can compute for the cost of one tour in 12s, checking all possible tours when n is very large might take more than a human's lifetime. Table 1 shows the number of all possible tours and the approximate amount of time it will take to solve the TSP for some n 20. Realistically, the amount of time to compute for the cost of one tour increases as the length of tour increases, which in turn increases as the number of cities (n) increases. To simplify the estimate, the approximate time in Table 1 did not take into account the corresponding increase in computing for the cost of one tour at n>5. It is highly possible that the values in Table 1 will take longer than estimated at problem instances where n>5. Most real-world applications that use TSP as a paradigm for computation have n >> 20. Thus, checking all possible solutions when n > 20 is impractical. Table 1. The number of all possible tours and the approximate amount of time to solve n-city TSP's, where n 20, with the assumption that a computer can compute for one tour in a constant time of 12s. Number of Cities (n) Number of Possible Tours Time 5 12 12 s 8 2,520 2.5 ms 10 181,440 0.18 s 12 19,958,400 20 s 15 87,178,291,200 12.1 hours 18 177,843,714,048,000 5.64 years 20 60,822,550,204,416,000 1,927 years Intractable problems are said to belong to the class of NP- hard problems and TSP has proved to belong to the same class [4],[5]. Because of the nature of the TSP, researchers have developed heuristic and metaheuristic methodologies so that intractable instances of the TSP may be given practical solutions. Practicality here means that the problem can be computed within a reasonable amount of time, while the solutions found are near-optimal. Computing within reasonable amount of time means that a satisfiable solution can be obtained within a specified deadline (which, intuitively, should be shorter than a human's lifetime), while near-optimality means that the seeker of the solution is already satisfied with