00:01
Hello students, here is our question.
00:03
Our a part is that use prims algorithm to compute the minimum spanning tree for the following weighted graph and we have we also have to use cross -co algorithm to compute.
00:18
Okay, so this is our graph.
00:20
We know that in primm's algorithm, our graph is when we draw our graph tree, it's connected.
00:29
It so we can start it from anywhere or from any point so let's say we start from point a it's our a from a we can either go to b you can go to b or we can go to do we have to take the minimum distance so it's here we have two is minimum so we will first go to okay then from b we can either go to c or or we can go to e we have to choose the minimum one and here we have two here we have five and we have to keep in mind that what was the previous one it's seven seven is greater five is greater so we have to take this minimum distance it's and here we have e okay then from e either we can go to f or we can go to d or we can go to h.
01:46
So here the distance is 3.
01:50
Here it's 1.
01:52
Here it's 3.
01:54
So the minimum, we have to see the previous month here we have 5 and here we have 7.
01:59
So 1 is the minimum distance.
02:02
So we can go from e2, f because it's a minimum distance.
02:10
And it's one here we have two okay we done with here we've done here and we done here now from now we have here we have option we can go from either we go from a to d or from b to c or from f to i or f to c okay so let's see from f to i it's seven from f to c is six but if we can go from b to c because it's the minimum distance okay we can go from b to c it's five okay now here we can clearly see that we cannot go from c to f because if we come from c to f here a loop will be created and in a tree we cannot create a loop so that's why we cannot take this one this value so now from we have options either we can go from f to i or from e to h or from e to d or from a to d okay so the minimum is distance is from e to d and e to h.
03:46
Okay, we have to choose one.
03:48
So let's say we go from e to d and here it is three...