task_graph__adjacency__undirected_component_count¶
Summary¶
- Domain:
graph - Scene id:
adjacency - Task id:
task_graph__adjacency__undirected_component_count - Objective: count connected components in an undirected adjacency representation.
- Implementation:
src/trace_tasks/tasks/graph/adjacency/undirected_component_count.py.
Query IDs¶
single- Internal prompt key:
undirected_component_count. - Public sampling is at the task-id level.
Taxonomy Contract¶
- Program contract: compute connected components of the undirected adjacency graph, count the components, and annotate the topmost displayed row label for each component.
- Stable schemas: answer is
integer; annotation isbbox_set. - Adjacency list versus matrix display, component count target, node labels, node count, font, style, and layout are generation/render metadata, not public query branches.
Program Contract¶
Program: count(connected_components(undirected_adjacency_graph)); output=integer; annotation=bbox_set(component_representative_row_labels); scene=adjacency; scope=undirected_component_count
Candidate set: the visible graph, tree, network, route, matrix, table, node, edge, label, weight, path, and option elements inside the undirected_component_count objective scope.
Operands: visible scene state and prompt-bound operands named by connected_components, undirected_adjacency_graph, component_representative_row_labels, adjacency, undirected_component_count.
Operation: evaluate count 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 bbox_set schema; the prompt/annotation contract defines the minimal visual witnesses.
Query ids: single.
Reasoning Operations¶
Families: filtering, counting, topology
Answer And Annotation¶
- Answer type:
integer. - Annotation type:
bbox_set. - Annotation marks the topmost displayed row label in each connected component.
- Count tasks require
answer_gt.value == len(annotation_gt.value)unless the annotation schema is keyed or sequence based.
Rendering Contract¶
- The scene uses the graph-domain renderer for
adjacency. - Visual style, fonts, panel treatment, layout jitter, and post-render noise are non-semantic and must be recorded in trace metadata.
- Annotation projection is computed after final layout and style placement.
Prompt Contract¶
- Prompt text comes from graph prompt templates and scene config, not hardcoded user-facing text.
- Answer mode emits
{"answer": ...}. - Answer-and-annotation mode emits
{"annotation": ..., "answer": ...}with annotation matching the schema above.