I know that in undirected connected graph
articulation point
is a vertex after removing which graph becomes disconnected. For Java code I followed this link http://algs4.cs.princeton.edu/41undirected/Biconnected.java.html.
Now suppose we have above graph-
In above graph there are no articulation points
because graph does not become disconnected by removing any single vertex. But we can make graph disconnected by removing more than 1 vertex, for example if we remove 4,6 vertices graph
becomes disconnected.
How to find set of vertices such that after removing those vertices graph becomes disconnected. Lets say that there is limit of vertices that can be removed and it is 3. Meaning we cannot remove more than 3 vertices at a time to make graph disconnected.
Approach I am thinking-
Step 1 - Run algorithm to find single articulation point.
Step 2 - If after step 1 there is no articualtion point we remove a vertex from graph and run articulation point algorithm, we do this for all vertices in graph. Using this we can find 2 vertices (1st is vertex that was removed before running algo and 2nd vertex is found after running algo) whose removal will make graph disconnected and program will stop because we have found set of vertices.
Step 3 - If we are not able to find set of vertices in step 2, we remove 2 vertices from graph and run articulation point algorithm. We run this algorithm after removing each pair of graph vertices. Using it we can find set of 3 vertices removing which graph will be disconnected. If still graph is not disconnected we dont run program any further because our limit of vertices that can be removed is 3.
I think there is better approach for this.
How to find minimum set of vertices after removing which graph becomes disconnected.
What can be the better approach to find set of vertices removing which graph becomes disconnected.