Hi everyone, I want the vectors combination of a minimum spanning tree. I don’t think that I was very clear, but its like the following example, I have this array, generated by the function kruskal_mst from the LightGraphs package:
12-element Array{Array{Int64,1},1}:
[1, 2]
[2, 3]
[3, 4]
[3, 8]
[4, 5]
[4, 6]
[6, 7]
[8, 9]
[9, 10]
[10, 11]
[11, 12]
[12, 13]
But the result I want is this one (some of the combinations that I saw):
[1, 2, 3, 4, 5]
[1, 2, 3, 8, 9, 10, 11, 12, 13]
[1, 2, 3, 4, 6, 7]
[7, 6, 4, 3, 8, 9, 10, 11, 12, 13]
What I coded until now is a great mess that only combine, sometimes wrongly, some of the vertices of the initial array, so I’m asking if anyone knows anything that can do what I want.