# The diameter of the world wide web

Despite its increasing role in communication, the world wide web (www) remains the least controlled medium: any individual or institution can create websites with unrestricted number of documents and links. This unregulated growth leads to a huge and complex web, which is a large directed graph, whose vertices are documents and edges are the links (URLs) pointing from one document to another. The topology of this graph determines the web’s connectivity and, consequently, our effectiveness in locating information on the www. However, due to its large size (estimated to be at least $`8\times 10^8`$ documents), and the continuously changing documents and links, it is impossible to catalogue all vertices and edges. The challenge in obtaining a complete topological map of the www is illustrated by the limitations of the commercial search engines: Northern Light, the search engine with the largest coverage, is estimated to index only $`38\%`$ of the web. While great efforts are made to map and characterize the Internet’s infrastructure, little is known about what truly matters in searching for information, i.e., about the topology of the www. Here we take a first step to fill this gap: we use local connectivity measurements to construct a topological model of the www, allowing us to explore and characterize the large scale properties of the web.

To determine the local connectivity of the www, we constructed a robot, that adds to its database all URLs found on a document and recursively follows these to retrieve the related documents and URLs. From the collected data we determined the probability $`P_{out}(k)`$ ($`P_{in}(k)`$) that a document has $`k`$ outgoing (incoming) links. As Figs. 1a and b illustrate, we find that both $`P_{out}(k)`$ and $`P_{in}(k)`$ follow a power-law over several orders of magnitude, remarkably different not only from the Poisson distribution predicted by the classical theory of random graphs by Erdős and Rényi, but also from the bounded distribution found in recent models of random networks. The power law tail indicates that the probability of finding documents with a large number of links is rather significant, the network connectivity being dominated by highly connected web pages. The same is true for the incoming links: the probability of finding very popular addresses, to which a large number of other documents point, is non-negligible, an indication of the flocking sociology of the www. Furthermore, while the owner of each web page has complete freedom in choosing the number of links on a document and the addresses to which they point, the overall system obeys scaling laws characteristic only of highly interactive self-organized systems and critical phenomena.

To investigate the connectivity and the large-scale topological properties of the www, we construct a directed random graph consisting of $`N`$ vertices, assigning to each vertex $`k`$ outgoing (incoming) links, such that $`k`$ is drawn from the power-law distribution shown in Fig. 1a and b. To achieve this, we randomly select a vertex $`i`$ and increase its outgoing (incoming) connectivity to $`k_i+1`$ if the total number of vertices with $`k_i+1`$ outgoing (incoming) links is less than $`NP_{out}(k_i+1)`$ ($`NP_{in}(k_i+1)`$). A particularly important quantity in a search process is the shortest path between two documents, $`dl`$, defined as the smallest number of URL links one needs to follow to navigate from one document to the other. As Fig. 1c shows, we find that the average of $`d`$ over all pairs of vertices follows $`d=0.35+2.06\mathrm{log}(N)`$, indicating that the web forms a small-world network, known to characterize social or biological systems. Using $`N=8\times 10^8`$, we find $`d_{www}=18.59`$, i.e., two randomly chosen documents on the web are on average 19 clicks away from each other. Since for a given $`N`$, $`d`$ follows a Gaussian distribution, $`d`$ can be interpreted as the diameter of the web, a measure of the shortest distance between any two points in the system. Despite its huge size, our results indicate that the www is a highly connected graph of average diameter of only $`19`$ links. The logarithmic dependence of $`d`$ on $`N`$ is important to the future potential of the www: we find that the expected $`1000\%`$ increase in the size of the web over the next few years will change $`d`$ from $`19`$ to only $`21`$. The relatively small value of $`d`$ suggests that an intelligent agent, i.e., who can interpret the links and follow only the relevant one, can find in a short time the desired information by navigating the www. However, this is not the case for a robot, that locates the information based on matching strings: we find that such a robot, aiming to identify a document at distance $`d`$, needs to search $`M(d)0.53N^{0.92}`$ documents which, using $`N=8\times 10^8`$, leads to $`M=8\times 10^7`$, i.e., to $`10\%`$ of the full www. This indicates that robots cannot benefit from the highly connected nature of the web, their only successful strategy being indexing as large a fraction of the www as possible.

The uncovered scale free nature of the link distributions indicates that collective phenomena play an unsuspected role in the development of the www, requiring us to look beyond the traditional random graph models. A better understanding of the web topology, aided by modeling efforts, is crucial in developing search algorithms or designing strategies for making information widely accessible on the www. The good news is that, due to the surprisingly small diameter of the web, all that information is just a few clicks away.

Réka Albert, Hawoong Jeong and Albert-László Barabási   
Department of Physics,   
University of Notre-Dame, Notre Dame,   
Indiana 46556, USA   
email:alb@nd.edu