πŸ•Έ

Watts–Strogatz Small World Network

Move the rewiring slider from 0 β†’ 1 to watch a ring lattice collapse into a small world, then into a random graph.

What is this?

Imagine every person in a village knows only their 4 nearest neighbours β€” the people right next to them in a ring. To send a message across the village takes many hops. Now randomly swap a few of those local connections for long-distance friendships. Suddenly the whole village is reachable in just a few hops β€” yet most people still mostly know their neighbours.

That's the small world effect. It explains why social networks, power grids, and even brain connections all have this same property: highly clustered locally, but surprisingly short paths globally. Move the Rewiring (p) slider from 0 β†’ 1 to watch the transformation happen live.

How to read the data
  • Graph canvas: Nodes sit in a ring. Grey lines are original local connections. Glowing blue lines are rewired (long-distance) shortcuts. Hover any node to highlight its neighbours.
  • L β€” Average Path Length: Average number of hops to get from any node to any other node. Watch this drop sharply as soon as even a few edges are rewired.
  • C β€” Clustering Coefficient: How many of your neighbours also know each other (0 = none, 1 = all). This drops much more slowly than L β€” that's the key asymmetry.
  • L/Lβ‚€ and C/Cβ‚€: Both metrics normalised against the pure lattice (p=0). The "sweet spot" is where L/Lβ‚€ is near 0.2 while C/Cβ‚€ is still near 0.8 β€” that's a small world.
  • Phase transition chart: Precomputed L (blue) and C (green) across all rewiring values on a log scale. The wide gap between the two curves is exactly the small world regime.
  • Find Shortest Path: Click the button, then click two nodes to highlight the shortest route in yellow. Compare path length at p=0 vs p=0.1.
Hover a node to see its neighbors