Watts-Strogatz model (source code)

= Watts-Strogatz model
{c}
{wiki=Watts–Strogatz_model}

The <Watts-Strogatz model> starts with $n$ vertices arranged on a ring, each joined to a fixed even number $k$ of nearest neighbors. It then rewires one orientation of each original ring edge independently with probability $\beta$, choosing a new endpoint while avoiding loops and duplicate edges. The number of edges is preserved; individual degrees need not be.<Collective dynamics of small-world networks by Duncan J. Watts and Steven H. Strogatz>[model construction and characteristic path length/clustering plots]{ref}

At $\beta=0$ the graph is a regular ring lattice. A small positive rewiring probability introduces shortcuts that can sharply reduce typical path lengths while retaining substantial local clustering. This offers a mechanism for <small-world networks> with both properties. It is a model of a structural effect, not a claim that every observed network was generated by literal rewiring.