aryagraph.algorithms.flow.minimum_cut#

aryagraph.algorithms.flow.minimum_cut(g: Graph, s: Hashable, t: Hashable, capacity: str | Callable[[Hashable, Hashable, dict], Any] = 'capacity') → CutResult[source]#

Minimum s–t cut (max-flow min-cut theorem); same arguments as maximum_flow().

The source side is every node still reachable from s in the residual network of a maximum flow (the cut closest to s). cut_edges lists, in edge order, every edge from the source side to the sink side; their capacities add up to value.