Showclassmst
Showclassmst
Showclassmst
CptS 223 Advanced Data Structures Larry Holder School of Electrical Engineering and Computer Science Washington State University
Approximating graphs
Most graph algorithms are faster on trees
2
MST:
Prims Algorithm
Similar to Dijkstras shortestpath algorithm Except
v.known = v in T v.dist = weight of lowest-weight edge connecting v to a known vertex in T v.path = last neighboring vertex changing (lowering) vs dist value (same as before)
8
Prims Algorithm
Running time same as Dijkstra: O(|E| log |V|) using binary heaps.
10
11
13
Kruskals Algorithm
Uses Disjoint Set and Priority Queue data structures.
14
Approximate solution to traveling salesman problem Most of above use Euclidian MST I.e., weights are Euclidean distances between vertices
16
17