https://github.com/boechat107/tsp_furthest_insertion_haskell
Haskell implementation to solve the Travelling Salesman Problem.
https://github.com/boechat107/tsp_furthest_insertion_haskell
Last synced: 2 months ago
JSON representation
Haskell implementation to solve the Travelling Salesman Problem.
- Host: GitHub
- URL: https://github.com/boechat107/tsp_furthest_insertion_haskell
- Owner: boechat107
- Created: 2012-05-18T01:59:11.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2014-03-14T15:33:07.000Z (about 11 years ago)
- Last Synced: 2025-01-21T13:25:51.419Z (4 months ago)
- Language: Haskell
- Homepage: http://boechat107.github.io/travelling-salesman-problem-tsp/
- Size: 250 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Travelling Salesman Problem
(Haskell version)This work was the result of the
[Programming Languages 2](http://www.inf.ufes.br/~raulh/) course's project.
The studied problem was the
[*Travelling Salesman Problem*](http://en.wikipedia.org/wiki/Travelling_salesman_problem)
(TSP) and the application of binary tree variations as indexation and heap data
structures.
In summary, given a set of Euclidean 2D points, the problem consist of finding the
shortest possible tour, which should pass over each point just once and come back to
the initial tour.
Two different algorithms were used to construct the tour (the path to visit all
vertices or cities):* [*Farthest Insertion*](http://users.cs.cf.ac.uk/C.L.Mumford/howard/FarthestInsertion.html)
(FI)
* [*Double Minimum Spanning Tree*](http://en.wikipedia.org/wiki/Minimum_spanning_tree)
(DMST)More theoretical discussion and analysis can be read
[here](http://boechat107.github.io/research%20problems/2014/02/25/travelling-salesman-problem-tsp/).## Dependencies
* `libghc-glut-dev` (tested with version 2.4.0.0)
## How to run
Go to the folder of an implementation and type
make
./OpenglFI d.50which runs the chose algorithm for a file with the coordinates of 50 cities and
shows an OpenGL window representation of the final tour.