The program needs to solve the traveling salesman problem by visiting every vertex in a graph using an optimized route.
The program will receive input from the user one line at a time until the user terminates via eof.
Input Format:
2 4 6.242 // int int double
The above line represents an edge between vertex 2 and vertex 4 that has an edge weight of 6.242.
Parameters:
The code must be simple. Optimization is not important.
Vertex 1 will always be the first visited.
Vertex 1 is not repeated at the end.
Every vertex will be visited exactly once.
The graph is complete, and every edge has the same weight in both directions.
Greedy or hill climbing algorithms preferred.
C++11 vectors preferred.
No namespaces.
No dynamic memory.
Keep classes and structs small - no complex abstract data types
Must be able to process 15MB of input lines in under 60 seconds (sample file attached).
Output Format:
1 5 2 4 3 64.726 // vertices in the order visited, followed by the total weight.
We are team of excellent developers and writers. We have 2 year experience related to your project field. We can do your project and solve your all problems according to your requirements. We have read your description for projects and we understand what you want so we are confident that we can do it easily in mention time. We assure you that you will be completely satisfy with our work. And after delivering your project if you feel some issue in understanding the projects then we will teach you free until you understand.
If you have any question then feel free to ask. We are here for you.
Thank you