Edmonds Karp Algorithm Calculator

Enter directed edges, capacities, source, and sink. Run breadth first paths with exact bottleneck updates. Review max flow, cuts, residuals, and export clean reports.

Calculator Inputs

Use: from to capacity. Commas also work.

Example Data Table

Paste these rows into the edge list box to test the calculator.

From To Capacity
SA10
SC10
AB4
AC2
CA2
CD9
DB6
BT10
DT10

Formula Used

The calculator uses the Edmonds Karp method, which is a breadth first search version of Ford Fulkerson.

Residual capacity: r(u, v) = c(u, v) - f(u, v) + f(v, u)

Bottleneck: Δ = min r(u, v) over every edge on the chosen path.

Flow update: add Δ along the augmenting path. Reverse existing opposite flow first when needed.

Maximum flow: repeat BFS until no augmenting path remains from source to sink.

Minimum cut check: after the final search, find nodes still reachable from the source in the residual network.

How to Use This Calculator

  1. Enter each directed edge on a new line.
  2. Use the format: start node, end node, capacity.
  3. Enter the exact source and sink names.
  4. Set decimal places and capacity multiplier if needed.
  5. Enable residual output for deeper study.
  6. Press the calculate button.
  7. Review max flow, paths, edge flows, and cut details.
  8. Use the CSV or PDF button to save your report.

About the Edmonds Karp Algorithm

The Edmonds Karp algorithm solves a maximum flow problem. It finds the greatest possible flow from one source node to one sink node. Each directed edge has a capacity. Flow cannot exceed that capacity. The method is based on Ford Fulkerson. Its special rule is simple. It always chooses the shortest augmenting path by using breadth first search.

Why the Method Is Useful

This rule makes the process predictable. It avoids the random behavior found in some path choices. Each iteration explores the residual network. The residual network shows where more flow can still move. It also shows where earlier flow can be reversed. The calculator lists every path, bottleneck, and cumulative flow value. This helps students follow the method step by step.

How the Calculator Helps

Manual work can become long when a graph has many edges. A single missed residual update can change the final answer. This tool reduces that risk. Enter edges as from node, to node, and capacity. Then choose the source and sink. The result shows maximum flow, final edge usage, residual values, and a minimum cut. These outputs give a complete network view.

Interpreting the Result

The maximum flow is the total amount leaving the source. It also equals the total amount entering the sink. The minimum cut confirms the same value when the solution is optimal. Edges crossing from reachable nodes to unreachable nodes form that cut. Their combined capacity matches the maximum flow.

Study and Planning Use

This calculator is useful for maths practice, operations research, logistics, routing, and network design examples. It can model pipes, roads, data links, task assignment limits, or supply paths. The CSV report supports spreadsheet review. The PDF report is helpful for notes and class submissions.

Input Tips

Good input matters. Keep node names consistent. Avoid hidden spaces. Use one directed edge per row. Parallel edges are allowed. The calculator combines them into one capacity. Zero capacity edges are ignored by the search, yet they can still explain a model. Decimal capacities are accepted for learning examples. For formal integer network problems, use whole numbers. Always check whether the source and sink are named exactly as entered. Review unusual results before using them formally.

FAQs

What does this calculator find?

It finds the maximum possible flow from a selected source node to a selected sink node in a directed capacity network.

What input format should I use?

Use one edge per line. Write the starting node, ending node, and capacity. Spaces, commas, and semicolons are accepted.

Can I use decimal capacities?

Yes. Decimal capacities work for learning and modeling. Use whole numbers when your class or problem requires integer capacities.

What is a bottleneck?

The bottleneck is the smallest residual capacity on an augmenting path. It controls how much extra flow can be added.

Why does the algorithm use BFS?

BFS chooses the shortest augmenting path by edge count. This makes Edmonds Karp predictable and gives a clear iteration bound.

What is residual capacity?

Residual capacity shows how much more flow can move through an edge. It also includes possible reversal of earlier flow.

What does the minimum cut mean?

The minimum cut separates reachable nodes from unreachable nodes after the final residual search. Its capacity should equal maximum flow.

Can parallel edges be entered?

Yes. If the same directed edge appears more than once, the calculator combines those capacities into one total capacity.

Related Calculators

Paver Sand Bedding Calculator (depth-based)Paver Edge Restraint Length & Cost CalculatorPaver Sealer Quantity & Cost CalculatorExcavation Hauling Loads Calculator (truck loads)Soil Disposal Fee CalculatorSite Leveling Cost CalculatorCompaction Passes Time & Cost CalculatorPlate Compactor Rental Cost CalculatorGravel Volume Calculator (yards/tons)Gravel Weight Calculator (by material type)

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.