This allows us to define the idea for the algorithm.
Algorithm
ford_fulkerson(G, c, s, t) Input: A flow network with integer capacities. Output: A max flow on the network.1. Set f(e) = 0 for all e in E.2. Build the residual network G^f for the current flow f.3. Check for any s-t paths p in G^f using BFS (or DFS). 1. If no such path then output f.4. Given p let c(p) = min_{e in p} c^f(e).5. Augment f by c(p) units along p. 1. f(e) = f(e) + c(p) for forward edges. 2. f(e) = f(e) - c(p) for backward edges.6. Repeat from step 2.
If we assume are integers, then each iteration we will increase the flow by 1. Therefore we can have at most the max flow iterations .
To run each iteration we need need to update the path length number of edges in the graph which takes time. We need to run BFS which takes if we assume is connected. Then calculating and updating the weights also takes time. So all together a single iteration takes time.