So now that you know what a spanning tree is, I would like to introduce to you
the concept of a minimum spanning tree.
So a minimum spanning tree is still a spanning tree on a graph,
and in order to find a minimum spanning tree,
you actually need to have a special kind of graph,
and that is one that looks just like the input for shortest tour.
And what I mean by that is that all of the edges
have a certain number assigned to them.
So in the case of shortest tour, those were distances,
but it can be other values as well; that doesn't really matter.
The important thing is that each edge must have a certain value attached to it
such as in this one here.
Now what is a minimum spanning tree?
Now, first of all, let's take any spanning tree for this graph here.
So let's say we take this spanning tree.
And what you can do if you have a graph like this where you have numbers
attached to the edges is, for each spanning tree, you can sum up those numbers.
So here we have 2+4+3+2+3+6, and the sum of that is 20.
And so what you say is that this spanning tree here has a weight of 20.
Now if you choose another spanning tree--for example, this one here--
that spanning tree will have a weight of 3+4+3+2+3+6, which is a total weight of 21.
And now you can almost guess what a minimum spanning tree will be.
A minimum spanning tree is the spanning tree for the graph
for which this total weight--the sum of all of the edge numbers--
is the smallest possible one.
A graph can have more than one minimum spanning tree,
but every minimum spanning tree has to have the property that
the sum of the edges is as low as possible.
