This question assesses the application of Prim's algorithm to find a Minimum Spanning Tree (MST) for a weighted undirected graph and the calculation of its total weight. Students are expected to show the step-by-step selection of vertices and edges.
A road planner has five towns with possible roads and construction costs as follows: , , , , , , , .
Use Prim’s algorithm starting at town to find the edges of the minimum spanning tree and its total cost.
[6]The question requires the application of Kruskal's algorithm to find the Minimum Spanning Tree (MST) for a connected weighted graph representing an office network. Students must demonstrate knowledge of sorting edges, selecting the lowest-weight edges without forming cycles, and calculating the total weight of the resulting tree.
A company needs to lay fibre between seven offices, labelled through . The connection costs are given by the weighted edges:
Use Kruskal’s algorithm to find the minimum spanning tree and its total cost.