00:01
We are given weighted graph and we are asked to use prims algorithm to find a minimum spanning tree for this graph.
00:16
So in order to execute prims algorithm, first let t be the graph with the vertices of the given graph and with no edges between the vertices.
00:41
So t is just going to be the graph with vertices a, b, c, d, and e.
00:56
Now, let's select a as the root.
01:02
So this is our root.
01:08
Now there are three edges incident to a in the weighted graph.
01:12
And we have that ab is the edge that has the smallest weight between these two edges.
01:19
So we'll add the edge ab.
01:27
I'll draw these edges in green, which has a weight, recall, of one.
01:42
There are two edges incident to a remaining in the graph, and two edges incident to.
01:49
B.
01:51
Now the smallest weight of these four edges is going to be two, which belongs to the edge a .e.
02:01
And this edge doesn't cause a circuit so we can add it to the graph.
02:04
So now we'll add a .e to the graph which has a length of two...