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.

The length of the path from to in the MST of previous question with is
View worked solution
Answer: C
To find the length of the path from to in the Minimum Spanning Tree (MST) of the graph with , we first construct the MST using Kruskal's algorithm.
The edges of the graph can be categorized into two types:
- Edges of the form with weight
- Edges of the form with weight
Sorting all edges by weight and applying Kruskal's algorithm (avoiding cycles) yields the following edges in the MST:
- with weight
- with weight
- with weight
- with weight
- with weight
- with weight
- with weight
- with weight
- with weight
Since the MST is a tree, there is a unique path between any two nodes. The path from to in this MST is:
Summing the weights of the edges along this path:
Free practice · Your answers on this page are not saved.
