Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Graphs: Shortest Path Probs

Status
Not open for further replies.

Nuge

Programmer
Apr 5, 2002
1
GB
Hi all,

I have a little task to complete. I have created my adjacency matrix (with weights) and am looking for some example shortest path algorithms and if possible minimum spanning tree algos to look at.

Any help will be wonderful.

Thanks.
 
For shortest path you can use either a modified Roy-Floyd algorithm (pretty elaborate solution) either the classical backtracking approach; with good stopping conditions you may get an answer in reasonable time.

For minimum spanning tree you can try using Kruskal algorithm.

Make a Google search for the names, it might help if you want all kinds of details. It's been a while since I last used Kruskal, but it is a good and fast enough algorithm, especially if you have already the Adj. Mat. [red]Nosferatu[/red]
We are what we eat...
There's no such thing as free meal...
once stated: methane@personal.ro
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Sponsor

Back
Top