task_graph__flow_network__max_flow_value¶
Summary¶
- Domain:
graph - Scene id:
flow_network - Task id:
task_graph__flow_network__max_flow_value - Objective: compute the maximum flow value from source
Sto sinkT. - Implementation:
src/trace_tasks/tasks/graph/flow_network/max_flow_value.py.
Query IDs¶
- Supported
query_idvalues:single - Internal prompt key:
max_flow_value. - Public sampling is at the task-id level.
Taxonomy Contract¶
- Program contract: read a directed capacity graph, find the unique minimum
S-Tcut, and return its capacity as the maximum-flow value. - Answer schema:
integer. - Annotation schema:
segment_set. - Node count, capacity values, cut-edge count, distractor-edge count, graph style, font, background, and layout transform are generation/render metadata, not public query branches.
Program Contract¶
Program: value(max_flow(source=S, sink=T, directed_capacity_graph)); output=integer; annotation=segment_set(unique_minimum_cut_edges); scene=flow_network; scope=max_flow_value
Candidate set: the visible graph, tree, network, route, matrix, table, node, edge, label, weight, path, and option elements inside the max_flow_value objective scope.
Operands: visible scene state and prompt-bound operands named by max_flow, source, S, sink, T, directed_capacity_graph, unique_minimum_cut_edges, flow_network, max_flow_value.
Operation: evaluate value over the candidate set using the visible graph structure, labels, weights, directions, reachability, paths, connectivity, or option-selection constraints encoded in the program expression; generation enforces a unique final answer.
Output binding: answer uses the integer schema; generation binds a unique final answer.
Annotation witnesses: annotation uses the segment_set schema; the prompt/annotation contract defines the minimal visual witnesses.
Query ids: single.
Reasoning Operations¶
Families: ranking, aggregation, topology
Answer And Annotation¶
- Answer type:
integer. - Annotation type:
segment_set. - Annotation marks every directed edge in the unique minimum
S-Tcut as a pixel-space segment between endpoint node centers. - The answer equals the sum of capacities on the annotated cut edges.
Rendering Contract¶
- The scene shows one directed capacity network with highlighted
SandTnodes. - Every visible directed edge has a readable integer capacity label.
- This objective uses a left-to-right identity layout transform and rejects rendered edge crossings so the directed flow channels are clear.
- Visual style, fonts, context text, background, and post-render noise are non-semantic and recorded in trace metadata.
- Annotation projection is computed after final graph layout and image-level variation.
Prompt Contract¶
- Prompt text comes from
src/trace_tasks/resources/prompts/graph/flow_network/graph_flow_network_v1.json. scene_key:capacity_network.task_key:flow_network_query.query_key:max_flow_value.- Answer mode emits
{"answer": ...}. - Answer-and-annotation mode emits
{"annotation": ..., "answer": ...}withannotationmatching thesegment_setschema.