Image: Daniel' (User:Dannie-walker), CC BY-SA 3.0Six degrees of separation, measured
In 1967 Stanley Milgram, a psychologist at Harvard, gave folders to a few hundred people in Nebraska and in the Boston area and asked each to get the folder to a target person, a stockbroker who worked in Boston, with one rule: send it only to someone you know on a first-name basis, who seems closer to the target than you are. Each sender added a card to the folder, so the folders that arrived carried their own history. Of 296 folders in the main study, 64 reached the target, and the completed chains passed through 5.2 intermediaries on average. Milgram published the first account in the magazine Psychology Today in 1967 and the full data with Jeffrey Travers in 1969.
The number six was in circulation long before. The Hungarian writer Frigyes Karinthy had a character in a 1929 short story bet that any two people on Earth could be linked by five acquaintances. The phrase six degrees of separation comes from a play of 1990 by John Guare. Milgram himself never used it, and his data do not quite support it: most folders never arrived, and a folder that stalls may have been on a long chain. The experiment is famous because it was the first time anyone had measured a social distance at all.
What is being measured
Take every person as a vertex and join two people by an edge when they know each other. The distance between two people is the number of edges on the shortest path between them, the number of handshakes needed to get from one to the other. Milgram's chains are upper bounds on distances, since a chain is a walk and the shortest path can only be shorter. The question of the small world is what the typical distance is in a graph with billions of vertices in which each vertex has only a few hundred neighbours.
Counting shows why the answer is small. If everyone has 100 acquaintances and acquaintances did not overlap, two steps would reach 10,000 people, three steps a million, and five steps ten billion, more than the planet. Acquaintances overlap heavily, which is why real distances are larger than four, and the overlap is the interesting part.
Watts and Strogatz
In 1998 Duncan Watts and Steven Strogatz published a model in Nature that captured the overlap. Start with people arranged in a ring, each joined to their few nearest neighbours; distances are enormous, proportional to the number of people, and every acquaintance of mine knows most of my other acquaintances. Now rewire a small fraction of the edges to random far-away vertices. Even one rewired edge in a hundred brings the average distance down to something close to a random graph's, while the local overlap stays almost unchanged. The model showed that a graph can be clustered and small at the same time, and that a few long-range edges do the work. Watts and Strogatz measured three real networks in the same paper, the collaboration graph of film actors, the power grid of the western United States, and the nervous system of a worm, and found all three clustered and small. Unit 8 of the Graph Theory Masterclass has the model and the table.
Two years later Jon Kleinberg asked a different question: why could Milgram's senders find short chains without a map of the network? His answer, which is the research spotlight of Unit 2, is that greedy forwarding works only when long-range acquaintances are distributed in a particular way, with the probability of knowing someone falling off as the square of the distance. The paper is free from the author's page.
4.74 on 721 million people
In November 2011 Lars Backstrom of Facebook and Paolo Boldi, Marco Rosa, Johan Ugander, and Sebastiano Vigna of the University of Milan measured the distances on the whole Facebook friendship graph of the time: 721 million active users and 69 billion friendship edges. The average distance was 4.74, so the typical pair of users was separated by 3.74 intermediaries, and 92 percent of pairs were within five steps. The paper, Four Degrees of Separation, is on the arXiv.
The method is breadth-first search, scaled up. Breadth-first search from one vertex visits its neighbours, then their neighbours, and so on in layers, and the layer in which a vertex is reached is exactly its distance from the start; Unit 2 proves this. Running it from every one of 721 million vertices was out of the question, so the authors used HyperANF, a probabilistic method that keeps for every vertex a tiny summary of the set of vertices within k steps and updates all the summaries in parallel, layer by layer, with the same logic as breadth-first search. The result is an estimate of the distance distribution with a controlled error, computed on one machine in a few hours.
Facebook repeated the measurement in February 2016 with 1.59 billion users and found an average distance of 4.57, which is 3.57 intermediaries, the number usually quoted. The graph had grown and the distances had shrunk, which is what the counting argument predicts: more users, more friends per user, shorter paths.
What the numbers do not say
A Facebook friendship is not a Milgram acquaintance, and a graph of one company's users is not the human race, so 3.57 is a measurement of one graph, not of society. The number of people with no account at all is in the billions, and a distance measured inside the giant component of a graph says nothing about people outside it. The 2011 paper is careful about this and about the fact that the average hides a wide spread: some pairs of users are a dozen steps apart.
What the numbers do establish is that the small world is real in the only graph where distances have been computed exactly, and that the mechanism Watts and Strogatz proposed is enough to explain it. The mathematics of why a graph with a few random long edges has short paths is in Unit 11, where the diameter of a random graph is shown to grow like the logarithm of the number of vertices.
Try it
The Stanford Large Network Dataset Collection, the tool of the week for Unit 8, offers the friendship graph of 4,039 Facebook users with 88,234 edges as a plain text file. Breadth-first search from any vertex in NetworkX takes one line, and the average distance comes out at about 3.7. On a graph that small the whole distance distribution can be computed exactly in seconds, which is a good way to see what the 2011 paper did before reading how it was done at scale.


