I have an edge-weighted undirected graph and 2 nodes (often called source and sink). I need to find a set of edges of minimum possible weight, which separates these 2 nodes into 2 weak components.
I know about Ford-Fulkerson's maximum flow algorithm and his theorem about maximum flow and minimum cut relation on directed graphs.
I also know about a modification of Ford-Fulkerson's maximum flow algorithm for undirected graphs, which replaces each undirected edge with 2 opposite directed edges and updates flow to both of them simultaneously. But with this modification, the max-flow-min-cut-theorem seems to not be valid anymore, because on the following undirected graph the minimum cut will not be determined correctly:
nodes: 0, 1, 2, 3
edges & capacities: {0,1}->5, {0,2}->6, {1,2}->2, {1,3}->7, {2,3}->4
source: 0
sink: 3
The max-flow-min-cut theorem says, minimum cut are those edges, which flow is equal to their capacity, and by the modified Ford-Fulkerson that's all the edges, which is obviously not the correct cut.
I found a Stoer–Wagner algorithm for finding a global minimum cut in undirected graph, but that's quite not the thing i want, since this algorithm doesn't consider any source and sink, and can find a cut, which lets the nodes be in the same component.
Is there any algorithm, which can efficiently find a minimum cut in an undirected graph with source and sink, separating these 2 specified nodes? Can i maybe somehow modify the previously mentioned algorithms to make them working for my case?