# Compute complete graph and make minimum spanning tree

I'd like to plot a complete Graph and then compute the Minimum spanning tree of it. I already can make a complete graph out of a list that countrydata gives me:

centerCoordinates = CountryData["Asia", "CenterCoordinates"];
completeGraphAsia =
GraphPlot[Table[1, {centerCoordinates}, {centerCoordinates}],
Method -> "RandomEmbedding", VertexLabeling -> True]


I tried to make a minimum spanning tree out of it, but it didn't really work... obviously, because the Kruskal MST expects a graph variable, but I couldn't figure out how else to do it:

KruskalMST = MinimumSpanningTree[completeAsia];


Any help appreciated :)

Thank you!

• Please try: g = CompleteGraph[Length@centerCoordinates, VertexLabels -> "Name"] and FindSpanningTree[g, VertexLabels -> "Name"] Jun 28, 2015 at 10:52
• Thanks @Mr.Wizard unfortunately those two commands crashes mathematica in my case. Jun 28, 2015 at 11:19
• @Mr.Wizard,,,I obviously spent too much time...but posted to illustrate relations between diffierent functions...remain disappointed with GeoBackground issues which I have sent email to Wolfram about... Jun 28, 2015 at 11:23

Just for illustration (and not dealing with distance or other edge weighting):

centerCoordinates = CountryData["Asia", "CenterCoordinates"];
asianames = CountryData["Asia", "Name"];
v = Length[centerCoordinates];
g = CompleteGraph[v,
VertexCoordinates -> (Reverse /@ centerCoordinates),
EdgeStyle -> Directive[LightGray, Opacity[0.2]], VertexSize -> 1];
st = FindSpanningTree[g,
VertexCoordinates -> (Reverse /@ centerCoordinates),
EdgeStyle -> Thick];
`