News for hackers. Stuff that matters.
Re:Traveling Salesman: the most misunderstood problem by chmike on Saturday November 10, 2012 @07:56AM (#4766562)
A priori it would be a computer science revolution if this would have been missed by everyone until now. So forgive me to be particularly cautious with your proposal. What I think is missing in your analysis is that we are lacking a polynomial method to build an hamiltonian path with cost <= C. If we had, then we would apply your algoritm to optimize in polynomial time.
Re:Traveling Salesman: the most misunderstood problem by alextp on Saturday November 10, 2012 @08:03AM (#4766568)
The above construction is a not a breakthrough and it is how I was taught in my approximate algorithms class. Also the way the optimization problem is usually defined is not as "give a circuit with minimal cost" but "what is the cost of the minimal-cost circuit?", which is easier to reason about in an approximate way.
Re:Traveling Salesman: the most misunderstood problem by mikeash on Saturday November 10, 2012 @09:04AM (#4766657)
Same here. Intuitively, a decider that can answer "Is there an answer less than X?" will give you one bit of the lowest cost each time you query it. Do it repeatedly until you have all of the bits, and you're done.
Re:Traveling Salesman: the most misunderstood problem by Someone on Saturday November 10, 2012 @07:49PM (#4768320)
There is no guarantee that the number of bits in 'all the bits' is finite. Because of that, there is no guarantee that such an algorithm finishes. The simplest counterexample is N=2, with a distance of 1/3 between the nodes, and shortest (and only) tour with length 2/3.
Re:Traveling Salesman: the most misunderstood problem by mikeash on Sunday November 11, 2012 @06:29PM (#4770971)
You don't need to represent the actual length of the solution in a finite number of bits, you just need to represent the solution itself. The solution can be represented as the set of edges contained within it. Each edge is either present or not, so a solution can be represented as a bit set the size of the number of edges in the graph, or at most n^2 bits where n is the number of vertices.

For a practical idea of how you'd do this, I think you'd just modify your binary search based on the possible circuit values. Basically, figure out what number excludes half of the remaining solutions, rather than just half of the range, and use that in your binary search.

Re:Traveling Salesman: the most misunderstood problem by Someone on Monday November 12, 2012 @08:24PM (#4775763)
Yes, any algorithm that halves the set of potential solutions in each iteration will work, but I do not see how one can get such an iteration step from "a decider that can answer "is there an answer less than X?". If suspect (but cannot prove or even have reasonably solid arguments) that the "figure out what number excludes half of the remaining solutions" step will be at least as hard as the problem itself.

Now, if I had such an oracle, I would let it loose on all graphs equal to the target graph with one edge removed. I think (but cannot prove (yet?)) that that is a way to prove, for each edge, whether it is by necessity part of the shortest tour. I also supect that, for most graphs, the set of remaining "might be in the shortest tour" will be so small that an exhaustive search will be easy.

Re:Traveling Salesman: the most misunderstood problem by konstruktor on Saturday November 10, 2012 @01:00PM (#4767207)
No nonempty interval of real numbers can be represented in a finite number of bits.
Re:Traveling Salesman: the most misunderstood problem by tgflynn on Saturday November 10, 2012 @01:23PM (#4767278)
That's exactly what floating point numbers are: representations of real number intervals as finite length bit strings. The number of bits simply determines the granularity of the representation (ie. the width of the intervals).
Re:Traveling Salesman: the most misunderstood problem by konstruktor on Saturday November 10, 2012 @05:38PM (#4767989)
Floating point numbers are approximations of real numbers, which isn't sufficient in this context. Solving a lossy representation of the problem isn't a reduction in the complexity theoretic sense.
Re:Traveling Salesman: the most misunderstood problem by tgflynn on Saturday November 10, 2012 @06:31PM (#4768138)
In the case of this problem the set of possible paths is finite so it can, in principle, be sorted in order of increasing cost. The smallest cost delta between any 2 paths in the sorted list is the lowest cost edge in the graph (this probably assumes that all edge costs are positive) so you only need to continue the binary search until intervals of this size are reached. At that point the exact solution has been found.

EDIT: There might be multiple paths with the same minimal cost but binary search will still find this value.

Re:Traveling Salesman: the most misunderstood problem by Fargren on Saturday November 10, 2012 @01:28PM (#4767294)
That depends on how you define your representation. It is useful for some problems to represent an interval with it's first bits, e.g. to take 0.101 as representing all numbers in the [0.101, 0.110) interval.
Re:Traveling Salesman: the most misunderstood problem by konstruktor on Saturday November 10, 2012 @04:52PM (#4767842)
You are correct. What I meant to say was: You cannot represent all the distinct real numbers in a nonempty interval using a finite number of bits.
Re:Traveling Salesman: the most misunderstood problem by mikeash on Saturday November 10, 2012 @05:42PM (#4768003)
Why is that relevant?
Re:Traveling Salesman: the most misunderstood problem by anothermachine on Saturday November 10, 2012 @02:19PM (#4767449)
Fortunately, non-empty intervals of real numbers do not exist in computer science.
Re:Traveling Salesman: the most misunderstood problem by konstruktor on Saturday November 10, 2012 @04:57PM (#4767858)
Did I get my mathematical terms wrong or are you confusing number representations on computers with computer science?
Re:Traveling Salesman: the most misunderstood problem by mikeash on Saturday November 10, 2012 @01:34PM (#4767314)
I choose the nonempty interval [0, 1]. I have just represented it here in 48 bits (many of which are unnecessary, but bits are cheap). I don't think your statement is correct.
Re:Traveling Salesman: the most misunderstood problem by tgflynn on Saturday November 10, 2012 @08:05AM (#4766571)
No revolution intended. This is well known. The revolution would be finding a polynomial time D.