Link Graph Encyclopedia

Network structure

The neighbourhood function

For each distance t, how many pairs of nodes are within t links of each other. From it come the distance distribution, the average distance and the effective diameter, the robust ways to say how "small" a graph is.

The neighbourhood function N(t)N(t) of a graph counts the ordered pairs of nodes (x,y)(x, y) with d(x,y)≤td(x, y) \le t: the pairs within tt links of each other. It summarises the whole distance structure of a graph in one increasing curve, and its derivatives give the statistics that network scientists actually use to compare graphs: the distribution of distances, the average distance and the effective diameter. Its plot is the hop plot of Faloutsos, Faloutsos and Faloutsos’s 1999 study of the internet’s topology; Palmer, Gibbons and Faloutsos showed how to approximate it for large graphs; HyperANF made the approximation fast enough for billion-node graphs.

Definitions

N(t)=∣{(x,y):d(x,y)≤t}∣=∑x∣B(x,t)∣,N(t) = \bigl| \{ (x, y) : d(x, y) \le t \} \bigr| = \sum_x |B(x, t)|,

where B(x,t)B(x, t) is the ball of radius tt around xx. N(0)=nN(0) = n, since every node reaches itself, and N(t)N(t) stops growing once tt passes the longest finite distance.

From it:

Worked example

The running example (see the distance table in paths and distance) has 19 ordered pairs of distinct nodes with a directed path:

Distance tt Pairs at distance tt N(t)N(t) Share of reachable pairs within tt
0 7 (each node to itself) 7
1 10 (the arcs) 17 52.6%
2 8 25 94.7%
3 1 (E to B) 26 100%

The average distance is (10⋅1+8⋅2+1⋅3)/19=1.53(10 \cdot 1 + 8 \cdot 2 + 1 \cdot 3)/19 = 1.53, and the effective diameter, interpolating where 90% is reached, is about 1.9. The diameter is 3. Of the 42 ordered pairs of distinct nodes, 23 have no path at all, which is why every statistic above is computed over reachable pairs only.

Computing it at scale

Exact computation needs all distances, a breadth-first search from every node. ANF and its successors estimate every ball size ∣B(x,t)∣|B(x, t)| with a probabilistic counter per node and grow all balls one step per pass over the graph (see HyperBall). Summing the estimates gives N(t)N(t) with a relative error close to that of the individual counters, in as many passes as the graph’s longest shortest path. HyperANF computed the neighbourhood function of Facebook’s 2011 friendship graph, 721 million nodes, giving the famous average distance of 4.74.

What it reveals

Why it matters for rankings

Harmonic centrality is the per-node version of the same information: h(x)=∑t(∣B(x,t)∣−∣B(x,t−1)∣)/th(x) = \sum_t \bigl(|B(x,t)| - |B(x,t-1)|\bigr)/t for balls built from in-links. A graph whose distance distribution is concentrated at 3 or 4 steps gives almost every well-connected node a similar harmonic value, because most of the graph sits at the same few distances from each of them. The flatness of Common Crawl’s harmonic values near the top (see ranks and scores) is the distance distribution showing through.

References

Edit this entry on GitHub