Cormen-Leiserson-Rivest's Algorithms text has a bunch of basic material on flows and also Goldberg's push-relabel algorithm which is the fastest one to use in practice but harder to explain. Goldberg has code on the web for a bunch of this, see especially CS2. http://www.avglab.com/andrew/soft.html