Question: Suppose an algorithm for finding a maximum flow has been run, and you have the flow value through each edge. It is suspected that the
Suppose an algorithm for finding a maximum flow has been run, and you have the flow value through each edge. It is suspected that the program has a bug, and so the output may be wrong. Write an efficient function to verify that the flow is valid, and is actually a maximum flow of the graph. Your function should also print a minimum (S,T)-cut that is used in the proof of the maxflow-mincut theorem. What is its running time? Prototype: boolean verifyMaxFlow(G, s, t, c, f).
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
