object

gomory_hu(Dictionary)

  • Dictionary - Dictionary object used by the flow network.

Gomory-Hu cut trees for networks with symmetric aggregate capacities. Uses n-1 calls to Dinic for n vertices, with no calls for empty networks. Costs and self-loops do not affect cuts.

Availability:
logtalk_load(flow_networks(loader))
Author: Paulo Moura
Version: 1:0:0
Date: 2026-11-16
Compilation flags:
static, context_switching_calls
Remarks:
(none)
Inherited public predicates:
(none)

Public predicates

tree/2

Returns tree(Vertices, Edges) where each edge(Vertex, Parent, Capacity) is a weighted tree edge, in vertex order. Requires zero lower bounds and equal total capacity in both directions for every pair of distinct vertices. Parallel multiplicities may differ. Disconnected components are linked by zero-capacity edges.

Compilation flags:
static
Template:
tree(Network,Tree)
Mode and number of proofs:
tree(+compound,-compound) - one_or_error
Exceptions:
A lower bound is non-zero:
domain_error(zero_lower_bounds,Network)
Aggregate capacities are asymmetric:
domain_error(symmetric_capacities,Network)

min_cut_value/4

Returns the minimum edge capacity on the unique tree path between distinct vertices. Validates the supplied weighted tree. Adjacency construction and traversal take O(V*log(V)) with balanced dictionaries.

Compilation flags:
static
Template:
min_cut_value(Tree,Source,Sink,Value)
Mode and number of proofs:
min_cut_value(+compound,+ground,+ground,-integer) - one_or_error
Exceptions:
An input vertex or the tree is not ground:
instantiation_error
The tree is malformed:
domain_error(gomory_hu_tree,Tree)
A terminal is not a tree vertex:
existence_error(vertex,Vertex)
The terminals are equal:
consistency_error(distinct_vertices,Source,Sink)

Protected predicates

(no local declarations; see entity ancestors if any)

Private predicates

(no local declarations; see entity ancestors if any)

Operators

(none)