Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I was wondering if there is explicit source code for generating all spanning trees on undirected graphs. I don’t need anything very fancy – perhaps Minty's algorithm or Gabow & Myers. I've only been able to find the original papers, and frankly (as I'm not in the field) was having a hard time understanding and implementing the quasi-code presented in them. Any guidance would be much appreciated.

share|improve this question
have a look at Combinatorica package in Mma. There you find Kruskal's algorithm for MinimumSpanningTree etc. over 450 functions in graph-theory and combinatorics... –  Stefan Jun 19 '13 at 17:16
Doesn't Kruskal's algorithm find only one minimum spanning tree? The poster asked to find all of them. I also had trouble finding any source code for this. –  Jason Mar 5 at 8:46
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.