How does Prim's algorithm select the next vertex to add to the minimum spanning tree?

  • Chooses the vertex with the highest degree.
  • Chooses the vertex with the maximum key value among the vertices not yet included in the minimum spanning tree.
  • Chooses the vertex with the minimum key value among the vertices not yet included in the minimum spanning tree.
  • Randomly selects a vertex from the graph.
Prim's algorithm selects the next vertex to add to the minimum spanning tree based on the minimum key value among the vertices not yet included in the tree. The key value represents the weight of the smallest edge connecting the vertex to the current minimum spanning tree.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *