edmonds_karp
Compute maximum flow and minimum cut in a flow network from source to sink using a BFS-based Ford-Fulkerson algorithm, with edges given as capacity triples.
Instructions
Compute maximum flow and minimum cut in a flow network using the Edmonds-Karp (BFS-based Ford-Fulkerson) algorithm.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sink | No | Sink vertex (default: vertices - 1) | |
| edges | Yes | Edges as [from, to, capacity] triples | |
| source | No | Source vertex (default: 0) | |
| vertices | Yes | Number of vertices |