An undirected graph contains nodes named . Two nodes are connected if and only if . Each edge is assigned a weight . A sample graph with is shown below.

What will be the cost of the minimum spanning tree (MST) of such a graph with nodes?
View worked solution
Answer: B
To find the cost of the Minimum Spanning Tree (MST) for a graph with nodes, we can analyze the structure of the MST using Kruskal's algorithm.
For any node , it is connected to if and only if , with edge weight . Sorting the edges by weight, the lowest-weight edges that do not form a cycle are selected:
- The edge with weight .
- For each from to , the edge with weight .
These edges connect all nodes without cycles (the odd-indexed nodes form one path, the even-indexed nodes form another, and they are joined by the edge ).
The total cost of this MST is:
Letting , the summation becomes:
Alternative Method (Substitution):
For :
- The edges are [wt 3], [wt 4], [wt 5], [wt 6], and [wt 7].
- The MST selects edges , , and with total cost .
Substituting into the options:
- Option A:
- Option B:
- Option C:
For , the MST selects , , , and with total cost . Substituting into the remaining options:
- Option B: (Correct)
- Option A:
- Option C:
Free practice · Your answers on this page are not saved.
