NETWORKS / INTERACTIVE LAB

Network Resilience Lab.

Supply chains, power grids and computer systems are all networks: places joined by links. In this lab each place is a numbered dot, called a node. When one goes down, everything that went through it needs another way around. If there isn’t one, the network breaks into pieces. Knock out nodes and links to find the weak spots, where one failure splits the network. Then compare random breakdowns with someone attacking on purpose.

Networks · sites and links

Find the single points of failure

22 nodes · 39 links · 4 clusters

22 NODES · 39 LINKS · 1 PIECE

DRAG TO ROTATE · TAP A NODE

Node 6 is the busiest crossroads (betweenness 63.3 out of a possible 210). It sits on more of the shortest routes between other nodes than any other node does. Orange marks the busiest nodes, and size shows the score. Try removing node 6: tap it, or pick it in the table, then press Remove node.

Separate pieces1all 22 working nodes connected
Largest connected piece22100% of all 22 nodes
Single points of failure0none: no single node splits the network
Shortest route7 links0 → 16

Show

Node positions

No node selected

Tap a node in the view above, choose one here, or pick one from the table.

Links0 links removed · 0 nodes failed

Tap a link in the view above, or pick one from a node’s list of links.

Busiest crossroads · network as it is now

NodeClusterLinksCrossroadsvs originalSplits?
B463.30no
B548.60no
B443.40no
A437.30no
D430.90no
C429.20no
B427.90no
B526.70no

Crossroads score (betweenness): take each pair of other nodes and find the shortest routes between them. Count the share of those routes that pass through this node, then add that up over every pair. Across the whole network, the scores add up to 464.

Targeted attack vs random failure

Start from the original network (22 working nodes) and remove nodes one at a time. The chart follows the largest piece that’s still connected. Targeted: always remove the busiest crossroads, ranking them again after every removal. Initial ranking: use the ranking from the start and never update it. Random: 400 random removal orders, seeded so they come out the same every time.

  • Targeted, re-ranked each step R 0.205
  • Targeted, initial ranking R 0.275
  • Random, average · middle 80% of orders R 0.380
011220510152022nodes removedlargest piece

Hover, drag across the chart, or use the arrow keys to read the values.

Data table
RemovedTargetedNodeInitial rankRandom averageMiddle 80%
022–2222.022–22
12162121.021–21
213202019.920–20
312111018.719–19
41113917.314–18
579915.812–17
663814.310–16
752712.79–15
857611.07–14
931569.46–13
102158.15–11
112856.94–10
1221255.84–8
1321644.93–7
1411844.13–6
151043.42–5
161432.82–4
171522.31–3
1811021.91–3
1911411.51–2
2011711.11–2
2111911.01–1
2202100.00–0
Robustness · targeted0.205halved after 4 removals
Robustness · initial ranking0.275halved after 3 removals
Robustness · random (average)0.380average halved after 9 removals
Random seed11order shown in replay: 0, 2, 3, 10, 14…

The targeted attack cuts the largest connected piece in half after 4 removals. The average of the random orders takes 9. Sticking with the initial ranking does less damage over the whole run (robustness 0.275 vs 0.205), even though it halves the network sooner here. A ranking made for the original network goes out of date once parts of it are gone.

Robustness (R) measures how well the network holds together. At each step, take the share of the starting nodes still in the largest piece. R is the average of that over every step, from the first removal to the last. On the chart, it’s the area under the curve as a share of the whole chart. Lower means the network falls apart sooner. As a formula, R = (1/N) Σ Sk/N over k = 1…N removals. Here Sk is the size of the largest piece after k removals. Ending a replay puts the network back where it started.

Every number is worked out again each time you remove a link or a node. Remove a few links, then look again at the Crossroads, Single points of failure and Shortest route views. You’ll see the important nodes change, or the network come apart. Where a node sits in the picture means nothing. No number depends on it.

How the model works, how it’s checked and what it leaves out

How it works

In textbook terms, links are edges and pieces are connected components. Clusters are communities, and the crossroads score is betweenness centrality. Single points of failure are articulation points.

The network has 22 nodes and 39 links. Every link works both ways and counts the same (no direction, no weights). The nodes were sorted into four clusters by hand, and 9 of the links run between clusters. The pieces are found with breadth-first search (BFS), which spreads out from a node one step at a time. Single points of failure come from Tarjan’s “low-link” method. It’s a depth-first search, which follows each path as far as it goes. Then it checks whether each branch can reach back to earlier nodes without going through the node it hangs from.

Crossroads scores use Brandes’ algorithm, a fast way to count shortest routes. Each pair of nodes is counted once, and the scores aren’t scaled to a 0–1 range. The route shown is the first shortest route BFS finds.

Removing a node also removes every link that touches it, and the numbers then describe whatever is left. The attack removes the working node with the highest crossroads score right now, then works everything out again. Ties go to the node with more links, then the lower number. Random failure uses 400 random orders, drawn so every order is equally likely and seeded so they repeat.

The picture is laid out with a spring model (Fruchterman–Reingold): links pull like springs and nodes push each other apart. It runs 300 rounds, with a weak pull toward the original flat sketch. “Redraw after changes” runs 220 rounds on what’s left, starting from the original spots and pulled back toward them.

How it’s checked

Brandes’ method matches a slow check that counts every pair one by one, to within 1e-13 (0.0000000000001). That holds on the full network and on 600 random cut-down versions of it. The crossroads scores also add up to Σ(d − 1) over connected pairs. In words: for each pair that’s connected, take the number of links on their shortest route (d), subtract 1, and add it all up. Here that’s 464.

Tarjan’s method matches a slow check that removes each node in turn, on the same cut-down versions. Failing any single point of failure always adds to the number of pieces. Cutting the 9 links between clusters leaves exactly the four clusters.

Replaying any removal order gives the same largest-piece curve as the chart, at every step. R also matches the exact formulas for two simple shapes. It’s (N−1)/2N when every node links to every other node. It’s (N−1)/N² for a star (one hub linked to all the rest) attacked at the hub. Fixed seeds mean the layout and every curve come out the same every time.

What it leaves out

Real networks can have one-way links and links that matter more than others. Links can have limits on how much they carry, and some parts can stand in for others. This lab has none of that, and no actual flow. It also skips cascades, where a failed node’s load gets pushed onto its neighbours and overloads them too. Nothing gets repaired, and time doesn’t pass.

The crossroads score only counts shortest routes. And a smaller largest piece is a fact about the shape of the network, not a forecast of lost output. That depends on what the nodes and links actually stand for.

← Breakdowns & BackupsAll LabsQueueing & Staffing →

The Inner Universe

Still in the works.

I’m still writing this part of the site: a map of the big questions I keep coming back to. Check back soon.