Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/carbonicsoda/tsp-hilbert-curve-benchmark
Benchmark of Hilbert Curve Sort on the TSPLIB Dataset
https://github.com/carbonicsoda/tsp-hilbert-curve-benchmark
benchmark mathematics travelling-salesman-problem
Last synced: 4 days ago
JSON representation
Benchmark of Hilbert Curve Sort on the TSPLIB Dataset
- Host: GitHub
- URL: https://github.com/carbonicsoda/tsp-hilbert-curve-benchmark
- Owner: CarbonicSoda
- Created: 2024-11-14T04:42:57.000Z (3 months ago)
- Default Branch: master
- Last Pushed: 2024-12-08T02:22:20.000Z (2 months ago)
- Last Synced: 2024-12-08T03:08:23.059Z (2 months ago)
- Topics: benchmark, mathematics, travelling-salesman-problem
- Language: JavaScript
- Homepage:
- Size: 7.84 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
A simple benchmark on how well the [Hilbert Curve Sort](https://github.com/CarbonicSoda/hilbert-curve-sort) performs on the TSPLIB dataset.
Particularly, the famous [pla85900.tsp](pla85900.tsp) set containing 85900 nodes.The result is quite fascinating to me.
h2CurveSort, a fast algorithm that is not designed for TSP problems,
achieved a distance of 188465250 (CEIL_2D), only a rough x1.32 of the Mathematically optimal distance 142382641 (CEIL_2D).
That might seem quite bad, but many dedicated approximation algorithms do no better, yet this algorithm is more efficient.A slight flaw of using the Hilbert Curve Sort to approximate TSP solutions, is that TSP asks for a _cycle_, not a simple tour.
Hilbert Curve Sort will not minimize the distance between the first and the last node, adding an overhead to the resultant distance.#### Tour Visualization
_Optimal Tour_
![Optimal Tour](assets/pla85900_optimal.png)
_Hilbert Curve Tour_
![Hilbert Curve Tour](assets/pla85900_hilbert_curve.png)
> Notice an additional horizontal line near the bottom of the tour connecting the bottom-left and the bottom-right. This is an example of the flaw I mentioned above.