 
Summary: CS 5050  Program #3  20 points
Network Flow  EdmondsKarp Algorithm
Using your own graph code or pull the code from the class homepage (which has been
adapted for a max flow problem), implement a flow graph. This was allowed in the
original code. The format of the edges is fromto/flow. Implement the EdmondsKarp
network flow algorithm for the three graphs supplied with the code (in the edge String).
In the graph below, note there are two edges between a and c. (You might want to try it
with a single edge at first.) Note, too, that originally there were multiple sources
(s1,s2,s3) and multiple sinks (t1,t2), but that this has been dealt with by adding a "super"
source (O) and "super" sink (S).
One problem with FordFulkerson is that running time can be large if capacities are large.
The number of iterations is O(F), where F is the max flow. This might not be polynomial
in the description length of the problem instance. This is a problem for us, as complexity
it normally expressed in terms of the size of the problem (number of arcs, nodes, etc.) not
in terms of some extra number. (When a polynomial time algorithm has complexity that
depends on an extra number, we call is pseudopolynomial.) Thus, it would be nice if the
running time were only dependent on the problem size.
EdmondsKarp gives two natural heuristics that solve the problem.
· Heuristic 1: Always pick the maximum bottleneck augmenting path. (The path of
maximum minimum capacity)
