How the platform analyzes individual submarine cables — from basic failure impact to advanced graph-theoretic metrics.
Cable analysis is split into basic analysis (synchronous, fast — profile, connectivity, failure simulation) and advanced analysis (computed in a Web Worker — betweenness centrality, bridge index, alternative path richness, min-cut sets, global connectivity). Both operate on a country-level topology graph where nodes are countries and edges represent the set of submarine cables connecting them.
An undirected, unweighted graph where nodes are countries (ISO alpha-3 codes) and edges are sets of cables connecting each pair. A cable touching 4 countries creates 6 edges (all pairwise combinations) — a complete mesh (clique) per cable.
Each cable's landing points are resolved to their countries. For every pair of countries on the same cable, an edge is created (or the cable ID is added to an existing edge). The graph is a singleton, lazily built once at module import.
The graph is a complete-mesh per cable, not the actual physical route. A cable from Japan to the UK via India produces edges Japan-UK, Japan-India, and India-UK, even though Japan-UK traffic physically transits India. This overstates direct connectivity and deflates path lengths.
Use the segment topology graph (LP/BU/DBU nodes) for cable analysis too, or introduce edge weights reflecting physical distance and capacity.
Simulates removing the cable from the network and measures:
For each pair of the cable's connected countries (A, B): (1) Check if the edge A-B has only this cable. (2) Use BFS reachability with this cable blocked to check if A and B are still connected. (3) If still connected, run bounded BFS path enumeration (max 5 paths) to find alternative routes.
dependencyScore and criticalRouteCount are currently identical metricsN+2 failure simulation, probabilistic failure models based on cable age and repair history, capacity-aware impact assessment.
A score (0–100%) representing what fraction of country pairs depend on this cable for their shortest connectivity.
First, an all-pairs shortest hopstable is computed for the entire graph (BFS for every country pair). Then the cable is removed, and each pair involving at least one cable-connected country is rechecked. If the shortest hop count increases or the pair becomes unreachable, it is counted as "dependent." Score = dependent pairs / total reachable pairs.
This is not true betweenness centrality (which counts the fraction of shortestpaths passing through an edge). Instead it checks if the shortest hop distance changes when the cable is removed. This is a coarser but faster proxy — it misses cases where the cable carries some but not all shortest paths between a pair (same hop count via alternative routes).
Implement Brandes' algorithm for exact edge betweenness centrality. Cache global all-pairs computation in the Web Worker instead of recomputing per request.
Whether the cable is a bridge edge — meaning its removal fragments the network into multiple disconnected components. Reports the partition (which countries end up in each component).
Removes the cable from the graph, then runs BFS flood-fill to count connected components. If more components than the baseline, the cable is a bridge.
Operates on the country-topology graph, so a cable that is "redundant" at the country level might still be a bridge at the physical segment level (e.g., two cables share the same country connection but use completely different physical routes).
For every affected country pair (where hop distance changed): finds alternative paths, computes degradation ratios (new hops / original hops), and identifies the worst-affected pairs.
Runs findPaths(reducedGraph, a, b, 10) for each affected pair. Computes degradation = newHops / originalHops. Reports top 10 worst pairs and average degradation.
For each landing point of the cable, the minimum number of cables that must be cut to isolate that landing point's country from the network.
Uses Edmonds-Karp max-flow algorithm. For each country, runs max-flow from that country to each of its direct neighbors, with edge capacity = number of cables on that edge. The minimum flow across all neighbor targets is the min-cut, by the max-flow min-cut theorem.
minCablesToIsolate = 3Per-LP min-cut using the segment topology graph. Push-relabel algorithm for better performance on dense graphs.
Edge connectivity: Global minimum of all per-country min-cuts. Vertex connectivity: Uses vertex-splitting (each country becomes Cin and Cout with capacity-1 internal edge), then Edmonds-Karp from the minimum-degree node to its neighbors. Fiedler value: Lanczos iteration (up to 50 vectors) builds a tridiagonal matrix, then Sturm sequence bisection extracts the second-smallest eigenvalue.
All pathfinding uses BFS-based bounded enumeration. Paths are explored in BFS order (shortest first). A path extension is pruned if it exceeds the known shortest hop + 1. Cycles are avoided by checking visited nodes.
Bidirectional BFS for reachability checks, Yen's K-shortest-paths algorithm for topologically diverse path enumeration, edge-weighted BFS considering cable capacity.
Advanced analysis runs in a dedicated Web Worker. The worker builds the country graph on initialization, signals readiness, then processes analysis requests. Pre-computed results are served as static JSON from /data/analysis-cables/ when available (build-time generated).
The worker recomputes the entire global analysis (all-pairs shortest hops, all per-country min-cuts, Fiedler value) for every cable request. There is no caching between requests — navigating between cables quickly triggers redundant computation.
Cache global analysis in the worker after first computation. Compute global analysis once and reuse for all per-cable requests in the same session.