00:02
We're asked to use solens algorithm to produce a minimum spanning tree for weighted graphs.
00:09
So in part a, we're given the weighted graph in figure 1 of this section.
00:20
So for the first tip of solon's algorithm, we'll call it we need to order all the vertices.
00:28
So on the one hand, we have the rank that we're going to give the vertices.
00:35
On the other hand, we have the descriptions of the vertices.
00:40
We have ranks 1, 2, 3, 4, and 5 for the 5 different cities in figure 1.
00:47
And we'll assign to rank 1, the vertex san francisco, to vertex 2, to rank 2 the vertex chicago, to rank 3 the vertex new york, to rank 4, the vertex denver, and to rank 5 the vertex atlanta.
01:21
And notice that there's really nothing special about this ranking.
01:24
You could really rank these cities however you wanted as long.
01:28
As you only use each one exactly once.
01:34
Now for the next step in the algorithm, you want to choose the edge incident to each vertex with the smallest weight, or in the case of a tie, the edge that's first in the lexicographic order.
01:48
So consider our vertices again.
01:56
So i'll write these in the same order as before.
01:58
We have san francisco, chicago, new york, denver, and atlanta.
02:37
And we have that for san francisco, the edge incident to san francisco with the smallest weight is the edge san francisco, denver.
03:09
And then for chicago, we have the edge incident to chicago with the smallest weight is chicago atlanta with the weight of 700.
03:26
For new york, we have the edge incident to new york with the smallest weight is new york atlanta, with a weight of 800.
03:35
We have at the edge incident to denver with the smallest weight is san francisco denver again with a weight of 900.
04:09
And finally, we have the edge incident to atlanta with the smallest weight is chicago atlanta again, which has a weight of 700.
04:24
So we see that we only really are going to be adding three edges in this step.
04:29
So first, i'll draw the vertices for this graph.
04:36
So we have san francisco, denver, chicago, atlanta, and new york.
04:57
And we want to add the edges, san francisco to denver.
05:04
This is a weight of 900.
05:10
The edge chicago to atlanta, which is a weight of 700.
05:16
And atlanta to new york, which is a weight of 800.
05:28
In the next step, we want to determine the edge connecting san francisco, or denver, so one of these trees, to one of the other three cities with the smallest weight, so to the other tree.
05:45
So we find that the cheapest connection from san francisco or denver to one of the other three cities, chicago, atlanta, or new york, is from san francisco to chicago with a weight of 1 ,200.
06:01
So we'll add that edge to the graph.
06:12
And now, since the graph is in connected graph now, the algorithm terminates and it follows that by solon's algorithm, the resulting graph is a minimum spanning tree.
07:04
In part b, we are given the graph in figure 3 of this section, and again we're asked to apply solon's algorithm, so we'll want to use an ordering for the vertices to make things simple.
07:26
Let's just choose an alphabetical ordering...