CUDA-Based Genetic Algorithm on Traveling Salesman Problem Su Chen, Spencer Davis, Hai Jiang, and Andy Novobilski Abstract. Genetic algorithm is a widely used tool for generating searching solutions in NP-hard problems. The genetic algorithm on a particular problem should be specifically designed for parallelization and its performance gain might vary according to the parallelism hidden within the algorithm. NVIDIA GPUs that support the CUDA programming paradigm provide many pro- cessing units and a shared address space to ease the parallelization process. A heuristic genetic algorithm on the traveling salesman problem is specially designed to run on CPU. Then a corresponding CUDA program is devel- oped for performance comparison. The experimental results indicate that a sequential genetic algorithm with intensive interactions can be accelerated by being translated into CUDA code for GPU execution. 1 Introduction Genetic algorithm (GA) and other stochastic searching algorithms are usu- ally designed to solve NP-hard problems [3]. The traveling salesman problem (TSP) is a famous NP-hard problem [5][10]. It aims to get the shortest wrap- around tour path for a group of cities. Since NP-hard problems cannot be solved in acceptable time, people aim to find acceptable solutions in accept- able time instead. To achieve this, various heuristic algorithms, such as the genetic algorithm, ant algorithm, tabu search, neural network, etc., are de- signed. Genetic algorithm was inspired by the evolvement of chromosomes in the real world, which includes crossover, mutation, and natural selection. Viewing chromosomes as solutions to a TSP problem, crossover and mutation are Su Chen · Spencer Davis · Hai Jiang · Andy Novobilski Department of Computer Science Arkansas State University, Jonesboro, AR, 72467, USA e-mail:{su.chen,spencer.davis}@smail.astate.edu, {hjiang,anovobilski}@astate.edu R. Lee (Ed.): Computer and Information Science 2011, SCI 364, pp. 241–252. springerlink.com c Springer-Verlag Berlin Heidelberg 2011