Search results
Results from the WOW.Com Content Network
In computer science, Prim's algorithm is a greedy algorithm that finds a minimum spanning tree for a weighted undirected graph. This means it finds a subset of the edges that forms a tree that includes every vertex , where the total weight of all the edges in the tree is minimized.
A planar graph and its minimum spanning tree. Each edge is labeled with its weight, which here is roughly proportional to its length. A minimum spanning tree (MST) or minimum weight spanning tree is a subset of the edges of a connected, edge-weighted undirected graph that connects all the vertices together, without any cycles and with the minimum possible total edge weight. [1]
If is edge-unweighted every spanning tree possesses the same number of edges and thus the same weight. In the edge-weighted case, the spanning tree, the sum of the weights of the edges of which is lowest among all spanning trees of , is called a minimum spanning tree (MST). It is not necessarily unique.
The running time of this algorithm is ().A faster implementation of the algorithm due to Robert Tarjan runs in time () for sparse graphs and () for dense graphs. This is as fast as Prim's algorithm for an undirected minimum spanning tree.
Example of rectilinear minimum spanning tree from random points. In graph theory, the rectilinear minimum spanning tree (RMST) of a set of n points in the plane (or more generally, in ) is a minimum spanning tree of that set, where the weight of the edge between each pair of points is the rectilinear distance between those two points.
Example of a MST: The minimum spanning tree of a planar graph.Each edge is labeled with its weight, which here is roughly proportional to its length. The distributed minimum spanning tree (MST) problem involves the construction of a minimum spanning tree by a distributed algorithm, in a network where nodes communicate by message passing.
Examples of such greedy algorithms are Kruskal's algorithm and Prim's algorithm for finding minimum spanning trees and the algorithm for finding optimum Huffman trees. Greedy algorithms appear in the network routing as well. Using greedy routing, a message is forwarded to the neighbouring node which is "closest" to the destination.
M. Haque, Md. R. Uddin, and Md. A. Kashem (2007) found a linear time algorithm that can find the minimum degree spanning tree of series-parallel graphs with small degrees. [2] G. Yao, D. Zhu, H. Li, and S. Ma (2008) found a polynomial time algorithm that can find the minimum degree spanning tree of directed acyclic graphs. [3]