00:01
Okay, here i want to use kruskal's algorithm to work out the value of the minimum spanning tree.
00:09
And to do that, what we do first of all is count up the vertices.
00:15
Well, there are eight, it's pretty obvious, one through eight, which means i want to find seven edges.
00:21
So for kruskal, then, eight vertices implies we need seven edges.
00:33
And the rule is start with the one least weight.
00:35
So you have a choice here.
00:39
There are three of them where we have weight one here, here, and here.
00:43
Let's pick one at random.
00:46
I'll pick, for example, two to six.
00:49
So there is my first choice.
00:53
So two to six, and that has weight of one.
01:04
Now the next one, again, we have two ones.
01:09
So the key thing is don't complete a circle here, a circuit.
01:13
So two to three, perfectly okay, weight of one.
01:21
And then seven to six here also with weight of one.
01:28
The first three then are those shown here in red, and nowhere here do we complete a cycle.
01:36
Now i can't go down here because if i do that, two, three, six form a cycle.
01:42
So next then for two, i'm going to choose this one here, six to five.
01:50
Can't choose six, three, must be six, five, or in fact two, one over here.
01:57
But right now i'll choose six, five.
02:01
So six, five will be two.
02:05
Any more twos? well, that comes out, we know.
02:08
So this one over here is next.
02:11
Again, no cycle formed here.
02:14
So two, one is my next one, also length two.
02:21
So we have so far then five, i need two more.
02:26
So onto the threes, and again i can pick, let's do one to eight, i'll be fine.
02:36
So one to eight is three, and then i need one more.
02:44
So now i can't pick eight to seven because that will form a cycle round here.
02:51
That's no good.
02:53
That one's out.
02:55
So i have to pick then one up here, three to four.
03:02
So the last one is three to four, three.
03:07
Add those up and we get the answer we need.
03:09
Three, six, eight, ten, thirteen is the minimum spanning weight or mst, or tree in this case.
03:24
That's the first one done...