Dijkstra Part II + Minimal Spanning Trees

Channel:
Subscribers:
2,640
Published on ● Video Link: https://www.youtube.com/watch?v=ts3W7cQyuqs



Duration: 2:01:06
167 views
2


Dijkstra's computes shortest paths. It does so by constantly moving nodes that are the minimal total distance from the start from the to-processed list to the processed list. In such a way it computes the minimal distance to all vertices in the graph.


Minimal Spanning Tree algorithms are identical to Disjkstra's except instead of trying to figure out the shortest distance between two points, a minimal spanning tree tries to connect all the vertices in a tree with the lowest total edge cost in the tree.


Prim's (which is one line of code different from Dijkstra's) computes the MST by starting at a node and growing a tree by adding nodes that have the smallest edge weight that aren't in the tree already. Kruskal's grows multiple trees by always selecting the smallest edge weight that won't create a cycle.







Tags:
csci 26
minimal spanning tree
dijkstra's