An Analysis of a Recursive and an Iterative Algorithm for Generating Permutations Modified for Travelling Salesman Problem

Velin Kralev (1)
(1) South-West University "Neofit Rilski", Blagoevgrad, Bulgaria, Departement of Informatics
Fulltext View | Download
How to cite (IJASEIT) :
Kralev, Velin. “An Analysis of a Recursive and an Iterative Algorithm for Generating Permutations Modified for Travelling Salesman Problem”. International Journal on Advanced Science, Engineering and Information Technology, vol. 7, no. 5, Oct. 2017, pp. 1685-92, doi:10.18517/ijaseit.7.5.3173.
This paper presents the results of a comparative analysis between a recursive and an iterative algorithm when generating permutation. A number of studies discussing the problem and some methods dealing with its solution are analyzed. Recursion and iteration are approaches used in computer programs to implement different algorithms. An iterative approach is the repeated execution of the same source code until a certain end condition is met. On the other hand, a recursive approach uses a recursive function that repeatedly calls itself. This function contains a source code that must be executed repeatedly. Both algorithms presented in this paper can be used to generate permutations of an n element set. The algorithms are modified so that they can be used to solve the Travelling Salesman Problem (TSP) with a small number of vertices. Several publications that discuss the TSP and some approaches to its solution are also presented. The methodology and the conditions for conducting the experiments are described in details. The obtained results have been analyzed; they show that for the same conditions the iterative algorithm works from of 8 to 16 times faster than the recursive algorithm in all the tested input data. Several approaches to optimize the two algorithms in terms of the number of permutations tested when searching a minimal Hamiltonian cycle are presented.

Authors who publish with this journal agree to the following terms:

    1. Authors retain copyright and grant the journal right of first publication with the work simultaneously licensed under a Creative Commons Attribution License that allows others to share the work with an acknowledgement of the work's authorship and initial publication in this journal.
    2. Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the journal's published version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgement of its initial publication in this journal.
    3. Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See The Effect of Open Access).