HomeDeveloper toolsMaximum Flow and Minimum Cut

Maximum Flow and Minimum Cut

Find maximum source-to-sink flow with directed integer capacities.

Processing stays in your browser. Up to 60 vertices and 300 edges with nonnegative integer capacities. Parallel ordered edges aggregate their capacity. This is a static network model, not live bandwidth or routing control.

How to use the maximum flow and minimum cut

Start with the supplied example and review graph nodes and edge tuples, source node, sink node. Replace it with your own data, choose Run tool, and check the result against the method and limits below. Copy or download only after review; edits clear the previous output.

How the tool works

Edmonds–Karp repeatedly finds a shortest augmenting path in the residual graph. When no path remains, residual reachability identifies the source side and original crossing edges form a minimum cut.

Worked example

View the example inputs
Graph nodes and edge tuples
{"nodes":["A","B","C","D"],"edges":[["A","B",3],["A","C",2],["B","C",1],["B","D",2],["C","D",3]]}
Source node
A
Sink node
D

With source A and sink D, the default directed network carries five units of flow and its minimum cut also has capacity five.

Good to know

Up to 60 vertices and 300 edges with nonnegative integer capacities. Parallel ordered edges aggregate their capacity. This is a static network model, not live bandwidth or routing control.

Sources and implementation notes

Implemented by DevBricks Technologies. Method notes updated . References describe the underlying format, method or API. Local processing runs on your device. Any public provider queries are described above and start when you run the lookup.

Check the graph model before interpreting a path or allocation

Identify what each vertex and edge represents. Decide whether edges are directed, whether repeated edges are meaningful and what a weight measures. Distance, capacity, cost and elapsed time are different quantities. Start with a small graph you can draw on paper and include a disconnected vertex or a cycle when those structures matter to your problem.

Inputs and settings explained

Graph nodes and edge tuples
Paste the graph nodes and edge tuples as plain text using the demonstrated structure. Keep meaningful line breaks, quotation marks and separators. Start with a small representative example and increase its size only after the output is understood. Read the tool's restrictions before including unsupported syntax or binary data.
See the demonstration value
{"nodes":["A","B","C","D"],"edges":[["A","B",3],["A","C",2],["B","C",1],["B","D",2],["C","D",3]]}
Source node
Enter the source node exactly as required by the example. Check spelling, whitespace and any stated naming rules before running the operation. Use a small test value first; an accepted text field does not by itself establish that the value is appropriate for the system that will consume the result.
See the demonstration value
A
Sink node
Enter the sink node exactly as required by the example. Check spelling, whitespace and any stated naming rules before running the operation. Use a small test value first; an accepted text field does not by itself establish that the value is appropriate for the system that will consume the result.
See the demonstration value
D

How to review the result

Compare the reported vertices and edges with the supplied graph. A shortest path depends on the weight convention; a flow depends on capacities and the selected source and sink. Some problems permit several equally valid answers, so compare the objective value and constraints rather than expecting one particular ordering. A correct algorithm solves the encoded model, which may omit scheduling, geographic or organizational constraints present in the real task.

  • Check vertex identifiers, direction and whether weights can be negative for this method.
  • Verify that every reported edge exists and every reported constraint is respected.
  • Compare a small known graph before treating a larger result as a practical recommendation.

Common questions about this workflow

Why does another solver return a different ordering?

Several solutions can share the same objective value. Tie-breaking and input order can affect which one is returned. Compare the constraints and objective first; a different route or allocation is not automatically an error.

Does an unreachable vertex mean the real location cannot be reached?

It means no supported path exists in the supplied graph under the stated rules. Check missing edges, direction and source identifiers before drawing a conclusion about the real system.

Built by DevBricks Technologies. Found an unexpected result in Maximum Flow and Minimum Cut? Report a reproducible example with the tool URL, settings and a small sample that contains no private information.