Finding longest path in graph between two vertices
- From: Tim Frink <plfriko@xxxxxxxx>
- Date: 13 Jun 2007 21:52:06 GMT
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 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?
Thank you.
Tim
.
- Follow-Ups:
- Re: Finding longest path in graph between two vertices
- From: galathaea
- Re: Finding longest path in graph between two vertices
- From: gowan4@xxxxxxxxxxx
- Re: Finding longest path in graph between two vertices
- From: Randy Poe
- Re: Finding longest path in graph between two vertices
- Prev by Date: Integer Polynomials and Perfect Squares
- Next by Date: Re: JSH: Ok, what DOES amuse me
- Previous by thread: Integer Polynomials and Perfect Squares
- Next by thread: Re: Finding longest path in graph between two vertices
- Index(es):
Relevant Pages
|