Letting W be the weighted graph created by taking a complete graph K5 on five vertices 1, 2, 3, 4, 5 with the weight of each edge {x,y} given by ({x,y})=x+y,
How would I find a minimum weight spanning tree for W?
Letting W be the weighted graph created by taking a complete graph K5 on five vertices 1, 2, 3, 4, 5 with the weight of each edge {x,y} given by ({x,y})=x+y,
How would I find a minimum weight spanning tree for W?
Copyright © 2021 JogjaFile Inc.
The greedy algorithm can be used to find arbitrary minimum weight spanning trees, you just have to add the lightest edge that doesn't create a cycle at each turn.
In this case the graph will have vertices $\{1,2\},\{1,3\} ,\{1,4\},\{1,5\}$