scispace - formally typeset
Search or ask a question

Showing papers on "Prim's algorithm published in 1984"


Proceedings ArticleDOI
24 Oct 1984
TL;DR: An algorithm which finds the maximum value of every one of the given paths, and which uses only 5n + n log [(|A|+n)/n] comparisons, leads to a spanning tree verification algorithm using O(n+e) comparisons in a graph with n vertices and e edges.
Abstract: Given a rooted tree with values associated with the n vertices and a set A of directed paths (queries), we describe an algorithm which finds the maximum value of every one of the given paths, and which uses only 5n + n log [(|A|+n)/n] comparisons. This leads to a spanning tree verification algorithm using O(n+e) comparisons in a graph with n vertices and e edges. No implementation is offered.

31 citations


Journal ArticleDOI
TL;DR: Certain novel data structures for carrying out the Kruskal and Prim algorithms are presented and the best performance is attained by the new implementation of Prim's algorithm which incorporates an address calculation sort.
Abstract: The well-known algorithms of Kruskal, Prim, and Sollin for constructing a minimum spanning tree are surveyed in this paper. We discuss various data structures that can facilitate the search and update operations of these algorithms. In particular, certain novel data structures for carrying out the Kruskal and Prim algorithms are presented. Computational experience using four implementations of the Kruskal algorithm and two implementations of the Prim algorithm on a class of moderately large networks is also given. Overall, the best performance is attained by our new implementation of Prim's algorithm which incorporates an address calculation sort.

10 citations


Journal ArticleDOI
TL;DR: The present algorithm implements Prim's procedure for calculating a minimum spanning tree in an undirected network when the edge costs can be scaled to integers in a moderate range and has been used to calculate minimum spanning trees for networks with up to 500 vertices and 24,000 edges.
Abstract: The problem of determining a minimum spanning tree arises in a number of application areas, including network reliability, pattern recognition, clustering, and design of distribution systems. The present algorithm implements Prim's procedure [7] for calculating a minimum spanning tree in an undirected network when the edge costs can be scaled to integers in a moderate range. While other codes for implementing Prim's procedure have been published [4, 6, 8, 9], all have used a two-dimensional array for storing the edge costs. As a result, such implementations have been limited to fairly small networks (e.g., 100 or fewer vertices). Moreover, these previous codes do not take advantage of network sparsity to reduce the computational effort. In contrast, the present code does exploit network sparsity and has been used to calculate minimum spanning trees for networks with up to 500 vertices and 24,000 edges. Even such large problems required less than 0.7 seconds of CPU time on an IBM 370/3033 computer (IBM Extended H FORTRAN compiler). For the algorithm given here, the edge costs are assumed to be positive integers with maximum edge cost CMAX. The network, assumed to be connected with NV vertices, is represented in forward star form [2, 3]. That is, for each vertex i E {1 . . . . . NV}, EPT( i ) is a pointer to the first position in a list E L I S T where the vertices j adjacent to i are stored consecutively. A list ECOST, of the same size as ELIST, stores the corresponding edge costs c(i, j) for the edges (i, j). It

5 citations