Algorithms for Generating All Spanning Trees of Undirected, Directed and Weighted Graphs
Algorithms for Generating All Spanning Trees of Undirected, Directed and Weighted Graphs
复制标题
生成无向图、有向图和加权图的所有生成树的算法
DOI:
10.1007/bfb0028284
复制
发表时间:
1991
期刊:
影响因子:
--
通讯作者:
H. Ramesh
中科院分区:
文献类型:
--
作者:
S. Kapoor;H. Ramesh
We present algorithms for enumerating all spanning trees in directed, undirected and weighted graphs. The algorithms use a search tree technique to construct a computation tree. The computation tree is used to output all the spanning trees by listing the relative differences between spanning trees rather than the entire spanning trees themselves. For the undirected case, both the construction and the listing of the trees are shown to requireO(N+V+E) time for a graph withVvertices,Eedges andNspanning trees. This algorithm is optimal and is based on exchanging non-tree edges with tree edges in a fundamental cycle. A similar exchange technique is used to construct the computation tree for a directed graph inO(NV+V3) time. The time for listing out the trees remainsO(N). For a weighted graph, we show how to sort the spanning trees by weight using the computation tree inO(NlogV+VE) time.