Abstract
We present an algorithm for enumerating all spanning trees of a directed graph with V vertices, E edges and N spanning trees. The algorithm takes O(log V) time per spanning tree; more precisely, it runs in O(Nlog V+V 2 α(V, V)+VE) time. It first outputs a single spanning tree and then a list of edge swaps; each spanning tree can be generated from the first spanning tree by applying a prefix of this sequence of edge swaps. The total output size is O(N) as against the O(NV) size of all spanning trees put together. The previous best known algorithm for this problem [KR91] took O(NV+V 3) time, even for generating the edge swap sequence.
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
S. M. Chase, Analysis for algorithms for finding all spanning trees of a graph, RC3190, IBM T.J. Watson Research Center, Yorktown Heights, NY, Dec. 1970.
H. N. Gabow, Two algorithms for generating weighted spanning trees in order, SIAM J. Comput., vol. 6, pp. 139–150, Mar 77.
H. N. Gabow and E. W. Myers, Finding all spanning trees of directed and undirected graphs, SIAM J. Comput., vol. 7, no. 3, Aug 78.
D. Harel, R. Tarjan. Fast algorithms for finding nearest common ancestors. SIAM J. Comput., 13, 1984, 338–355.
S. Kapoor, H. Ramesh. Algorithms for generating all spanning trees of undirected, directed and weighted graphs, Workshop on Algorithms and Data Structures, LCNS 519, Ottawa, 1991.
S. Kapoor, H. Ramesh. Algorithms for generating all spanning trees of undirected and weighted graphs, To appear in SIAM J. Comput., 1995.
W. Mayeda. Graph Theory, John Wiley, NY 1972, 252–264.
G.J. Minty, A simple algorithm for listing all trees of a graph, IEEE Trans. Circuit Theory, vol. CT-12, pp. 120, 1965.
R. E. Tarjan, On the efficiency of a good but not linear set merging algorithm, J. of ACM, 22, 2, April 75.
R. E. Tarjan, R. C. Read, Bounds on backtrack algorithms for listing cycles, paths and spanning trees, Networks, 5, 1975, pp. 237–252.
B. Schieber, U. Vishkin. On finding lowest common ancestors: simplification and parallelization. SIAM J. Comput., 17, 1988, 1253–1262.
S. Shinoda. Finding all possible directed trees of a directed graph, Electron Communication, Japan, 51-A, 1968, 45–47.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1995 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Hariharan, R., Kapoor, S., Kumar, V. (1995). Faster enumeration of all spanning trees of a directed graph. In: Akl, S.G., Dehne, F., Sack, JR., Santoro, N. (eds) Algorithms and Data Structures. WADS 1995. Lecture Notes in Computer Science, vol 955. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-60220-8_82
Download citation
DOI: https://doi.org/10.1007/3-540-60220-8_82
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-60220-0
Online ISBN: 978-3-540-44747-4
eBook Packages: Springer Book Archive