Jump to content

Talk:Longest path problem: Difference between revisions

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Content deleted Content added
SineBot (talk | contribs)
m Signing comment by 128.30.48.28 - ""
Line 6: Line 6:


Please can someone add some discussion of the node equivalent of this edge path problem, or the highest-weight subpath problem, where one has to find the highest weight subpath (i.e. given node weights, not edge weights) of given length? Obviously if the subpath is a tour then it has fixed constant weight, since all nodes are visited. But if one needs a subpath of maximum weight, do you have to simply do a brute-force search? It seems that dynamic programming can't solve this problem, because optimal subproblems depend upon the path used to get to the subproblem (because nodes can't be traversed twice), so subproblems can't be reused between different paths used to reach the subproblem. <span style="font-size: smaller;" class="autosigned">—Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/128.30.48.28|128.30.48.28]] ([[User talk:128.30.48.28|talk]]) 21:44, 2 November 2010 (UTC)</span><!-- Template:UnsignedIP --> <!--Autosigned by SineBot-->
Please can someone add some discussion of the node equivalent of this edge path problem, or the highest-weight subpath problem, where one has to find the highest weight subpath (i.e. given node weights, not edge weights) of given length? Obviously if the subpath is a tour then it has fixed constant weight, since all nodes are visited. But if one needs a subpath of maximum weight, do you have to simply do a brute-force search? It seems that dynamic programming can't solve this problem, because optimal subproblems depend upon the path used to get to the subproblem (because nodes can't be traversed twice), so subproblems can't be reused between different paths used to reach the subproblem. <span style="font-size: smaller;" class="autosigned">—Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/128.30.48.28|128.30.48.28]] ([[User talk:128.30.48.28|talk]]) 21:44, 2 November 2010 (UTC)</span><!-- Template:UnsignedIP --> <!--Autosigned by SineBot-->

==Does k=|V|?==

The page states "...we use the algorithm for the longest path problem on the same input graph and set k=|V|, the number of vertices in the graph." Yet the definition of Hamiltonian Path states that each vertex is visited once. In a simple example 2 vertices only produce 1 edge. K should equal |V| - 1 unless the original author meant Hamiltonian "Cycle" in which the path returns to the start. But this would contradict the definition of Longest Path I believe.

Revision as of 03:57, 15 December 2010

Please add {{WikiProject banner shell}} to this page and add the quality rating to that template instead of this project banner. See WP:PIQA for details.
WikiProject iconMathematics Start‑class Low‑priority
WikiProject iconThis article is within the scope of WikiProject Mathematics, a collaborative effort to improve the coverage of mathematics on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
StartThis article has been rated as Start-class on Wikipedia's content assessment scale.
LowThis article has been rated as Low-priority on the project's priority scale.
Please add {{WikiProject banner shell}} to this page and add the quality rating to that template instead of this project banner. See WP:PIQA for details.
WikiProject iconComputing Start‑class Low‑importance
WikiProject iconThis article is within the scope of WikiProject Computing, a collaborative effort to improve the coverage of computers, computing, and information technology on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
StartThis article has been rated as Start-class on Wikipedia's content assessment scale.
LowThis article has been rated as Low-importance on the project's importance scale.
Please add {{WikiProject banner shell}} to this page and add the quality rating to that template instead of this project banner. See WP:PIQA for details.
WikiProject iconComputer science Start‑class Low‑importance
WikiProject iconThis article is within the scope of WikiProject Computer science, a collaborative effort to improve the coverage of Computer science related articles on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
StartThis article has been rated as Start-class on Wikipedia's content assessment scale.
LowThis article has been rated as Low-importance on the project's importance scale.
Things you can help WikiProject Computer science with:

Highest-weight tour

Please can someone add some discussion of the node equivalent of this edge path problem, or the highest-weight subpath problem, where one has to find the highest weight subpath (i.e. given node weights, not edge weights) of given length? Obviously if the subpath is a tour then it has fixed constant weight, since all nodes are visited. But if one needs a subpath of maximum weight, do you have to simply do a brute-force search? It seems that dynamic programming can't solve this problem, because optimal subproblems depend upon the path used to get to the subproblem (because nodes can't be traversed twice), so subproblems can't be reused between different paths used to reach the subproblem. —Preceding unsigned comment added by 128.30.48.28 (talk) 21:44, 2 November 2010 (UTC)[reply]

Does k=|V|?

The page states "...we use the algorithm for the longest path problem on the same input graph and set k=|V|, the number of vertices in the graph." Yet the definition of Hamiltonian Path states that each vertex is visited once. In a simple example 2 vertices only produce 1 edge. K should equal |V| - 1 unless the original author meant Hamiltonian "Cycle" in which the path returns to the start. But this would contradict the definition of Longest Path I believe.