Algorithms

Algorithms MCQ

Question 1
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 – (a,b), (a,h), (g,h), (f,g), (c,f), (c,i), (c,d), (d,e)
B – (a,b), (a,h), (g,h), (f,g), (c,f), (c,i), (c,d), (d,e)
C – (a,b), (b,c), (c,i), (c,f), (f,g), (g,h), (c,d), (d,e)
D – (a,b), (g,h), (g,f), (c,f), (c,i), (f,e), (b,c), (d,e)

Show Answer With Best Explanation


error: Content is protected !!
Open chat
1
Hi,how Can We Help You ?
Exit mobile version