00:01
So in this case we want to use prims algorithm to find the minimal spanning tree for this situation here.
00:07
So in prims algorithm you can start at any vertex that you like.
00:11
So let's start here in b for example so here we can connect the the smallest one is this one over here so with that we connect f now we have to connect the h so we're gonna connect it with this one here then we can have to connect g we're gonna connect with the least you're looking at for always the smallest tree to connect the next one.
00:37
So for example, this one, we can connect here to k with this 3 one.
00:43
And we connect j with this 2 one here, which is the smallest of all the possibilities.
00:49
And now these we have to connect this way.
00:52
There's no other way to connect them.
00:54
Well, actually there is.
00:56
Well, let's leave that for a minute like that.
01:00
Because maybe you can connect p through this to one afterwards so as we are building this let's go back a little bit so we were here and we want to always use the the tree with the so let's go back here so you want to use to connect this tree that we already have the one the only connection the one with the least weight is this one right here now the one with the least weight that connects to this tree existing tree is this one right here and the one with least weight to connect to this is this now we go in the one with the least weight which is this phi one here so we have that vertex taken care of w then the next one with the least weights is either of these two threes so let's go with the bottom one just for no specific reason at all but if we go with this bottom one we're going to connect p with this one which is the smallest one to there...