Solution :
Given :
There are five cities in a network and the cost of
a road directly between
and
is the entry
refers to the matrix.
Road cannot be built because there is a mountain.
The given matrix :
The matrix on the left above corresponds to the weighted graph on the right.
Using the
we can select the cheapest edge that is not creating a cycle.
Starting with 2 edges of weight 3 and the edge of weight 5 is forbidden but the edge is 7 is available.
The edge of the weight 8 completes a minimum spanning tree and total weight 21.
If the edge of weight 8 had weight 10 then either of the edges of weight 9 could be chosen the complete the tree and in this case there could be 2 spanning trees with minimum value.