Reputation: 16656
What algorithm I can use for problem like this:
Have a graph positive weighted, i want to know a smallest possible sum of weights where each node are connected (connected like a network, where each node is a eg. network device).
In this network each node can be connected with other node by some other other nodes in way. But all nodes from input graph must be in a network.
Upvotes: 0
Views: 279
Reputation: 11438
I believe the resulting network you want is a minimum spanning tree, which has two well-known algorithms: Kruskal's and Prim's.
Upvotes: 3