Talk:Longest path problem: Difference between revisions
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
{{WikiProject banner shell}}
to this page and add the quality rating to that template instead of this project banner. See WP:PIQA for details.![]() | Mathematics Start‑class Low‑priority | |||||||||
|
{{WikiProject banner shell}}
to this page and add the quality rating to that template instead of this project banner. See WP:PIQA for details.![]() | Computing Start‑class Low‑importance | |||||||||
|
{{WikiProject banner shell}}
to this page and add the quality rating to that template instead of this project banner. See WP:PIQA for details.![]() | Computer science Start‑class Low‑importance | ||||||||||||||||
|
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)
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.