Maximum flow algorithm procedure: for all edge, set f=0 while there exists an augmenting path for all edge in AP f(u,v)=f(u,v)+cf(AP) f(u,v)=−f(u,v) See also Hungarian method