Ford-Fulkerson Algorithm


 This is to solidify and simplify what we have said in the class. Some of the things
I did not present correctly, and I apologise for that.  Because of that, in the question
7.     Exercise 27.2-2, you only have to show the series of augmenting paths, and the grading will be lenient.
 

The algorithm calculates the max-flow of a directed graph G(V,E).
The abstract description (F-F algorithm) :

  1. Intialize flows to zero.
  2. While there is an augmenting path
  3.       do augment flow as much as legally possible
 

More detailed description on selecting paths.

            Approach 1:
We can solve a max-flow problem executing the F-F algorithm in the initial network G(V,E).
            An augmenting path is a path that consists of edges
a)   ...u -> v...  (along the direction we traverse the path)
                    and c(u,v) - f(u, v) > 0, and
                    the residual capacity  c_f(u,v)  =  c(u,v) - f(u, v)  is the amount
                    that we can increase the flow on that edge.

b)  ...u <- v .... (on the opposite from the direction we traverse the path)
                     and  the  residual flow is infinite,
                      which means that we can allocate an infitely large negative flow.

Having found the path, I push the maximum flow I can, which is the minimum of all the residual flows I can find.

 Approach 2:

We can solve the max-flow problem using the residual graph G_f.
Intuitively, the idea of G_f,  is a graph that has only one number per edge to simplify our searching for an augmenting path.

          Attention 1: in the residual graph, we allow only positive  net flows.

The residual graph is defined as:
 G_f = G
 E_f =  { (u,v)  in VxV: c_f(u,v) > 0 }

         Attention 2:  E_f  may have more edges than E!!!!!!

 Example:   consider edge :   u ----> v   with capacity 15 and zero flow initially.
 When I route flow say of 5 untis, my edge becomes:
                                        u----->v  5/15
In the residual graph, this corresponds to two edges with residual capacities:
                                        u -----> v    10 = 15 -5
                                        u <----- v     5 =  0- (-5)
0 is the capacity the edge  u<---v   in G, since in G it does not exist
-5 is the flow of the edge   u<---v  in G (recall the skew symmetry constraint)
Intuitvely,  u<---v with residual capacity 5, means that: now u sends 5 units to v, so if I stop sending them, it is as if I send 5 units from v to u and the two sets of units cancel each other.

In finding an augmenting path in G_f, I look for paths in G_f  with edges in the direction that I am traversing them i. I.e. I only have edges

s  --->  ...... ---> u -----> v ---> ....   ----> t
                                         10
or
s  --->  ...... ---> v -----> u ---> ....   ----> t
                                           5

   I hope these explanations help. If something is unclear, please let me know.