CS Wiki | Cedric Schwyter

Flows and Cuts (TODO)

Flows and Cuts (TODO)

Flows

πŸ’‘ A network is a tuple , where the following hold:

  1. is a directed graph,
  2. is the source,
  3. is the target and,
  4. is the capacity function.

πŸ’‘ Let be a network. A flow in is a function with the conditions

  1. for all , the admissibility, and
  2. for all it holds that

    which is called the flow conservation.

The value of a flow is defined by

πŸ“Œ The net inflow of the target equals the value of the flow, i.e.,

Cuts

πŸ’‘ An --cut for a network is a partition of (i.e., and ) with and . The capacity of an --cut is defined by

πŸ“Œ Let be a flow and be an --cut in a network . It then holds that

πŸ“– (Max-Flow-Min-Cut Theorem).

Every network fulfills

Augmenting paths

The fundamental concept behind many max-flow algorithms is to start with an arbitrary flow (e.g., constant is good for basically all cases) and improving it successively. A first approach to this could look as follows. Assume we find a directed path from source to target, where the flow has not used the full capacity of all the edge, i.e., for all in . Now let . If we now increase the value of the flow by in all edges of , we do not break flow conservation and the value of the flow has increased by . Sadly, there do exist flows that can not be improved with this scheme even though they are not optimal. One can not only increase flow in an outgoing edge, but also decrease flow in another incoming edge to increase the resulting flow. In this sense we can entertain paths from source to target in which edges can be directed both forwards and backwards. Let us assume, that we can increase flow in every edge that is directed in forwards direction by without breaking admissibility, and that we can decrease the flow in every edge that is directed in backwards direction by without having negative flow. Then we can modify flow along such a path without breaking flow conservation. If we successively optimize flow with these so-called augmenting paths one can only get stuck in maximal flows. Interestingly, this β€œalgorithm” only has finitely many steps when the capacities of a flow are rational.

Residual Network

πŸ’‘ Let be a network without opposing edges and let be a flow in . The residual network is defined as follows:

  1. If with , then is also an edge in with .
  2. If with , then is in with
  3. Only edges ad defined in points 1 and 2 are in .

, , is called the residual capacity of edge .

πŸ“– A flow in a network is a maximal flow if and only if there does not exist a directed path from the source to the target in the residual network . For every such maximum flow there does exist an --cut with .

Algorithms

Ford-Fulkerson

By searching for augmenting paths in the residual network we can find a max-flow in .

πŸ“– If all capacities are integer values and at max as large as some and there are no opposing edges in a network then there exists an integer maximum flow that can be found in , where is the number of nodes and is the number of edges of the network.

Pseudocode

Untitled

Other Algorithms

πŸ’‘ (Capacity-Scaling, Dinitz-Gabow, 1973).

If in a network all capacities are integers and at max as large as some , then there exists an integer maximum flow, that can be found in , where is the number of nodes and is the number of edges of the network.

πŸ’‘ (Dynamic Trees, Sleator-Tarjan, 1983).

A maximal flow of a network can be found in , where is the number of nodes and is the number of edges of the network.

Bipartite Matching as a Flow Problem

πŸ“Œ The maximum size of a matching in a bipartite graph equals the value of a maximum flow in network .

Edge- and Node-Disjoint Paths

πŸ’‘ Recall Menger’s Theorems:

πŸ“– Menger’s Theorem (Vertices):

Let be a graph. Then it holds that is -connected if and only if there exist disjoint --paths.

πŸ“– Menger’s Theorem (Edges):

Let be a graph. Then it holds that is -edge-connected if and only if there exist edge-disjoint --paths.

By cleverly converting a graph to a network we can turn the connectivity problem into a max-flow problem:

  • Edges:

    We split the undirected edges of the original graph into two opposing edges, both with capacity 1. If we now add new vertices and to some vertices of the original graph via one outgoing (in the case of ) and one incoming edge (in the case of , as shown in the picture. The value of a max-flow directly corresponds to the number of edge-disjoint --paths.

    Untitled

  • Nodes:

    We transform the graph to a network exactly the same way as before, only this time we also split any node of the original graph that is not or into and and add an extra edge from to with capacity , as shown in the picture. The value of a max-flow equals the number of disjoint --paths.

    Untitled

Image Segmentation as a Cut-Problem

Flows and Convex Sets

Minimum Cuts in Graphs

This project is maintained by D3PSI