Lab

A hundred rewired links, and the world shrinks

Your friends mostly know each other. That is what a social network looks like up close β€” dense, cliquey, local. It should take a very long time for anything to cross a world built like that. It does not, and in 1998 Duncan Watts and Steven Strogatz showed why: take a perfectly regular ring where everyone knows only their neighbours, and rewire one link in a hundred at random. The cliques survive almost untouched. The distance across the whole thing falls by more than eighty per cent.

Jump to

1The ring, and what one shortcut does to it

Two hundred nodes in a circle, each joined to its eight nearest neighbours. The pale arcs around the rim are the original local links; a bright chord across the middle is a link that has been rewired to somewhere random. Slide p up from zero and count the chords β€” at p = 0.01 there are only about eight of them, and they are already enough. Watch the two numbers underneath move at completely different speeds.

original local link rewired shortcut node that gained a shortcut

2Two numbers that describe any network

Path length is how many hops separate two nodes picked at random. Clustering is the chance that two of your neighbours are also neighbours of each other β€” how cliquey the world is. A regular ring has both high. A random graph has both low. The bars below are for the ring drawn above; drag p and watch the left bar fall off a cliff while the right one barely moves. There is a wide range of p where that is true, and that range is what "small world" means.

3The graph from the 1998 paper

This is the real thing, computed here rather than copied: a thousand nodes, ten neighbours each, path length and clustering measured across the whole range of p and divided by their values at p = 0. Note the horizontal axis is logarithmic. The gap between the two curves β€” the region where path length has already collapsed but clustering has not β€” is the small-world regime, and it is enormous, spanning most of two decades of p. Nature does not have to tune anything finely to land in it.

path length L(p) / L(0) clustering C(p) / C(0)

4How far away is everybody?

Start at one node and count how many others are one hop away, two hops, three. On the ordered ring this is a long flat plateau β€” there are the same forty nodes at every distance, all the way out to fifty. Nudge p and it collapses into a spike: almost the entire network sits at the same small distance, and the tail vanishes. This is where "six degrees of separation" comes from, and why it feels surprising β€” it is not that the world is small, it is that the number of people you can reach multiplies rather than adds.

5Three real networks, measured

These are the three that Watts and Strogatz actually checked, and the figures are theirs. The test is the same each time: compare the real network with a random graph having the same number of nodes and the same average number of links. If the path length is about the same but the clustering is hundreds of times higher, you have a small world. Note the power grid β€” this is not only a social phenomenon, and a shortcut in a grid carries a failure just as efficiently as it carries current.

networknodes L actualL if randomC actualC if random C excess

What is measured here, and what a ring of nodes is not

Nothing on this page is a stored result. Every graph is built by the Watts–Strogatz procedure β€” start with a ring lattice, walk each of the NΒ·k/2 edges once, and with probability p move one end to a uniformly random node, refusing self-loops and duplicates β€” and then measured with breadth-first search from every node in turn. Randomness comes from a seeded mulberry32 generator, so a given seed always gives the same network. The checks: at p = 0 the measured path length is 50.4505 for N = 1000, k = 10, against an exact hand calculation of 50400/999 = 50.4505, and the measured clustering is 0.6667 against the closed form 3(kβˆ’2)/4(kβˆ’1) = 0.6667. At p = 0.01 path length falls to about 8.8 while clustering is still 0.647, which is 97 per cent of where it started. That is the entire result in one line.

Two honest caveats. At p = 0.01 only about fifty edges out of five thousand are rewired, so which fifty matters a great deal: across twenty-five seeds the path length ranges from 7.70 to 9.68, a spread of more than a hop and a half. Move the seed slider and you are seeing that genuine variance, not a bug. And the Watts–Strogatz model is deliberately a toy. Every node here has almost exactly the same number of links, whereas real social and web networks are wildly unequal β€” a few hubs with thousands of connections and a long tail with two or three. That inequality produces short paths by a completely different mechanism, and networks built that way behave very differently when you start removing nodes: they shrug off random failures and collapse when a hub is targeted. This model has no hubs, no geography, no groups, and no notion of a link being strong or weak.