How to find maximum spanning tree?

2019-01-12 21:32发布

Does the opposite of Kruskal's algorithm for minimum spanning tree work for it? I mean, choosing the max weight (edge) every step?

Any other idea to find maximum spanning tree?

7条回答
老娘就宠你
2楼-- · 2019-01-12 21:58

Negate the weight of original graph and compute minimum spanning tree on the negated graph will give the right answer. Here is why: For the same spanning tree in both graphs, the weighted sum of one graph is the negation of the other. So the minimum spanning tree of the negated graph should give the maximum spanning tree of the original one.

查看更多
登录 后发表回答