Re: Finding longest path between two vertices
- From: Tobias Columbus <t.columbus@xxxxxx>
- Date: Fri, 15 Jun 2007 13:08:27 +0200
Thanks for the correction and sorry for posting wrong information.
I did not think enough about my solution (it just seemed so (too?)
easy), because I was short in time.
Tobias
On Fri, 15 Jun 2007 10:29:13 +0200
Robby Goetschalckx <robby@xxxxxxxxxxxxxxxxx> wrote:
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
- 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
- Re: Finding longest path between two vertices
- From: Robby Goetschalckx
- 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
|
Loading