Travelling Salesman Problem: A Python Implementation


Abstract views: 61 / PDF downloads: 20

Authors

  • Pankaj Dumka Department of Mechanical Engineering, Jaypee University of Engineering and Technology, Guna, Madhya Pradesh, India
  • Rishika Department of Electronics and Communication Engineering, Jaypee University of Engineering and Technology, Guna, Madhya Pradesh, India
  • Dhananjay R. Mishra Department of Mechanical Engineering, Jaypee University of Engineering and Technology, Guna, Madhya Pradesh, India

Keywords:

Travelling Salesman Problem, Python Programming, Revised Ones Assignment, Heuristic Algorithms, Combinatorial Optimization

Abstract

The Travelling Salesman Problem (TSP) is a fundamental combinatorial optimization problem with extensive applications in logistics, circuit manufacturing, and genetics. This study presents a Python-based implementation of TSP using the Revised Ones Assignment (ROA) method, transitioning from MATLAB to Python for broader accessibility. The ROA method is an iterative optimization approach that refines the cost matrix to obtain an optimal or near-optimal solution. The implementation leverages Python's scientific computing ecosystem, utilizing  NumPy, SciPy, and  Matplotlib for efficient computation and visualization. A comparative analysis of Python and MATLAB implementations highlights Python's effectiveness as an open-source alternative, with a marginal computational overhead. The proposed method efficiently finds the shortest possible tour for a given set of cities while adhering to TSP constraints. The study demonstrates that Python-based approaches can be instrumental in solving real-world TSP instances and optimizing complex routing problems. Future work will explore heuristic and metaheuristic techniques, such as genetic algorithms and ant colony optimization, to enhance computational scalability for larger datasets.

Downloads

Published

22-03-2025

How to Cite

Pankaj Dumka, Rishika Chauhan, & Dhananjay R. Mishra. (2025). Travelling Salesman Problem: A Python Implementation. International Journal of Mathematics And Its Applications, 13(1), 57–64. Retrieved from https://ijmaa.in/index.php/ijmaa/article/view/1542

Issue

Section

Research Article