 In this video, we provide the solution to question number 12 for practice exam number one for Math 1030. In which case we have to build a minimal spanning tree for the network illustrated below using Kruskal's algorithm, which is basically just like the cheapest link algorithm. We just pick the cheapest link and avoid any cycles whatsoever. We do need to also describe what is the cost of this minimal spanning tree when we're done. Now, when I look at the network and look at the weights on the edges, the cheapest edges I see are worth 10. So I'm gonna start grabbing those. So you have like PM, which is worth 10. You have OIN, which is worth 10. You have MN, which is worth 10. Notice that I cannot use PO because that would create a cycle. Even if 20 becomes tempting later on, I can't use it. I'm gonna use MB, that's worth 10. And I'm gonna use NC, which is worth 10. A quick examination of the graph sees, I see no other vertices that are worth 10. So I think we're done there. I'm also gonna scratch out BC because that would form a premature, well, not premature. I mean, you just can't have a cycle on a tree whatsoever. We're looking for a spanning tree here. So I'm not gonna use BC either. So I notice I have one, two, three, four, five. Five edges that are worth 10, that gives me 50. We'll add that up, of course, later on, 50 plus. So next, let's look at some that are worth 15. That seems to be the next increment there. You have L to K, that's worth 15. You have E to F, that's worth 15. And you have I to H, which is worth 15. I'm not seeing any other 15s on the board that are acceptable. So we're gonna grab those three. So we get three times 15, that's worth 45. So next, let's look for some edges that are worth 20. All right, you have one at LM, that's worth 20. You have one at NE, that's worth 20. Now be aware, I can't use KP anymore because that would form a cycle. Can't use OF anymore because that would form a cycle, which again, those are 35, I don't really wanna use those. Those are like the most expensive ones, but nonetheless, I can't. Let's see, we did 20 and 20. Are there any other 20s on the board? I don't see any, so we're gonna add 220s onto that. That's gonna give us 40, like so. So now let's look at the board for 25. We got a 25 right here and here. I don't see any other ones. Now be aware that as we grab these, I could take one of these. Like I could take IP, but you can't take both of them because that would actually form a cycle. So I actually can only take one of them. Which one do I do? Well, Kruskal's algorithm says you're gonna choose whichever one you want. In the end, it really doesn't matter. So I'm just gonna grab PI just for the sake of example. So we're gonna get 25 in there, just 125. And so then there's a 25 right there. The next, I'm looking for some that are worth 30. Like notice vertex A right here. There's two edges that connect to it that are worth 30. I can't grab both of them because that would form a cycle. I just have to grab one of them. And it doesn't really matter which one you do. You either connect it to B or to L. I'll just go with L right there. Same thing's happening here over at D. There's two edges that are worth 30. I can't grab both of them that forms a cycle. So just choose one of them because they're just the same here. I'm gonna do DE in that situation. A similar thing is happening over here that while you are missing some edges here, like I gotta connect G to the network. I can either do it by F or H can't do both. So just for the sake of it, I'm just gonna pick F. So that's worth 30. And then likewise to connect J to the network, either go through I or K, they're both worth 30. So I'm just always picking the vertical one in this fashion right here. And so that now connects every vertex to the network. We added in four vertices, four edges, excuse me, that costs 30. That's gonna be 120 just themselves. That was the most expensive part. But anyways, when you add all these numbers together, 50 plus 45 plus 40 plus 25 plus 120, that adds up to 280. And that's the cost of this minimal spanning tree.