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
1
vote
0 answers

Defining a population size based on a scale

Basically I'm trying to solve a travelling salesman problem using clustering. Each cluster has a population of individuals that are used to form a subpath, these subpaths are then connected to form a solution for the travelling salesman problem. I…
MTA
  • 739
  • 2
  • 9
  • 29
1
vote
2 answers

Metric travelling salesman, force an edge into solution

Normally the TSP solution is the one so that the total cost on edges is minimal. However in my case I need a specific edge on the solution, it does not matter if it the solution is not optimal anymore. It does matter, however, that of all…
Paolo.Bolzoni
  • 2,416
  • 1
  • 18
  • 29
1
vote
1 answer

How does a 2.5-opt linear search work for the TSP?

I understand the logic behind performing a 2-opt, pairwise exchange to get two edges to uncross: Simply take two edges out and replace them with two other ones. If you have a list of cities: A, B, C, D, E, A, and AB and DE are chosen... then just…
u3l
  • 3,342
  • 4
  • 34
  • 51
1
vote
1 answer

How to distribute points across the panel based on distance data?

So, I'm not sure how to properly explain this one, so if something is unclear ask in the comments, I'll try to use the exam question layout so you can easily spot restrictions. Problem: You're given an input of Panel (with fixed size), an array of…
nstosic
  • 2,584
  • 1
  • 17
  • 21
1
vote
2 answers

Looking for an algorithm to find the shortest path

Basically I have a graph with 12 nodes (representing cities) and 13 edges (representing routes). Now let's say that (randomly) I have a plan for visiting n nodes, departing from a specific one (A). So (having N <= (12-1)) and then come to the…
eduardev
  • 473
  • 8
  • 26
1
vote
1 answer

NP problems can be solved in deterministically EXPONENTIAL time?

any problem in NP can be solved in deterministically exponential time, or we can say that any language in NP can be decided by an algorithm running in time 2^O(n^k) i.e., NP ⊆ EXP informally speaking, we just try each one of the possible solutions…
1
vote
2 answers

ColorMap in boost::graph implicit graph for metric_tsp_approx

I'm trying to accomplish the following: Have a function computeTspTour(size, start, distance) that gives me an approximation to the shortest tour through size many vertices, starting at start. Here, distance is a function object that takes two…
Xoph
  • 459
  • 2
  • 10
1
vote
4 answers

Connecting a Set of Vertices into an optimally weighted graph

This is essentially the problem of connecting n destinations with the minimal amount of road possible. The input is a set of vertices (a,b, ... , n) The weight of an edge between two vertices is easily calculated (example the cartesian distance…
1
vote
1 answer

Route between A and B with stations between

i´m obviously missing the forest through the trees ... i know about the traveling salesman problem, but is there any other algorithm/problem which better fits my needs/description? I need to describe my problem with the help of such a mathematical…
1
vote
1 answer

Traveling Salesman - 2-Opt improvement

So I've been looking for an explanation of a 2-opt improvement for the traveling salesman problem, and I get the jist of it, but I don't understand one thing. I understand that IF two edges of a generated path cross each other, I can just switch two…
u3l
  • 3,342
  • 4
  • 34
  • 51
1
vote
2 answers

Is this MSP an instance of the TSP?

In his book, The Algorithm Design Manual, Steven S. Skiena poses the following problem:              Now consider the following scheduling problem. Imagine you are a highly-indemand actor, who has been presented with offers to star in n different…
wjmolina
  • 2,625
  • 2
  • 26
  • 35
1
vote
1 answer

Kernighan-Lin Algorithm

Does anybody know this algorithm a little bit, because I'm considering using it, but I'm not sure whether it really meets all my requirements. So bascially, what I want to do is splitting up a graph in several subgraphs. However the nodes of each…
user2560216
  • 63
  • 1
  • 5
1
vote
1 answer

Algorithm to use for reaching points from landing pod

I have a quadcopter with some sensors and I want to measure values in set of points on the map (2d problem). Every measurement takes 30 seconds and I assume copter has constant speed of 60km/h. It can fly constantly 20 minutes and then it needs to…
tkowal
  • 9,129
  • 1
  • 27
  • 51
1
vote
1 answer

Retrieving vertex path from linear-programming solution

I have been trying to solve a routing problem, like the TSP (traveling salesman problem) but with some twists. I have modeled the problem using linear-programming (CPlex library) and a directed graph (with an Origin vertex) (Coin-Or::Lemon…
luksfarris
  • 1,313
  • 19
  • 38
1
vote
2 answers

Evolutionary algorithm - Traveling Salesman

I try to solve this problem using genetic algorithm and get difficult to choose the fitness function. My problem is a little differnt than the original Traveling Salesman Problem ,since the population and maybe also the win unit not neccesrly…
user2459338
  • 21
  • 1
  • 3