For each of the graphs in 9 and 10, find all minimum spanning trees that can be obtained using (a) Kruskal’s algorithm and (b) Prim’s algorithm starting with vertex a or t. Indicate the order in which edges are added to form each tree.
9.
(a)
To find out all the minimum spanning trees that can be obtained using Kruskal’s algorithm.
Given information:
The following is the given graph −
Calculation:
The Kruskal’s algorithm follows the following steps to form the minimum spanning tree from the given graph-
First Form-
Finally the following will be the edges in the minimum spanning tree obtained using Kruskal’s algorithm.
Another minimum spanning tree can be formed.
Second Form-
Instead of adding the edge
(b)
To find out all the minimum spanning trees that can be obtained using Prim’s algorithm.