Skip to content

Implementation and visualization of Insertion, Nearest Neighbour and Random Search algorithms in Python

Notifications You must be signed in to change notification settings

yavalvas/Traveling-Salesman-Problem

Repository files navigation

Traveling Salesman Problem

Implementation of Random Search, Insertion and Nearest Neighbour algorithms in Python.

Each algorithm calculates the total distance of the coordinates in the dataset and plots the connecting path wth NetworkX library.

Project Setup

To run, place all of the files in the same directory. wi29.tsp contains a set of 29 city coordinates. sample.tsv contains a set of 131 city coordinates. Output of each file will be the total distance calculated by the algorithm and the graph of path taken by the algorithm.

Dependencies

  1. NetworkX
  2. Matplotlib

About

Implementation and visualization of Insertion, Nearest Neighbour and Random Search algorithms in Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published