Let the removed edge be (u, v). If (u, v) had no flow, we don't need to do anything. If (u, v) carried flow, the network must be updated. The picture is something like: , where the edge is deleted. There is now one more unit of flow coming into u than is going out (and one more unit of flow going out of v than is coming in). The idea is to try to reroute this unit of flow so that it goes out of u and into v via some other path, if possible. If this is not possible, we must reduce the flow from s to u and from v to t by one unit.
Look for an augmenting path from u to v (not from s to t as we do at every iteration of the basic FordFulkerson method). If there is such a path, augment the flow along that path. If there is no such path, reduce the flow from s to u by augmenting the flow from u to s. That is, find an augmenting path from u to s and augment the flow along that path. (There is definitely such a path, because there is flow from s to u.) Augment the flow from t to v similarly.
The run time is again O(V + E) = O(E) using depth-first search or breadth-first search to find paths from u to s and from t to v.
ParallelAlg(A, B, C, k) for each processor j, in parallel C[j] = C[j] + C[j-1] for each processor j, in parallel B[C[A[j]]] = A[j] C[A[j]] = C[A[j]] - 1
Is this parallel algorithm work efficient? Which sorting technique does this most closely resemble?
The run time is O(1) and the speedup is n. As long as k = n, the parallel algorithm is work efficient and closely resembles Counting Sort.