Maximum flow & minimum cut
Calculate directed network throughput and inspect augmenting paths and residual capacities.
About this tool
Enter directed edges between S, A, B, C, D and T as S -> A 10; S is the source and T the sink. Comma or dot decimals are accepted, up to six decimal places. Capacities may be zero; each directed pair totals at most 1000000. Blank lines are ignored and parallel lines are summed. A disconnected sink gives maximum flow zero. Raw input, including unfinished or invalid networks, and animation delay are saved locally. Reload waits for an action; calculation progress is not saved. The diagram uses up to three significant digits; ≈ marks rounding. Hover an edge or open Edge details for the full displayed precision. Hiding the page pauses animation until you explicitly resume.
Calculate finds the final maximum flow immediately. Step continues by one shortest augmenting path; Animate continues the same calculation and Pause stops it. Restart clears flow on the current input. Editing stops animation and removes old results. The reverse-edge example shows how a residual path can cancel an earlier choice instead of becoming stuck.
Diagram labels are flow/capacity. Orange edges show the latest residual path; a dashed edge is traversed backwards. At completion red edges cross the minimum cut and blue outlines identify the S-side. The partition lists the S-side before the bar and the T-side after it. Cut capacity equals maximum flow. Edge details provide accessible numeric values, including both residual directions. With opposing original edges, residual capacity combines unused forward capacity and cancellable opposite flow; displayed edge flows use a feasible representation with opposite flows cancelled.
Edmonds–Karp uses breadth-first search in the residual graph. The drawing has six fixed nodes; dense custom graphs can have crossing labels, so use the detail table. Fractional arithmetic uses JavaScript floating point and may round in the last digits. Princeton: maximum flow.