task_graph__adjacency__directed_pair_reciprocity_count¶
Summary¶
- Domain:
graph - Scene id:
adjacency - Task id:
task_graph__adjacency__directed_pair_reciprocity_count - Objective: count unordered node pairs in a directed adjacency matrix where both directed edges are present.
- Implementation:
src/trace_tasks/tasks/graph/adjacency/directed_pair_reciprocity_count.py.
Query IDs¶
single: count unordered pairs where both mirrored off-diagonal matrix cells are1.- Internal prompt key:
mutual_pair_count. - Public sampling is at the task-id level.
Taxonomy Contract¶
- Program contract: build the unordered off-diagonal node-pair candidate set, filter pairs whose two directed matrix cells are both present, count the filtered pairs, and annotate one mirrored-cell segment per counted pair.
- Stable schemas: answer is
integer; annotation issegment_set. target_count, node labels, node count, font, style, and matrix layout are generation/render metadata, not public query branches.
Program Contract¶
Program: count(filter(unordered_node_pairs, has_edge(source,target) and has_edge(target,source))); output=integer; annotation=segment_set(mutual_edge_cell_centers); scene=adjacency; scope=directed_pair_reciprocity_count
Candidate set: the visible graph, tree, network, route, matrix, table, node, edge, label, weight, path, and option elements inside the directed_pair_reciprocity_count objective scope.
Operands: visible scene state and prompt-bound operands named by filter, unordered_node_pairs, has_edge, source, mutual_edge_cell_centers, adjacency, directed_pair_reciprocity_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 segment_set schema; the prompt/annotation contract defines the minimal visual witnesses.
Query ids: single.
Reasoning Operations¶
Families: filtering, counting, logical_composition, topology
Answer And Annotation¶
- Answer type:
integer. - Annotation type:
segment_set. - Annotation marks one segment per counted unordered pair, using the centers of the two mirrored matrix cells.
- Zero-answer instances use an empty annotation array.
Rendering Contract¶
- The scene uses the graph-domain adjacency-matrix renderer.
- The graph is directed; rows point to columns.
- Diagonal cells are excluded from pair counting.
- Visual style, fonts, panel treatment, context text, and post-render noise are non-semantic and 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.