title: Is there an algorithm to find minimum cut in undirected graph separating source and sink
body: <p>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.</p>
  
  <p>I know about <a href="https://en.wikipedia.org/wiki/Ford%E2%80%93Fulkerson_algorithm" rel="nofollow">Ford-Fulkerson's maximum flow algorithm</a> and his theorem about <a href="https://en.wikipedia.org/wiki/Max-flow_min-cut_theorem" rel="nofollow">maximum flow and minimum cut relation</a> on directed graphs. </p>
  
  <p>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:</p>
  
  <pre><code>nodes: 0, 1, 2, 3
  edges &amp; capacities: {0,1}-&gt;5, {0,2}-&gt;6, {1,2}-&gt;2, {1,3}-&gt;7, {2,3}-&gt;4
  source: 0
  sink: 3
  </code></pre>
  
  <p>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.</p>
  
  <p>I found a <a href="https://en.wikipedia.org/wiki/Stoer%E2%80%93Wagner_algorithm" rel="nofollow">Stoer–Wagner algorithm for finding a global minimum cut</a> 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.</p>
  
  <p>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?</p>