When I was trying to solve a problem, I met another problem like this:
Given a undirected connected graph G=(V,E)(|V|≤100,|E|≤4000) and some subgraphs of G: G_1,G_2,...,G_n(n≤32), and all G_i is connected and include all the vertexs in G. We need to cut some edges in G so that all of the subgraphs G_1,G_2,...,G_n become NOT connected. What's the minimum number of edges we need to cut?
I have tried many ways but all failed. Could anyone please give me an algorithm to solve it? :)
The problem is NOT sufficient to make G disconnected.
Example: Consider
G = ({1,2,3,4},{(1,2),(1,3),(1,4),(2,4),(3,4)}), G_1 = ({1,2,3,4},{(1,2),(1,3),(1,4)}), G_2 = ({1,2,3,4},{(4,1),(4,2),(4,3)}). The best solution is to cut edge(1,4).