2.9. Lecture 8: Small world graphs¶
Before this class you should:
Read Think Complexity, Chapter 3
Read the Wikipedia page on the Small-world Experiment https://en.wikipedia.org/wiki/Small-world_experiment
Read Watts and Strogatz “Collective Dynamics of ‘small world’ networks” http://www.nature.com/nature/journal/v393/n6684/full/393440a0.html
Before next class you should:
Read Think Complexity, Chapter 4, and answer the following questions:
The probability mass function (PMF) plotted in Figure 4.1 is a normalized version of what other kind of plot?
What is the continuous analogue of the PMF?
Note taker: Aditya Thomas
2.9.1. Overview¶
This lecture introduced small world graphs and explained why many real-world networks exhibit both strong local clustering and short global path lengths. We explored how classical graph models fail to capture both properties at the same time and how the Watts–Strogatz model provides a useful explanation.
The lecture connected ideas from social science, graph theory, and complexity science to demonstrate how small structural changes in a network can lead to large-scale effects.
2.9.2. Stanley Milgram and the Small World Experiment¶
Stanley Milgram (1933–1984) was an American social psychologist known for several influential experiments in social science.
One of these was the Small World Experiment, which led to the idea of six degrees of separation. This concept suggests that any two people in the world can be connected through a small number of intermediate social connections.
We discussed how modern social media platforms may further reduce the effective number of degrees of separation by introducing long-range connections between people who would otherwise belong to separate social groups.
The lecture also touched on how authority, appearance, and perceived status can influence how information is received, and how these ideas relate to modern technologies such as AI-assisted communication.
2.9.3. Regular Graphs and Random Graphs¶
We reviewed two classical graph models and their limitations when applied to real-world networks.
- Regular graphs
In a regular graph, every node has the same number of neighbours (degree). These graphs typically exhibit high clustering, but long average path lengths.
- Random graphs (Erdős–Rényi)
In random graphs, edges are created with a fixed probability. These graphs generally have short average path lengths, but low clustering.
Neither model alone accurately represents many real-world networks.
Regular graphs preserve strong local structure but do not produce the short global distances observed in social and biological networks. Random graphs produce short path lengths, but they lack the tight clustering patterns that characterize real communities. Real-world networks typically exhibit both properties simultaneously.
Example: Generating and visualizing a regular graph (ring lattice)
lattice = make_ring_lattice(10, 4)
nx.draw_circular(lattice, with_labels=True)
Example: Generating and visualizing an Erdős–Rényi random graph
random_graph = make_random_graph(10, 0.3)
nx.draw_circular(random_graph, with_labels=True)
2.9.4. Clustering¶
Clustering measures how likely it is that two neighbours of a node are also connected to each other.
Qualitative comparison:
Regular graphs have high clustering.
Random graphs have low clustering.
Small world graphs maintain relatively high clustering for small values of
p.
This property reflects the tendency of real-world networks to form tight local groups.
2.9.5. Shortest Path Lengths¶
Shortest path length measures the minimum number of edges required to travel between two nodes.
We observed that:
Regular graphs have long average path lengths.
Random graphs have short average path lengths.
Small world graphs experience a rapid decrease in path length once shortcut edges are introduced.
This explains how networks can be both locally clustered and globally well-connected.
2.9.6. Ring Lattice¶
A ring lattice is a type of regular graph used as the starting point for the Watts–Strogatz model.
Construction:
Nodes are arranged in a ring.
Each node is connected to its nearest neighbours.
Modulus arithmetic is used to wrap connections around the ring, for example using expressions such as
(i + 1) % n.
Ring lattices have high clustering but require many steps to reach distant nodes in the network.
Example: Building a ring lattice
def adjacent_edges(nodes, halfk):
n = len(nodes)
for i, u in enumerate(nodes):
for j in range(i + 1, i + halfk + 1):
v = nodes[j % n]
yield u, v
def make_ring_lattice(n, k):
G = nx.Graph()
nodes = range(n)
G.add_nodes_from(nodes)
G.add_edges_from(adjacent_edges(nodes, k // 2))
return G
2.9.7. Watts–Strogatz Small World Graphs¶
Watts and Strogatz proposed a generative model to bridge the gap between regular and random graphs.
The process is as follows:
Start with a ring lattice.
For each edge, rewire one end of the edge with probability
pto a randomly selected node, while avoiding self-loops and duplicate edges.
Interpretation of p:
p = 0produces a regular graph.Small values of
pintroduce a small number of long-range shortcuts.Large values of
pproduce graphs similar to random graphs.
A key result is that even a small amount of rewiring can dramatically reduce average path length while preserving much of the original clustering.
2.9.8. The Watts–Strogatz Experiment¶
Watts and Strogatz analyzed their model by varying the rewiring probability
p and observing how network properties change.
As p increases:
Average path length decreases rapidly.
Clustering decreases more gradually.
The region where clustering remains high while path length is low corresponds to a small world network.
2.9.9. Generative Explanations¶
Small world graphs provide a generative explanation rather than a purely descriptive one.
Instead of only describing the structure of a network, the Watts–Strogatz model explains how such a network could arise through a simple rewiring process. This aligns with complexity science, where models are often used to explain emergent behaviour rather than make exact predictions.
2.9.10. Breadth-First Search¶
Breadth-First Search (BFS) was introduced as a method for computing shortest paths in unweighted graphs.
BFS explores nodes layer by layer and is used as a building block to compute shortest paths and average path length in small world networks.
2.9.11. Dijkstra’s Algorithm¶
Dijkstra’s algorithm extends shortest-path analysis to weighted graphs, where edges may represent costs such as distance, time, or effort.
This algorithm is useful for analysing more realistic networks in which not all connections are equal.
2.9.12. Summary¶
In this lecture, we learned that:
Many real-world networks are neither purely regular nor purely random.
Small world graphs combine high clustering with low average path length.
The Watts–Strogatz model demonstrates how simple local changes can produce large global effects.
Generative models play an important role in complexity science by explaining how observed network structures may form.