All mock tests are FREE till 31 December — register to save your progress
Unit 7 · Data Structures and Algorithms Paper 2 CS · December 2018

Consider the graph shown below :

Figure

Use Kruskal's algorithm to find the minimum spanning tree of the graph. The weight of this minimum spanning tree is

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: C. 16

Explanation

Take the three weight-1 edges, then the weight-2 edges that join new components (three of them), then a weight-3 edge to the lower-left vertex and a weight-4 spoke to the bottom vertex: 3 × 1 + 3 × 2 + 3 + 4 = 16 for the 8 edges on 9 vertices.

More Data Structures and Algorithms questions