<p>Is there a quick reference for the definition of a sparse s-t flow? </p>

<p>In the general case, having the max-flow it is quite easy to determine the min-cut, via the max-flow , min-cut theorem. The edges that are fully saturated form a cut set, so by selecting one vertex for each such edge, one can form a min-cut. Trivially, this is O(m) in the worst case, and also if one makes the running time output-sensitive, then the number of edges in the flow or even better, the number of saturated edges in the flow, always is an upper bound on the running time of the algorithm for finding the min-cut from the max-flow. So if you have a modification that finds those sparse s-t flows in linear time in the size of the flow, finding the min-cut won't change the algorithm's runtime asymptotically.</p>

CC BY-SA 3.0
2013-04-17T20:17:16.223Z
I don't have a specific definition. Just something where ford-fulkerson is asymptotically faster than anything else. If all my edges have unit capacity, won't many of them be saturated, including edges that if removed could be easily replaced without impacting the max flow volume? I could remove all these edges and form a cut, but then I'm not sure how I'd replace the ones I didn't actually need to remove.
Elliot JJ
CC BY-SA 3.0
2013-04-18T11:18:14.290Z
It depends on the graph. If you had unit capacities and a dense graph, it's quite likely that you would have many flows with max-value, this in turn could be interpreted as that you could have a large number of different min-cuts as well. Have a look also at this reference: http://en.wikipedia.org/wiki/Max-flow_min-cut_theorem
chazisop
CC BY-SA 3.0
2013-04-17T08:03:16.390Z
2013-04-17T08:03:16.390Z
chazisop
<p>If you don't use the flow per se, but use the Ford-Fulkerson algorithm (or some version, like Edmonds-Karp), you can get both the max-flow <em>and</em> the min-cut directly as a result. When looking for augmenting paths, you do a traversal, in which you use some form of queue of as-yet-unvisited nodes (in the Edmonds-Karp version, you use BFS, which means a FIFO queue). In the last iteration, you can't reach $t$ from $s$ (this is the termination criterion, after all). At this point, the set of nodes you reached forms the $s$-part of the cut, while the nodes you <em>didn't</em> reach form the $t$-part.</p>

<p>The leaf nodes of your traversal tree form the “fringe” of the $s$-part, while the nodes in your traversal queue form the fringe of the $t$-part, and what you want is the set of edges from the $s$-fringe to the $t$-fringe. This can also easily be maintained during traversal: Just add an edge to the cut when it is examined, and leads to an unvisited node, and remove it if it is traversed (so its target becomes visited). Then, once Ford-Fulkerson is finished, you'll have your min-cut (or, rather, one of them) right there. The running time will be (asymptotically) identical to Ford-Fulkerson (or Edmonds-Karp or whatever version you're using), which should give you what you were looking for.</p>

CC BY-SA 3.0
2013-04-20T07:16:59.163Z
2013-04-22T11:29:54.237Z
2013-04-22T11:29:54.237Z
Magnus Lie Hetland
<p>Ford-Fulkerson can find sparse s-t flows in time linear in the size of the flow and number of nodes if the edges have unit capacity.</p>

<p>How could I use a sparse s-t flow to find an s-t min-cut in time proportional to the size of the flow and the number of my nodes, for the sparse/low-volume max-flow case?</p>

