UGC-NET | UGC-NET CS 2017 Dec 2 | Question 5

Consider the graph given below :
kruskal

Use Kruskal’s algorithm to find a minimal spanning tree for the graph. The List of the edges of the tree in the order in which they are choosen is?
(1) AD, AE, AG, GC, GB, BF
(2) GC, GB, BF, GA, AD, AE
(3) GC, AD, GB, GA, BF, AE
(4) AD, AG, GC, AE, GB, BF
(A) (1)
(B) (1),(2)
(C) (1),(2),(3)
(D) (1),(2),(3),(4)


Answer: (D)

Explanation: Using Kruskal’s algorithm for minimal spanning tree:
First select the minimum weight edge ie 2 we have two options GC and AD
Now select Next edge of minimum weight: for GC we have to select GB or AD and so on select minimum weight keep in mind no vertex left to visit.
Here all option are matching with minimum spanning tree.
So, option (D) is correct.


Quiz of this Question

My Personal Notes arrow_drop_up
Article Tags :

1


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.