|
-
November 18th, 2006, 04:55 AM
#1
Need an algo to find a path bewtween 2 vertices of a digraph
Hi guys, is there any standard algorithm to find any path bewtween any 2 vertices of a digraph? The graph is represented by ajdacency matrix and I need such an algorithm by which I can get the set of vertices (actrually the path) which are on the way from starting vertex to ending vertex.
I looked for Dijktsra's shortest path but all those version are outputing the min cost of the path, I need a sequence of vertices of the path, in other words there is a path between i-th and j-th vertex, I need this: [i, a1, a2, ..., ai, ..., j]. Also I looked for Depth First Search but this gave just a bool value if such path exiost whenever I need all vertices of the path. Also it is known that there is only 1 path bewtween any 2 vertices.
Waiting for your inputs.
Best Regards, David.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|