Re: Finding longest path between two vertices
- From: estrabd <estrabd@xxxxxxxxx>
- Date: Thu, 14 Jun 2007 17:11:24 -0000
On Jun 13, 9:51 pm, Tim Frink <plfr...@xxxxxxxx> wrote:
Hi,
I have a directed graph with weighted edges (weights are all positive).
Now, I'm looking for an efficient algorithm to find the longest path
between two given vertices.
My idea was to negate all edge weights and than to run
a) a topological sort and than a relaxation to find the critical path
or
b) Bellman-Ford's Algorithm (due to the weight negation it should find not
the shortest but longest path).
Are these algorithms suited for the longest-path problem? And if so,
which one is more efficient?
Or do you know any faster approach?
There is an efficient approach for finding the longest paths for
acyclic digraphs. If you allow cycles, the longest path as you have
defined it (or not defined it) is infinite.
Brett
Thank you.
Tim
.
- Follow-Ups:
- 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
- Finding longest path between two vertices
- Prev by Date: Re: Finding longest path between two vertices
- Next by Date: Does anyone have a copy of this paper? Knuth's Fast pattern matching in strings
- Previous by thread: Re: Finding longest path between two vertices
- Next by thread: Re: Finding longest path between two vertices
- Index(es):
Relevant Pages
|