3+-+Algorithms+on+Networks

=Algorithms on Networks=

flat

You will notes and examples relating to all the algorithhms relating to graphs. You must know these algorithms off-by-heart as they are not provided in the exam.

The different algorithms are designed to do different things:
 * Kruskal's algorithm is used to find a Minimum Spanning Tree;
 * Prim's algorithm is also used to find a Minimum Spanning Tree;
 * A Minimum Spanning Tree can also be found by using Prim's algorithm on a distance matrix;
 * Dijkstra's algorithm is used to find the shorest path betweenn two vertices or nodes in a graph.

//Note - sometimes the embedded presentations do not open on this page leaving a blank gap. Hit F5 to refresh and they should appear eventually!//

=Kruskal's Algorithm= Kruskal's algorithm is:

Here is a step by step solution of a problem: media type="custom" key="14169286" Try this interactive deomstration to check you understand: media type="file" key="d12kruskal.swf" width="634" height="634" media type="youtube" key="XbhDNeBG6Jc" height="450" width="600"

flat

=Prim's Algorithm= Here is a step by step solution to a problem: media type="custom" key="14169302" Here is another: media type="file" key="d12minconn.swf" width="651" height="651" media type="youtube" key="0E1Oj5sMD6g" height="450" width="600"

flat

=Prim's Algorithm from a Matrix= Here is an explanation of how to use Prim's algorithm when given a distance matrix: media type="custom" key="14169318"

flat

=Dijkstra's Algorithm= Dijkstra's algorithm sounds quite complicated when you see it written, but is reasonably straight forward when you do it. Try some questions from the textbook and look at the explanation below. The algorithm goes like:

Try this presentation to see a step by step problem: media type="custom" key="14169328" media type="file" key="d12dijkstra.swf" width="654" height="654"

flat