Q23.Marks: +2.0UGC NET Paper 2: Computer Science 2020
Consider the undirected graph below:
Using Prim's algorithm to construct a minimum spanning tree starting with node a, which one of the following sequences of edges represents a possible order in which the edges would be added to construct the minimum spanning tree?
A minimum spanning tree (MST) or minimum weight spanning tree is a subset of the edges(V – 1 ) of a connected, edge-weighted undirected graph G(V, E) that connects all the vertices together, without any cycles and with the minimum possible total edge weight.
Key Points
The final sequence will be (a, b), (b, c), (c, i), (c, f), (f, g), (g, h), (c, d), (d, e) with a cost 37.
Another final sequence is (a, b), (a, h), (g, h), (f, g), (c, f), (c, i), (c, d), (d, e) with a cost is 37(Two sequences possible ).