Ford Fulkerson Calculator

Find max flow quickly for any graph network. Enter edges, set your source and sink. Export results and share clean, printable reports in seconds.

Calculator

Use nodes 1..n. Limit keeps the solver fast.
Undirected adds capacity in both directions.
Starting node for flow.
Ending node for flow.
Example: S, A, B, C. Unfilled nodes keep default names.

Edges and capacities

From (u) To (v) Capacity c(u,v) Remove
Tip: Repeated edges between the same nodes are summed. Capacities must be positive.

Example data table

This common network has a maximum flow of 23 from S to T.

From To Capacity
SA16
SB13
AB10
BA4
AC12
BD14
CB9
DC7
CT20
DT4

Use Load sample to populate the form automatically.

Formula used

The method repeatedly finds an augmenting path in the residual graph and pushes flow by the path bottleneck.

  • Residual capacity: r(u,v) = c(u,v) − f(u,v)
  • Path bottleneck: Δ = min r(u,v) along the chosen path
  • Augment: f(u,v) ← f(u,v) + Δ and update reverse residual

This calculator uses a breadth-first search variant (Edmonds–Karp) to pick augmenting paths, producing a reliable maximum flow.

How to use this calculator

  1. Set the number of nodes and choose directed or undirected.
  2. Enter source and sink node numbers within 1..n.
  3. Add edges with positive capacities in the table.
  4. Optionally provide node labels to improve readability.
  5. Click Compute maximum flow to see results above the form.
  6. Use the download buttons to export CSV or PDF reports.

FAQs

1) What does maximum flow represent?

It is the largest transferable amount from source to sink while respecting edge capacity limits. It models routing, throughput, and allocation problems in networks.

2) Why do you show an augmenting path log?

The log lists each found path, its bottleneck, and the running total. It helps you debug inputs and understand how the final flow was built.

3) What is a residual graph?

It is a graph showing remaining capacity on each edge after current flow. Residual edges allow both pushing more flow forward and canceling flow backward.

4) How is the minimum cut related to max flow?

At optimum, the max flow value equals the capacity of a minimum s–t cut. The cut edges listed separate reachable nodes from unreachable nodes in the final residual graph.

5) Can I use non-integer capacities?

Yes. The solver accepts decimal capacities and outputs rounded values. For best stability, keep capacities within a reasonable numeric range.

6) What happens if I enter repeated edges?

Repeated edges between the same ordered pair are summed into one capacity. This is useful when multiple parallel links exist in your network.

7) Does undirected mode change the algorithm?

Undirected mode adds the same capacity in both directions, effectively treating each edge as two directed edges. Flow and cuts are then computed on that directed representation.

8) Why might the maximum flow be zero?

If there is no directed path from source to sink with positive capacities, no flow can be sent. Check connectivity, direction, and that capacities are greater than zero.

Related Calculators

topological sort calculatorminimum spanning tree calculatorgraph distance calculatorvertex degree calculatorconnected components counterfloyd warshall calculatoreulerian path calculator

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.