Quite often come across the problem of finding the maximum flow / minimum cut. In this case, we use the Ford-Fulkerson algorithm, or the Edmonds-Karp, sometimes added to this scale, which significantly speeds up the case. The most difficult part of this problem is its attention to the calculation of the flow.