Questions tagged [traveling-salesman]

The "traveling salesman problem" is a classical computer science problem which involves finding the shortest path which could be taken by a hypothetical salesman to make a single visit to each location on a map (in a graph).

The traveling salesman problem (often referred to by its initials: TSP) is one of the most well known "hard" (NP-complete) problems in classical computer science. Simply stated, it involves finding the shortest path which could be taken by a hypothetical salesman to make a single visit to each location on a map (in a graph).

732 questions
0
votes
1 answer

Looking for Euclidean TSP example with known solution

I'm looking for an instance of Euclidean TSP problem (shortest path among a number of points) on a complete graph with a known perfect solution. Has anybody encountered such examples? Or is there a simple algorithm to generate such instance that…
Maciej Stachowski
  • 1,708
  • 10
  • 19
0
votes
2 answers

Will all TSP algorithms give the same optimum route?

I was just wondering if all algorithms for the TSP will give the same optimum routes? I thought that this would be the case but ive implemented branch and bound and A* and they both give very different results to the same input, I was just wondering…
thrash
  • 187
  • 1
  • 4
  • 18
0
votes
1 answer

A* search Java - TSP

Possible Duplicate: Implementation of A Star (A*) Algorithm in Java For an assignment I have to implement some search algorithms in order to solve the travelling salesman problem, I understand the problem and I understand how the algorithm works,…
thrash
  • 187
  • 1
  • 4
  • 18
0
votes
1 answer

Understanding Travelling Salesman Time Complexity

I have read from multiple sources and from my understanding of the algorithm that it runs in 2^N time. My question is what causes TSP to achieve this run time? I can't seem to find a pseudo-code so i can examine it.
staticFlow
  • 141
  • 1
  • 2
  • 13
0
votes
2 answers

Java TSP Permute Points

Doing a project for school where we implement the Nearest Neighbor heuristic (which I have already done), and the Traveling Salesperson Problem where we do an exhaustive search (we then analyze the algorithms, their time complexity, etc). Our…
lorenzo
  • 494
  • 6
  • 23
0
votes
1 answer

Implement Local Search (2-opt) to solve the TSP in Java

I am trying to implement this but I can't find a good paper or description of how to do it, could you guys point me in the right direction please? I do have an implementation of it in C# but I don't know enough to just convert the code to Java. As…
Tsundoku
  • 9,104
  • 29
  • 93
  • 127
0
votes
0 answers

Finding heuristic and Identifying Traveling Salesman like algorithm (With some changes)

I need a heuristic for the Traveling Salesman Problem with the below changes: • We need to visit only a subset of V (There is given a subset of V that we must visit). V=Cities. • We does not need to end the travel at the start vertex(city). Is…
0
votes
4 answers

find the most shortest and cheapest path around multiple markets

I am working on my Masters project and was hoping you can give me some ideas on how to approach programming the following problem in java: A trader wants to buy a list of items. There are multiple sellers/markets where he can buy the items from.…
Jetnor
  • 521
  • 2
  • 11
  • 26
0
votes
1 answer

Latest AutoRoute and MapPoint have a far slower "optimise stops" tool

I have AutoRoute 11.0, AutoRoute 2010, MapPoint 2010, MapPoint 2011, MapPoint 2013. I noticed that when I optimise stops the first takes a reasonable time, while the other 4 (which are newer...) are far slower. For instance I tried with the same set…
bluish
  • 26,356
  • 27
  • 122
  • 180
0
votes
1 answer

Google waypoints map. No 'A' point

I am building a waypoints Google map. I have the start and end points, which are in the same location. It seems to draw a map with my waypoints, but the start and end locations are not on my map. There is no A point. Someone else must have had to…
Greg
  • 31
  • 7
0
votes
2 answers

Traveling sales man python

I am attempting to create a python script to calculate the shortest trip around a set of colleges. i need to add a starting point, but ive confused myself beyond belief to the point of no return. Can anyone help me figure out where to go from here …
matture
  • 297
  • 5
  • 17
0
votes
1 answer

Delaunay Triangulation Equivalent for Undirected Graph

I'm working on a path planning algorithm that is equivalent to a traveling salesman problem. I don't know how many nodes I might have so I'm willing to sacrifice accuracy for speed. My problem can be modeled as a fully connected graph, with the cost…
Alex Londeree
  • 181
  • 1
  • 6
-1
votes
2 answers

Travelling Salesman : How could one preprocess a graph?

Say we wanna compute the TSP for a given, complete graph G with V vertices and E edges (by complete I mean : every vertex is connected with every other vertex). I'll try to ask the question again. Hopefully I'll get it right this time. My goal is…
Fatso
  • 1,278
  • 16
  • 46
-1
votes
1 answer

How can I visualize an adjecency matrix as a graph in C#?

So, I have a winforms application with travelling salesman problem using Prim's algorithm and I need to convert my adjacency matrix, that is realized as DataGridView, to graph. Is it possible to do this? I tried to make visualization by placing…
neonbones
  • 3
  • 3
-1
votes
1 answer

Find shortest path in graph with a set starting node and that goes through a subset of nodes

Basically my goal is to find the target node to solve the TSP. In order to find this target node I need to know the shortest path between two nodes, specifying only the starting point where: The minimum cost path visits all nodes in subset of…
Joan
  • 1