Skip to content

zhulixiao/travelling-salesman-problem

Repository files navigation

travelling-salesman-problem

Two algorithms are implemented: the exhaustive algorithm and nearest neighbor algorithm

To run the code, simply download the code and type make in the folder. To run the nearest algorithm, ./nearest 'input.txt'. Same for the exhaustive algorithm, type ./exhaustive 'input.txt'.

The input can be generated by the provided random generator. type ./randomNum. And input how many points in the input.

The process time for each algorithm is also provided. For the nearest algorithm, the process time won't beyond 1s when numbers of input are less than 100,000. For the exhaustive algorithm, the process time will take more than 1 min when input = 13.

About

Two algorithms are implemented: the exhaustive algorithm and nearest neighbor algorithm

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published