HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

Remove minimum number of vertices to disconnect the graph

Submitted by: @import:stackexchange-cs··
0
Viewed 0 times
numberthedisconnectgraphminimumremovevertices

Problem

Consider an undirected graph with a source and a sink vertex. We would like to remove minimum number of vertices in that graph to disconnect any path between source and sink.

Can we do this using say a max-flow, min-cut algorithm?

Solution

(This answer was originally given as part of the question, with the goal of it being verified.)

My intuition tells me that we can use max-flow, min-cut algorithm to solve this problem:

  • Replace each of the undirected edges with a pair of directed edges.



  • Replace each vertex $v$ with two vertices $v_\text{in}$ and $v_\text{out}$ connected by an edge. all the incoming edges of $v$ will be connected with $v_\text{in}$, all the outgoing edges of $v$ will be connected with $v_\text{out}$.



  • Try to find a minimum cut $M$. The edges of $M$ refer to the vertices that we need to remove.

Context

StackExchange Computer Science Q#7457, answer score: 6

Revisions (0)

No revisions yet.