The maximum flow problem is a graph problem, where given a flow network and a capacity constraint and flow conservation, we want to find the maximum flow in the network.
The flow network is defined as a directed graph with the following properties:
- All edges have a non-negative capacity .
- , i.e., if we have an edge from to , we cannot have a direct edge in the opposite direction between to .
- , i.e., if a direct edge doesn’t exist between , then the capacity of that edge is 0, i.e., it cannot support any flow.
- There are no self-loops.
- is connected, i.e., , there exists a path from the source to and from to the sink.
The flow function between two vertices has two properties:
- Capacity constraint — the flow cannot be negative and is bounded by the capacity of the edge, i.e., ,
- Flow conservation — the amount of flow entering a vertex is equal to the flow exiting a vertex.
At any point, all edges in the network essentially have an associated capacity and flow. We also define:
- Residual capacity — what is leftover from the flow. .
- Residual network — the resulting graph where the forward edges are given by , and the backwards edges are given by . i.e., we essentially reverse the edges of the flow network, where we add additional edges for the residual capacity. Note then, that .
- Augmenting path — a simple path from source to sink in the residual network .
Algorithms to solve maximum flow include the following. Both in principle rely on the terms defined above.
ford fulkerson residual capacity on path: bottleneck of path, minimum residual capacity edge
Problems
must have no anti-parallel edges flow networks cannot have anti-parallel edges
multiple sources/sinks algos can only deal with single source single sink, so we have a pseudo source/sink
edge disjoint paths no two paths share an edge, multiple paths can go through the same nodes
ignore the last one: find number of independent paths not true or vaguely stated, bc multiple definitions for it
vertex capacity we can’t model it right away like our flow network, so we make a transformation