CC BY-SA 3.0
2013-04-17T07:41:54.543Z
Is there a quick reference for the definition of a sparse s-t flow?
chazisop
CC BY-SA 3.0
2017-06-05T07:38:24.660Z
1. Traversing all edges and find saturated edges seemed pretty legitimate intuitively. But one flaw is, not all saturated edges necessarily belong to a min-cut. 2. Min-cut should be a set of edges, not a set of vertices. 3. So the typical solution should just be the accepted answer above. From the max flow network(Either given or you can compute by Ford-Fulkerson or Edmunds-Karp), DFS or BFS from s, mark all vertices that are reachable(The process of trying to find an augmenting path but you know y
Jinggang
<graph-algorithms><max-flow><max-flow-min-cut>
Fastest way to find an s-t min-cut from an s-t max-flow?
Elliot JJ
# Fastest way to find an s-t min-cut from an s-t max-flow?

(Asked by: username_0 on 2013-04-17)

Ford-Fulkerson can find sparse s-t flows in time linear in the size of the flow and number of nodes if the edges have unit capacity.

How could I use a sparse s-t flow to find an s-t min-cut in time proportional to the size of the flow and the number of my nodes, for the sparse/low-volume max-flow case?

**Tags:** graph-algorithms, max-flow, max-flow-min-cut
> **Comments:**
> **username_1**: Is there a quick reference for the definition of a sparse s-t flow?  
> **username_2**: 1. Traversing all edges and find saturated edges seemed pretty legitimate intuitively. But one flaw is, not all saturated edges necessarily belong to a min-cut. 2. Min-cut should be a set of edges, not a set of vertices. 3. So the typical solution should just be the accepted answer above. From the max flow network(Either given or you can compute by Ford-Fulkerson or Edmunds-Karp), DFS or BFS from s, mark all vertices that are reachable(The process of trying to find an augmenting path but you know y  

---

## 2 answers

### Answer by username_3 on 2013-04-20. Score: 8 | Accepted answer

If you don't use the flow per se, but use the Ford-Fulkerson algorithm (or some version, like Edmonds-Karp), you can get both the max-flow *and* the min-cut directly as a result. When looking for augmenting paths, you do a traversal, in which you use some form of queue of as-yet-unvisited nodes (in the Edmonds-Karp version, you use BFS, which means a FIFO queue). In the last iteration, you can't reach $t$ from $s$ (this is the termination criterion, after all). At this point, the set of nodes you reached forms the $s$-part of the cut, while the nodes you *didn't* reach form the $t$-part.

The leaf nodes of your traversal tree form the “fringe” of the $s$-part, while the nodes in your traversal queue form the fringe of the $t$-part, and what you want is the set of edges from the $s$-fringe to the $t$-fringe. This can also easily be maintained during traversal: Just add an edge to the cut when it is examined, and leads to an unvisited node, and remove it if it is traversed (so its target becomes visited). Then, once Ford-Fulkerson is finished, you'll have your min-cut (or, rather, one of them) right there. The running time will be (asymptotically) identical to Ford-Fulkerson (or Edmonds-Karp or whatever version you're using), which should give you what you were looking for.


---

### Answer by username_1 on 2013-04-17. Score: -1

Is there a quick reference for the definition of a sparse s-t flow?

In the general case, having the max-flow it is quite easy to determine the min-cut, via the max-flow , min-cut theorem. The edges that are fully saturated form a cut set, so by selecting one vertex for each such edge, one can form a min-cut. Trivially, this is O(m) in the worst case, and also if one makes the running time output-sensitive, then the number of edges in the flow or even better, the number of saturated edges in the flow, always is an upper bound on the running time of the algorithm for finding the min-cut from the max-flow. So if you have a modification that finds those sparse s-t flows in linear time in the size of the flow, finding the min-cut won't change the algorithm's runtime asymptotically.

> **Comments:**
> **username_0**: I don't have a specific definition. Just something where ford-fulkerson is asymptotically faster than anything else. If all my edges have unit capacity, won't many of them be saturated, including edges that if removed could be easily replaced without impacting the max flow volume? I could remove all these edges and form a cut, but then I'm not sure how I'd replace the ones I didn't actually need to remove.  
> **username_1**: It depends on the graph. If you had unit capacities and a dense graph, it's quite likely that you would have many flows with max-value, this in turn could be interpreted as that you could have a large number of different min-cuts as well. Have a look also at this reference: http://en.wikipedia.org/wiki/Max-flow_min-cut_theorem  

---

