Your functions have to start with the lines
function P=augment(n,C,F,s,t,outlevel)
function F=ff(n,C,s,t,outlevel)
taking six resp. five parameters with the following description.
- n - number of vertices in graph
- C - n times n - matrix of edge capacities. Assume that all edge capacities are positive, and non-existent edges are marked by zeros. For edge ij (from i to j) with capacity c, C(i,j) is c and C(j,i) is -c.
- F - n times n - matrix of flow along given edges ij, with the same conventions as C.
- s,t - position of source and sink
- P - augmenting path for given flow F as described in the textbook. P should be specified as a list of vertices, beginning with s and ending with t.
- outlevel - nonnegative integer. Display no intermediate results if outlevel is zero, more and more as outlevel increases (be sensible - do what you need for debugging your program). Leave these lines in there - the loss in speed is negligible compared to the ease of understanding your program.