CMPSCI 311: Theory of Algorithms

David Mix Barrington

Fall, 2003

Discussion Notes #10

from Wednesday 19 Nov 2003

Finding Maximum Flows

Please answer the questions during the discussion period.

Our analysis of max flows and min cuts last week leads to an algorithm (called the Ford-Fulkerson method) for finding max flows in a flow diagram. The residual graph for a flow is the flow diagram that labels each edge with the capacity in each direction, if any, not used by the flow. For example, if an edge can take from 0 to 6 units in one direction and 4 are currently going across it, the residual graph shows 2 units in the forward direction and 4 in the backward direction.

An augmenting path is a path of non-zero edges in the residual graph. If there is an augmenting path, we can increase the flow along it by an amount equal to its lowest-labeled edge. (If there is no augmenting path, then there is a cut equal to the flow capacity and the flow is maximum.) The Ford-Fulkerson method is to keep finding an augmenting path and increasing the flow as long as you can. It always works on integer flows, but not always quickly:


           1000       1000
         ------>(2)------
        /        ^       \
       /         |        \  
      /          |         v
   >(1)         1|        ((4))
      \          |         ^
       \         |        / 
        \  1000  |  1000 /
         ------>(3)------

Last modified 1 December 2003