One, the definition of network flow: the graph g= (v,e), the point concentration has a source point S, a meeting point T. and s in the degree of 0,t out of 0. For each edge edge, there is a weight function C, which represents its capacity, a weight function f, which represents its actual traffic.
Satisfies the F (edge) <=c (edge) for any one edge.
Definition of the maximum flow: the maximum flow of s to T, without violating the definition of the network stream.
Third, the idea of the Broad road.
Let's consider a network flow: The red number represents the actual traffic, blue indicates the capacity of the edge, and yellow indicates better traffic.
The flow from S to T is 5, but it's obviously not optimal.
This flow is better than the one above, and in fact, this flow is the largest stream of the current network.
We compare the two graphs to draw a
We found that the traffic on each side of the path was added one. Notice that there is a reverse edge of a to B, so when we look for such a path, we should add the remaining flow of all the edges in the original image and the opposite edge of the already traffic (back stream), which is the maximum flow when there is no such path in the diagram. (This path, by the way, is called the wide path).
Four, the algorithm to find the maximum flow:
Maximum flow algorithm based on network flow