Re: Finding longest path between two vertices
- From: Robby Goetschalckx <robby@xxxxxxxxxxxxxxxxx>
- Date: Fri, 15 Jun 2007 10:29:13 +0200
Tobias Columbus wrote:
Hallo
Instead of negating the weights w you may try 1/w (all weights are
positive you said) and then you can run Dijkstras algorithm finding the
shortest path which should be longest path with weights w
Hope this helps you
Tobias
This is not correct. Consider a simple graph with two possible paths of the start-node to the goal-node:
* one consisting of a single edge with weight 2
* one consisting of two edges, both with weight 2
After transforming to 1/w, the first path has a new weight of 0.5, and the second a weight of 0.5 + 0.5, so according to your assumption the first path in the original graph should be longer ...
robby
.
- Follow-Ups:
- Re: Finding longest path between two vertices
- From: Tim Frink
- Re: Finding longest path between two vertices
- From: Tobias Columbus
- Re: Finding longest path between two vertices
- References:
- Finding longest path between two vertices
- From: Tim Frink
- Re: Finding longest path between two vertices
- From: estrabd
- Re: Finding longest path between two vertices
- From: Tobias Columbus
- Finding longest path between two vertices
- Prev by Date: Re: Finding longest path between two vertices
- Next by Date: Re: Finding longest path between two vertices
- Previous by thread: Re: Finding longest path between two vertices
- Next by thread: Re: Finding longest path between two vertices
- Index(es):
Relevant Pages
|