Thought Toys · Emergence · Exhibit 41

Small-world networks

A ring where everyone only knows their nearest neighbors has painfully long social distance — to reach someone across the circle you cross half of it, one link at a time. Randomly reroute a tiny fraction of those links to strangers, and the whole network suddenly shrinks — without losing its tight local cliques.

The ring — nodes and their links lattice linkrewired shortcut

This ring so far: —

At a larger reference network (200 nodes), vs. rewiring probability path length ratioclustering ratio

your turn — drag past 0 and watch the ring's own numbers move

What you're seeing

Every node starts wired only to its nearest neighbors on a ring — an ordered lattice. It has two honest properties: it takes many hops to cross the ring (long average path length — the mean number of links on the shortest route between every pair of nodes), but any two friends of a friend are usually friends themselves (high clustering coefficient — how often a node's neighbors are also neighbors of each other). Drag the dial and each edge gets, independently, a small chance of being torn out and reattached to a uniformly random node anywhere on the ring — a "shortcut" (drawn in amber, cutting straight across the circle instead of hugging its rim).

Watch the amber path-length line in the lower chart: it falls off a cliff in the first sliver of the dial, while the cyan clustering line barely moves — a rewiring rate of just 1% already collapses the average distance to under two-thirds of its ordered value, while local clustering is still above 90% of what it was. That gap — short paths and tight local cliques, at the same time — is the "small world": Watts & Strogatz's 1998 answer to why acquaintance networks, neurons, and power grids can all be searched in only a handful of hops (the folk claim of "six degrees of separation") despite everyone mostly knowing only their immediate neighbors. Keep dragging toward 1 and the shortcuts pile up until almost nothing is left of the original ring — clustering keeps falling toward zero even as path length has nowhere further to go.

It isn't randomness alone that does this. A network wired entirely at random, with the same number of links as the ring, gets the short paths for free — but never the high clustering (verified below). The small-world effect needs both ingredients: an ordered base to keep local structure, and only a few long-range shortcuts layered on top.

The rule, exactly. Ring lattice: N nodes, each linked to its K nearest neighbors. Rewiring: for each edge, independently with probability p, move its far endpoint to a node drawn uniformly at random (no self-loops, no duplicate edges) — the standard Watts–Strogatz construction (1998). Verified in node (improve/verify/41-small-world.js): at p=0 the clustering coefficient matches the exact closed form 3(K−2)/(4(K−1)) to machine precision; at p=0.01 (N=200, K=6, averaged over trials) path length has already dropped below 65% of its ordered value while clustering stays above 90%; at p=1 clustering has collapsed below 15% of its ordered value. Negative control: a purely random graph with the identical node and edge count has short paths too (as cheap as the fully-rewired ring) but its clustering never exceeds about 15% of the lattice's — random wiring alone buys short paths, never the high-clustering "small world" combination.

Also in Emergence: The Ising model →

All 11 in Emergence
  1. 01Phantom Traffic Jams
  2. 02Schelling's Segregation
  3. 07Conway's Game of Life
  4. 11Percolation
  5. 15Reaction & diffusion
  6. 18Sandpiles & self-organized criticality
  7. 22Diffusion-limited aggregation
  8. 29The simplest rule that makes complexity
  9. 32Fireflies that sync
  10. 41Small-world networks — you are here
  11. 43The Ising model

← the cabinet · Thought Toys — a cabinet of explorable explanations. Exhibit 41.