1
$\begingroup$

According to wikipedia, and many other sources I have read through, the Held-Karp algorithm is based on the idea that "every subpath of a path of minimum distance is itself a minimum distance."

I was hoping someone could explain this concept to me, because that claim doesn't seem true to me at all. If every subpath was a minimum distance, then that would mean that every pair of edges (3 connected cities) would itself be a minimum distance, which would mean that those are simply the two best edges connected to each other, which would also mean that a basic greedy algorithm would output an optimal TSP circuit every time.

So, clearly I am missing something conceptually. Help!

$\endgroup$

1 Answer 1

3
$\begingroup$

Every subpath in a path of minimum distance is a path of minimum distance between the endpoints of the subpath. For example if $a \to b \to c \to d \to e$ is a path of minimum distance from $a$ to $e$, then $b \to c \to d$ must be a path of minimum distance from $b$ to $d$. This is because if, say, $b \to c' \to d$ was a shorter path from $b$ to $d$, you could substitute this for $b \to c \to d$ in your original path, giving you $a \to b \to c' \to d \to e$ which is shorter than $a \to b \to c \to d \to e$.

This doesn't mean that a greedy algorithm works. In a greedy approach, starting from $a$, you might start with an edge of shortest distance $a \to z$. But maybe $z$ is farther from your goal than some of the other possible alternatives for the first step.

$\endgroup$
3
  • $\begingroup$ Ah ok, so that's what it is talking about. I feel that is a little misleading, because what it should say is every subpath of a path of minimum distance is itself a minimum distance - when constrained to only using the nodes within that subpath, not within the span of our entire graph. $\endgroup$ Commented Feb 15, 2018 at 3:32
  • $\begingroup$ This is within the span of the entire graph - for instance $c'$ was not in the path, and was instead in the rest of the graph. $\endgroup$
    – B. Mehta
    Commented Feb 15, 2018 at 4:10
  • $\begingroup$ The principle is true for shortest paths in general. In the context of TSP, you apply it to subpaths from $a$ to $b$ involving a given set of vertices. $\endgroup$ Commented Feb 15, 2018 at 4:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .