๐Ÿ“Š Design and Analysis of Algorithms
Q. Which of the following is true?
  • (A) prim’s algorithm initialises with a vertex
  • (B) prim’s algorithm initialises with a edge
  • (C) prim’s algorithm initialises with a vertex which has smallest edge
  • (D) prim’s algorithm initialises with a forest
๐Ÿ’ฌ Discuss
โœ… Correct Answer: (A) prim’s algorithm initialises with a vertex

Explanation: steps in prim’s algorithm: (i) select any vertex of given graph and add it to mst (ii) add the edge of minimum weight from a vertex not in mst to the vertex in mst; (iii) it mst is complete the stop, otherwise go to step (ii).


Explanation by: Mr. Dubey
steps in prim’s algorithm: (i) select any vertex of given graph and add it to mst (ii) add the edge of minimum weight from a vertex not in mst to the vertex in mst; (iii) it mst is complete the stop, otherwise go to step (ii).

๐Ÿ’ฌ Discussion

๐Ÿ“Š Question Analytics

๐Ÿ‘๏ธ
901
Total Visits
๐Ÿ“ฝ๏ธ
3 y ago
Published
๐ŸŽ–๏ธ
Mr. Dubey
Publisher
๐Ÿ“ˆ
81%
Success Rate