agenticraft_foundation.topology.connectivity¶
Graph connectivity analysis — vertex connectivity, edge connectivity, bridge detection, and connected components.
Network connectivity analysis for distributed systems.
This module provides tools for analyzing and verifying network connectivity properties important for distributed consensus and fault tolerance.
Key concepts: - k-connectivity: Graph remains connected after removing any k-1 nodes - Vertex cuts: Minimum set of vertices whose removal disconnects the graph - Robustness: Ability to maintain connectivity under failures
ConnectivityAnalysis
dataclass
¶
Results of connectivity analysis.
| ATTRIBUTE | DESCRIPTION |
|---|---|
is_connected |
Whether graph is connected
TYPE:
|
vertex_connectivity |
Minimum nodes to remove to disconnect (κ)
TYPE:
|
edge_connectivity |
Minimum edges to remove to disconnect (λ)
TYPE:
|
articulation_points |
Nodes whose removal disconnects the graph
TYPE:
|
bridges |
Edges whose removal disconnects the graph
TYPE:
|
k_connected |
Maximum k for which graph is k-connected
TYPE:
|
biconnected_components |
List of biconnected component node sets
TYPE:
|
strongly_connected |
Whether graph is strongly connected (for directed)
TYPE:
|
weakly_connected |
Whether underlying undirected graph is connected
TYPE:
|
FaultToleranceAnalysis
dataclass
¶
Analysis of fault tolerance capabilities.
| ATTRIBUTE | DESCRIPTION |
|---|---|
crash_tolerance |
Maximum crash failures tolerable (f < n/2)
TYPE:
|
byzantine_tolerance |
Maximum Byzantine failures (f < n/3)
TYPE:
|
critical_nodes |
Nodes whose failure most impacts connectivity
TYPE:
|
redundancy_score |
Score indicating redundancy level (0-1)
TYPE:
|
suggested_redundancy |
Suggested edges to improve fault tolerance
TYPE:
|
summary()
¶
Generate human-readable summary.
ConnectivityAnalyzer
¶
Analyzes network connectivity properties.
__init__(graph)
¶
Initialize analyzer with graph.
| PARAMETER | DESCRIPTION |
|---|---|
graph
|
Network graph to analyze
TYPE:
|
analyze()
¶
Perform full connectivity analysis.
| RETURNS | DESCRIPTION |
|---|---|
ConnectivityAnalysis
|
ConnectivityAnalysis with results |
analyze_fault_tolerance()
¶
Analyze fault tolerance capabilities.
| RETURNS | DESCRIPTION |
|---|---|
FaultToleranceAnalysis
|
FaultToleranceAnalysis with results |
verify_consensus_requirements(graph, fault_model='crash', f=1)
¶
Verify graph meets consensus requirements for given fault model.
| PARAMETER | DESCRIPTION |
|---|---|
graph
|
Network graph
TYPE:
|
fault_model
|
Type of failures ("crash" or "byzantine")
TYPE:
|
f
|
Number of failures to tolerate
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
tuple[bool, str]
|
Tuple of (meets_requirements, explanation) |