What is the minimum cost to make an undirected weighted(positive weight) graph disconnected.
i mean i have to find out those edges which removal disconnect the graph and their cost is minimized.
I have following ideas...
1.find out all the bridges of the graph . then the bridge edge of minimum weight wiil be the ans.
2.if there is no bridge that means all the nodes are in a cycle(i'm not sure about it). then i sort the edge according to their weight and the sum of the two minimum edge weight will be the ans.
The graph has no self loop.
Is this algo correct?