FordFulkersonAlgorithm() executed in a depth-first fashion has some redundancy. First, all outgoing edges are pushed onto the stack and then the last is popped off to be followed by the algorithm. For example, in the network in Figure 8.20a, first, all three edges coming out of vertex s are pushed, and only afterward is the last of them,edge(se), followed. Modify FordFulkersonAlgorithm() so that the first edge coming out of a certain vertex is immediately followed, and the second is followed only if the first does not lead to the sink. Consider using recursion.
Fig. 8.20a
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here