找到所有最小生成树
可能的重复:
所有最小生成树实现
如何在无向图中找到所有最小生成树一个有效的方法?
Possible Duplicate:
All minimum spanning trees implementation
How can I find all minimum spanning trees in an undirected graph in an efficient way?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
对学术答案表示歉意...但是 Knuth 的 TAOCP,第 4 卷,分册 4 正是关于生成所有生成树的(第 26 页)。当他谈论生成(生成)树时,有一些沉思 ,但 TAOCP 是您最好的选择。
Apologies for the academic answer... but algorithm
S
in Knuth's TAOCP, Volume 4, Fascicle 4 is exactly about generating all spanning trees (pp. 26ff). There are a few musings when he talks about generating (spanning) trees, but your best bet in TAOCP.是的,有算法用于生成图中的所有生成树。至少有一个通过仅生成树之间的差异来压缩输出。正如其他人指出的那样,即使是小图也可能有很多最小生成树。
Yes, there are algorithms for generating all spanning trees in a graph. At least one compresses the output by generating only diffs between the trees. As others have pointed out, there might be a lot of minimum spanning trees for even a small graph.
你可以找到一个..修改BFS算法!
you can find one..modifying the BFS algorithm!