![]() ![]() Prim's algorithm finds the subset of edges that includes every vertex of the graph such that the sum of the weights of the edges can be minimized. Prim's Algorithm is a greedy algorithm that is used to find the minimum spanning tree from a graph. The weight of the spanning tree is the sum of the weights given to the edges of the spanning tree. Minimum Spanning tree - Minimum spanning tree can be defined as the spanning tree in which the sum of the weights of the edge is minimum. Spanning tree - A spanning tree is the subgraph of an undirected connected graph. Along with the algorithm, we will also see the complexity, working, example, and implementation of prim's algorithm.īefore starting the main topic, we should discuss the basic and important terms such as spanning tree and minimum spanning tree. In this article, we will discuss the prim's algorithm.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |