The number added to each edge is called a weight. Often it represent time or distance, here are a few examples.
Approximate travel times, in hours, between some European capitals
Average length of bonds in acetic acid (CH_3COOH), measured in Angstrom
A simple circuit diagram, with resistances measured in Ohms.
These numbers transform the way we look at networks. We will be able to encode a lot more information, and perform more insightful analysis.
If a network has weights on its edges, we can give a weight to the whole network by adding up all the weights. This applies to subnetworks too. Similarly, we can give a weight to any walk by adding up all the weights on the edges chosen in the walk (the weight of a walk is sometimes called its length).
This network has a weight of 4+5+7+3+6+6+11+5+16+21=84.
The subnetwork in the middle (highlighted in orange) has weight 4+5+7+3+6=25.
The red walk on the right has weight 3+5+16+11=35.
The number added to each edge is called a weight.
If a network has weights on its edges, we can give a weight to the whole network by adding up all the weights. This applies to subnetworks too. Similarly, we can give a weight to any walk by adding up all the weights on the edges chosen in the walk (the weight of a walk is sometimes called its length).
A connected network that contains no cycles is called a tree. These have a distinctly tree-like appearance:
Once you leave a vertex on any of these networks, you can’t get back to it without repeating an edge.
A spanning tree is a subnetwork of a connected network that is also a tree. It has no cycles or loops.
Here’s an example:
The network in the centre has its eight different spanning trees arranged around it. You can still get from one vertex to any other, but you can’t get back without repeating an edge.
A connected network that isn’t already a tree can have multiple spanning trees. The network below has 11 possible spanning trees:
Here are all the spanning trees, with their weights. Notice that all the spanning trees have the same number of edges. The spanning tree for a network with n vertices will have (n-1) edges.
The last spanning tree is special, since it has the lowest weight out of all of them. We call it the minimal spanning tree. Sometimes there can be two or more spanning trees with equal lowest weight, in which case they are all minimal spanning trees.
Consider the following graphs.
Which of these networks is a tree?
Why is the following graph not a tree?
Why is the following graph not a tree?
Summary of the idea