How to find total number of minimum spanning trees in a graph?

前端 未结 2 931
猫巷女王i
猫巷女王i 2021-02-06 05:46

I don\'t want to find all the minimum spanning trees but I want to know how many of them are there, here is the method I considered:

  • Find one minimum spanning tree
相关标签:
2条回答
  • 2021-02-06 06:03

    MST and their count in a graph are well-studied. See for instance: http://www14.informatik.tu-muenchen.de/konferenzen/Jass08/courses/1/pieper/Pieper_Paper.pdf.

    0 讨论(0)
  • 2021-02-06 06:12

    Looking at Prim's algorithm, it says to repeatedly add the edge with the lowest weight. What happens if there is more than one edge with the lowest weight that can be added? Possibly choosing one may yield a different tree than when choosing another.

    If you use prim's algorithm, and run it for every edge as a starting edge, and also exercise all ties you encounter. Then you'll have a Forest containing all minimum spanning trees Prim's algorithm is able to find. I don't know if that equals the forest containing all possible minimum spanning trees.

    This does still come down to finding all minimum spanning trees, but I can see no simple way to determine whether a different choice would yield the same tree or not.

    0 讨论(0)
提交回复
热议问题