[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Query: Will the shortest path using the travelling salesman
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /sci/ - Science & Math

Thread replies: 25
Thread images: 2
Query:

Will the shortest path using the travelling salesman rules ever cross itself?

Because before reading any papers, my intuition says "no" since if the path crosses that means you backtracked at some point, which means it cant be the shortest possible path....
>>
>>8141382
It can cross. If a node is hanging you have to go back to his previous node
>>
>>8141390
Sorry I should be a bit more specific:

With a given matrix of dots that you can travel from one to ANY other dot (no limited movement)

And you need to traverse it with salesman rules (visit every dot once and get back to start)

Will your shortest path ever cross itself?
>>
>>8141398
No.
https://en.wikipedia.org/wiki/2-opt
>>
>>8141398
I imagine that each dot has a weight of some kind.

If there are negative weights one could decide to go back to a previous visited dot
>>
>>8141398
>Will your shortest path ever cross itself?
Aren't those two independent conditions? While it's possible the shortest may never cross itself, I think it's more likely that it will, since "not crossing itself" is just an uneccesary constraint.
In fact, like >>8141390 said, if you have hanging nodes you definitely will have to cross them again
>>
>>8141406
>if you have hanging nodes
its like you have zero reading comprehension, OP clearly stated that all nodes are perfectly interconnected to all other nodes.
>>
>>8141412
Yes but I star graph is a interconnected graph where all weights but those towards a node have a infine value
>>
>>8141416
*a star graph not I
>>
>>8141416
All points are just coordinates, so you can freely travel anywhere on the map.

Basically, find the shortest path to visit every coordinate from a set, everything 100% interconnected.
>>
>>8141424
In this case yes, there is no reason. But this is not the full salesman problem either, I'm not sure but I suppose it can be solved in polynomial time as well
>>
>>8141430
What part of this is not in the "full" salesman problem?
>>
>>8141441
Your version imposes geometric relationship between weights of paths between dots.

3 points describe a triangle so one side depends on the others. This adds a huge quantity of informations that is not present in the normal version where each edge can have any weight
>>
>>8141447
The 'weight' is the distance between the dots -.-;

Dont overcomplicate it.

Shortest path between a set of dots, no weighting, just actual shortest path algorithm.

Will the shortest path ever cross itself?

I feel like the shortest path visiting each point once will ALWAYS form an n sided polygon with no crossing points, drawing a perimeter....
>>
>>8141453
I found an exception, if the dots position collapses to a line, then you have to go back to previous locations. Not sure that counts tho
>>
>>8141382
Reading the thread you're talking about the Euclidean variant of TSP. No, in Euclidean TSP the shortest path will never cross over itself. Many solvers use this as a way to quickly test if a path can be shorter. If two line segments cross, connections are swapped between points to avoid the cross, leaving the path still fully connected but shorter. Additional methods are used to shorten the path further.

In non-Euclidean TSP, they can cross in that a node is visited multiple times. As above, a cross results in a longer path and nodes can be swapped to get a shorter path. TSP does not bound you on multiple node visitations, however usually multiple visits result in a longer path.
>>
>>8141453
The proof is: let be the list L the list node visited that solves the problem. If the node n appears in the list twice, with the indices i and o, then one of the 2 can be removed because dis(L[o-1], L[o+1] ) < dis(L[o-1], L[o] ) + dis(L[o], L[o+1] ). (same thing for i). The one that has to be removed is the one that improves the solution the most
>>
>>8141459
Good point actually
>>
>>8141430
>I'm not sure but I suppose it can be solved in polynomial time as well
He's not sure but he supposes that P = NP, guys... STOP THE FUCKING PRESSES.

Anon, at this point you should probably just stop posting and read a few wiki articles at the very least...
>>
>>8141453
>>8141459
>>8141462
It feels like for a figure-eight geographic distribution of customers, a figure-eight path would also be the shortest solution.
>>
File: 5rJcihH[1].png (12 KB, 647x457) Image search: [Google]
5rJcihH[1].png
12 KB, 647x457
>>8141571
That has a cross in it though and the shorter path would simply connect points without the cross in it. The shortest path is essentially a circle.
>>
>>8141453

you can have traveling salesman with weigths that does not have any topological constraints like you are imposing. this is why people get confused
>>
Yes, it very obviously can in certain graphs. What sort of retarded question is this?
>>
>>8141459
For a straight line set of points, if we're dealing with Euclidean TSP, you don't actually go through any city twice, even though it looks like it. You go through each city once in a linear fashion and then the first and last are connected. Even though that line goes through all the cities on the way back, you never stop at those cities. In non-Euclidean TSP though you'd be right.
>>
>>8141382
Imagine a node that can reach any other node in distance 1. Every other node can reach every other node in 3. Then the fastest way to get from one node to another is to go to the node that can reach others in 1.
Thread replies: 25
Thread images: 2

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.