Documentation
¶
Overview ¶
Example 13_network_reliability — two resilience analyses over ONE synthetic communication backbone, derived from a single capacitated edge list:
- Structural single points of failure — the articulation points (gateway sites) and bridges (links) whose individual loss partitions the network, found with search.HopcroftTarjanBCC over an immutable CSR snapshot.
- Throughput and its bottleneck — the maximum flow from a source site to a sink site via Dinic's max-flow (search/flow), followed by the minimum cut: the saturated links that cap that throughput.
Both analyses run on the SAME node set and the SAME capacitated edge list. The structural analysis sees the links through a CSR snapshot; the flow analysis sees the very same links as a capacitated flow.Network indexed by the same node space, so the two views describe one network rather than two unrelated graphs.
Topology ¶
The backbone is a deterministic, seeded "transit-stub" clustered network. The model is grounded in the Internet-topology literature — the GT-ITM transit-stub model (Zegura, Calvert & Bhattacharjee, "How to Model an Internetwork", IEEE INFOCOM '96; tool: Calvert & Zegura, "GT-ITM: Georgia Tech Internetwork Topology Models"). Intra-cluster density follows the planted-partition (stochastic block model) intuition p_in >> p_out; a Hamiltonian cycle per cluster is added to GUARANTEE 2-vertex-connectivity, which the SBM only gives probabilistically. Min-cut == max-flow is the Ford-Fulkerson theorem (Ford & Fulkerson 1956; CLRS ch. 26).
The topology is built so that, for every seed, it has genuine reliability structure that both analyses can observe:
- K dense clusters of s sites each, laid out as a Hamiltonian cycle plus c random chords. The cycle alone makes a cluster 2-vertex-connected: removing any single site leaves a path on the rest, so a cluster has NO internal articulation point and NO internal bridge. Adding chords keeps it 2-connected (open-ear decomposition theorem) and raises intra-cluster capacity well above the inter-cluster boundaries.
- The clusters form a spine PATH (cluster 0 .. K-1). Consecutive clusters are joined by w_i parallel inter-cluster links: one interior boundary is deliberately the NARROWEST (exactly two links), every other spine boundary has three or more. Because the cluster graph is a tree (a path), every spine boundary is a genuine source-to-sink cut.
- One extra STUB cluster hangs off a spine cluster by a SINGLE link. Because the cluster graph stays a tree, that single link is the unique path to the stub: it IS a bridge and BOTH its endpoints ARE articulation points. The stub sits OFF the source-sink spine, so the bridge never enters the source-sink min-cut.
- Capacities are stratified H >> M > L (intra-cluster H, spine link M, bridge link L). The source is an interior site of cluster 0 and the sink an interior site of cluster K-1, each with intra-degree >= 3, so their incident capacity dwarfs any boundary. This defeats the trivial "isolate the source/sink" degree cut and forces the global min-cut to be the narrowest interior spine boundary — a SET of two saturated links, strictly cheaper than either terminal's incident capacity.
The deterministic facts this produces — the articulation-point count, the bridge count, the max-flow value, the min-cut size, and the max-flow == min-cut equality — are pinned by the regression test. They are reproducible for a fixed -seed; only the telemetry (lines prefixed with "# ") varies between runs and machines.
Scale ¶
Run with no flags the example builds a small, fast, deterministic default (5 spine clusters of 8 sites, ~45 sites). Every dimension is a flag, so the same binary scales up to where the analyses' wall-clock and heap footprint become observable:
go run ./examples/13_network_reliability -clusters 200 -cluster-size 64 -seed 7
Why in-memory ¶
The example measures structural-analysis and max-flow wall-clock and the live-heap footprint of the snapshot and flow network, so it builds everything in memory. It does not exercise the WAL/recovery stack; persistence is demonstrated by examples 04, 17, 24 and 25.