Skip to content

the problem of finding a cycle in a graph that contains all vertices (each exactly once) and has the lowest possible cost

Notifications You must be signed in to change notification settings

AdamPiszczek/traveling-salesman-problem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

The-Traveling-Salesman-Problem

Description

The problem of finding a cycle in a graph that contains all vertices (each exactly once) and has the lowest possible cost.

Design

The program is primarily responsible for sorting the cities in such a way as to get the shortest route between them. At its input, it downloads data in the format ("A B C"), where:

  • A stands for the identifier of a given city
  • B is the latitude coordinate
  • C magnitude coordinate

After the operations are performed, the program correctly writes out the converted data in the data collection to the output.

Dependiencies

#include <iostream>
#include <iomanip>
#include <fstream>
#include <math.h>
#include <string>
#include <bits/stdc++.h>

Results

Sample route calculated between 9 cities (Warsaw, Amsterdam, Berlin, Helsinki, London, Minsk, Paris, Stockholm, Zagreb)

route example link to the source

About

the problem of finding a cycle in a graph that contains all vertices (each exactly once) and has the lowest possible cost

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages