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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"vertices": "<vertices>",
"edges": "<edges>"
},
"name": "edmonds_karp"
}
}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 |