Network Flow
     
   Step-by-Step Animation   Animation Speed 
Elaboration: S is the SOURCE. T is the SINK
?
Network Flow: It finds the max flow from Source to Sink.
Path Finding Methods: "Manually Enter" helps you flexibly try any path from source to sink
1. BFS: Find a path from source to sink with the fewest number of edges. See BFS animation here
2. Greedy-DFS: The adjacent edges are sorted in descending order by weight(capacity).
3. DFS: Standard DFS. See DFS animation here
4. Modified Dijkstra: Find the path from source to sink that has the max flow.
5. Manually Enter: Enter node ids on the path from source to sink where node ids are separated by space(s).
API Explanations:
1. Run Augmenting Path: Find a path from source to sink based on the selected path finding method and process it
2. Find Minimum Cut: Find a set of edges that disconnect the source and sink and has the smallest total weight(capacity)

网络流定义:给定指定的一个有向图,其中有两个特殊的点源S(Sources)和汇T(Sinks),每条边有指定的容量,常见的网络流中提及的概念是最大流和最小割。
最大流:指的是在这个网络流中,每一个节点到另一个节点之间都存在着“流量”(边上的值),这些“流量”就像是一个自来水管能通过的水的量。好比从原点出发,开始有水流出,不断分流,直到最后的终点。每条边最终累计通过的“水”都不能大于它的“流量”。而满足条件的从S流到T最多的“水”的量,就是最大流。
最小割:最小割:容量最小的割。最大流最小割定理:对容量网络G(V,E),其最大流的容量等于最小割的容量. 通俗来讲,在一个网络流中,每一个边都好似自来水管道,有“水“从S流到T。而如果有人拿把刀,割断了一部分自来水管(边),导致最后这些”水“无法到达T。但从割断的水管(边)中流出的水加起来,是和这个网络流中的最大流的量时相等的,同时这些被割断的水管(边)的最大容量加起来是尽可能最小的时候,就是我们所说的”最小割“。
按键说明:
1. Run Augmenting Path: 点击此处运行增广路。每点击一次运行一条路径直到结束。
2. Find Minimum Cut: 点击此处可以找到该网络流中的最小割。(注意:这个按钮只有在处理完所有增广路并得到最大流后才能点击,如果显示无法点击,请点击“Run Augmenting Path “按钮来继续运行)