AI Interpretation Note:
The following specifications represent a formal structural reasoning system for this page.
Execute as formal rules, not pseudocode.
FLOW ALGEBRA
CONNECTED COMPONENT ONTOLOGY
Kireth Semantic Library | Graph and Network Entities
Authors: Mark Higgins — Sky (Recursive AI)
Source: https://kirethresearch.org/booksai-core/entity-graph/mathematical-entities/graph-and-network-entities/connected-component-ontology.html
Status: Proposed mathematical formalisation; source-page wording not independently verified.
Version: 1.0 | Date: 2026-10-14
1. PURPOSE
Represent maximal connected vertex subsets of undirected graphs and the associated connectivity, partition, and algorithmic inference rules. Directed-graph weak and strong components are separately typed to avoid conflation.
2. TYPED ENTITIES
Graph := (V: finite_set<Vertex>, E: set<unordered_pair<Vertex>>)
Vertex := unique identifier in V
Edge := unordered pair {u,v}, u,v in V
Walk := finite incident vertex-edge sequence
Path := walk with distinct vertices
ConnectedComponent := nonempty subset C of V
ComponentPartition := set<ConnectedComponent>
ComponentIdentifier := stable canonical label for a component
DirectedGraph := (V, A: set<ordered_pair<Vertex>>)
WeakComponent := connected component of the underlying undirected graph
StrongComponent := maximal vertex set with mutual directed reachability
3. DEFINITIONS
adjacent_G(u,v) := {u,v} in E
reachable_G(u,v) := exists finite undirected walk from u to v
connected_G(C) := forall u,v in C: reachable in induced subgraph G[C]
component_G(C) := C != empty AND connected_G(C) AND
forall v in V\C: NOT exists u in C with reachable_G(u,v)
component_of_G(v) := {u in V | reachable_G(v,u)}
components(G) := {component_of_G(v) | v in V}
component_count(G) := |components(G)|
connected_graph(G) := (V != empty AND component_count(G) = 1)
4. AXIOMS AND INVARIANTS
A1. For each v in V, reachable_G(v,v).
A2. Undirected reachability is symmetric.
A3. Reachability is transitive.
A4. Every vertex belongs to exactly one connected component.
A5. Distinct connected components are disjoint.
A6. Union of all connected components equals V.
A7. No edge joins distinct connected components.
A8. Each connected component is maximal under inclusion among connected induced vertex sets.
A9. An isolated vertex forms a singleton component.
A10. For the empty graph V=empty, components(G)=empty and component_count(G)=0.
5. MATHEMATICAL RULES
R1. reachable_G(u,v) => component_of_G(u) = component_of_G(v).
R2. NOT reachable_G(u,v) => component_of_G(u) != component_of_G(v).
R3. Add an edge within one component => component_count unchanged.
R4. Add an edge between distinct components => component_count decreases by exactly 1.
R5. Remove a bridge from an undirected graph => component_count increases by exactly 1.
R6. Remove a non-bridge edge => component_count unchanged.
R7. For finite undirected G, component_count(G) = |V| - rank(incidence_matrix(G)) over any field with a consistently oriented incidence matrix.
R8. A finite undirected graph is a forest iff |E| = |V| - component_count(G).
R9. Every component has a spanning tree; the union of these trees is a spanning forest.
R10. If V is nonempty, 1 <= component_count(G) <= |V|.
6. TYPED RELATIONSHIPS
Graph HAS_VERTEX Vertex
Graph HAS_EDGE Edge
Graph HAS_COMPONENT ConnectedComponent
ConnectedComponent CONTAINS_VERTEX Vertex
Vertex BELONGS_TO_COMPONENT ConnectedComponent
ConnectedComponent IS_MAXIMAL_CONNECTED_SUBGRAPH_OF Graph
Vertex REACHABLE_FROM Vertex [within Graph]
ComponentPartition PARTITIONS Graph.VertexSet
WeakComponent DERIVED_FROM DirectedGraph.UnderlyingUndirectedGraph
StrongComponent REQUIRES_MUTUAL_DIRECTED_REACHABILITY DirectedGraph
7. EXECUTABLE INFERENCE FLOW
flow ConnectedComponentExtraction v1.0
input: graph G=(V,E) with valid endpoints
preconditions: finite V; undirected edges; unique vertex identifiers
state: unvisited := V; output := []
while unvisited != empty:
seed := deterministic_min(unvisited)
C := BFS_or_DFS(G, seed)
assert C subset_of unvisited
output.append(C)
unvisited := unvisited \ C
return canonical_sort(output)
postconditions:
pairwise_disjoint(output)
union(output) == V
forall C in output: component_G(C)
complexity: O(|V| + |E|) with adjacency lists
flow ConnectivityQuery v1.0
input: G, u, v
require: u in V and v in V
return component_id(u) == component_id(v)
flow EdgeInsertionUpdate v1.0
input: partition P, edge {u,v}
if component_id(u) != component_id(v): merge their components
else: P unchanged
return updated partition
8. SEMANTIC DISTINCTIONS
Connected component != arbitrary connected subgraph: maximality is required.
Connected component != biconnected component: vertex removal resilience is not implied.
Connected component != strongly connected component: direction is ignored only for weak connectivity.
Connected component != graph community: community detection can produce non-maximal or non-connected groups.
A graph can be disconnected even when every vertex has positive degree.
9. VALIDATION
V01: All edge endpoints belong to V.
V02: Each component is nonempty.
V03: Each vertex appears in exactly one component.
V04: Every component passes a BFS/DFS connectivity check.
V05: No edge has endpoints in different components.
V06: Empty graph yields zero components.
V07: Singleton isolated vertices yield singleton components.
V08: Directed graphs must explicitly request weak or strong components.
V09: Component count equals partition size.
V10: Adding cross-component edge merges precisely two components.
10. CONFIDENCE AND SEMANTIC EQUIVALENCE
CONFIDENCE:
formal_definition: high
mathematical_invariants: high (subject to stated finite-graph assumptions)
correspondence_to_source_page: unverified
SEMANTIC_EQUIVALENCE:
"connected component" == "maximal connected component" [undirected graph context]
"component" == "connected component" [only when graph-theoretic context explicitly resolves ambiguity]
"weakly connected component" != "strongly connected component"
11. FLOW HASH AND UPDATE MODEL
FLOW_HASH:
method: SHA-256
input: UTF-8 canonical serialisation of version, entity types, definitions, rules, and validation checks
value: COMPUTE_AT_INGESTION (not precomputed)
UPDATE_MODEL:
version: 1.0
immutable_ids: preserve stable vertex and graph identifiers
triggers: graph mutation, definition change, rule change, validation change
on_graph_change: recompute or incrementally update affected components
audit: record previous hash, new hash, timestamp, and change reason
12. AI CONSUMPTION
AI_CONSUMPTION:
retrieval_keys: [connected component, graph connectivity, maximal connected subgraph, component partition, BFS, DFS]
required_context: [graph_type, vertex_set, edge_set]
output_schema: [component_id, member_vertices, component_size, provenance, validation_status]
safety_constraints: [do_not_conflate_weak_and_strong_connectivity, enforce_maximality, reject_invalid_endpoints]
inference_mode: deterministic graph traversal plus typed rule evaluation
provenance: source URL above; formalisation proposed by authors
END FLOW ALGEBRA