What does Social Networks and Structural Holes conclude, in numbers, about “Scale-Free Networks, Preferential Attachment and Robustness”?

Answer: Under attack the difference is stark: after the 10 % of nodes with the highest degree are removed, the BA network's largest component still holds 63 % of the nodes, and after 15 % only 4 %; the same attack does much less damage to the ER network, which keeps 78 % after 15 % of its nodes are removed and only falls to 6 % after 40 %. The highest-degree node in the BA network has 104 connections, in the ER network at most 13: attacking a scale-free network means first taking out the hubs that hold it together.

Scope of the numbers: Marked boxes separate published evidence, runnable Python calculations (15 programs, all checked), classical sources and the author's hypotheses.

中文版

Data table

The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python onlyprinted values that match the answer: -0.63, -5.73, 2.40, 2.77, 2.80, 2.9

BA: max value 418
kmin2: alpha = 2.40 +/- 0.01 (n tail = 20000)
kmin4: alpha = 2.69 +/- 0.02 (n tail = 6002)
kmin8: alpha = 2.80 +/- 0.04 (n tail = 1630)
kmin 16: alpha2.77 +/- 0.09 (n tail = 431)
kmin 8, power law vs log-normal: R-0.8, z = -0.63, p = 0.531
-> cannot tell them apart; best log-normal mu-12.00, sigma = 2.9
LN: max value 57
kmin2: alpha = 2.09 +/- 0.01 (n tail = 15408)
kmin4: alpha = 2.77 +/- 0.02 (n tail = 7504)
kmin8: alpha = 3.60 +/- 0.06 (n tail = 2062)
kmin 16: alpha4.56 +/- 0.21 (n tail = 301)
kmin 8, power law vs log-normal: R-32.0, z = -5.73, p = 0.000
-> log-normal favoured; best log-normal mu1.00, sigma = 0.8

Key formula

\[f_c = 1 - \frac{1}{\kappa - 1}\]
Show the full program
# Is it a power law? Maximum-likelihood exponent and a likelihood-ratio test
# against a log-normal (in the spirit of Clauset, Shalizi & Newman 2009 and
# Broido & Clauset 2019). Two synthetic degree samples of 20,000 nodes:
#   BA: a Barabasi-Albert network with m = 2 (true tail exponent 3);
#   LN: rounded log-normal values exp(Normal(1.0, 0.8)), not a power law.
# Exponent: alpha = 1 + n / sum ln(k / (kmin - 0.5)) (discrete approximation).
# LR test: continuous approximation above kmin - 0.5; the log-normal is fitted
# by grid search (mu -24 to 4, sigma 0.2 to 4; the tail mass uses erfc, which
# stays accurate far out in the tail); Vuong's normalised ratio z and
# two-sided p are reported.
import math, random
from statistics import NormalDist
rng, PHI = random.Random(9), NormalDist().cdf
N, M = 20000, 2
targets, deg = [], [0] * N
for i in range(M + 1):
    for j in range(i):
        targets += [i, j]; deg[i] += 1; deg[j] += 1
for new in range(M + 1, N):
    chosen = set()
    while len(chosen) < M:
        chosen.add(rng.choice(targets))
    for t in chosen:
        targets += [t, new]; deg[t] += 1; deg[new] += 1
samples = {"BA": deg,
           "LN": [max(1, round(math.exp(rng.gauss(1.0, 0.8)))) for _ in range(N)]}

def alpha_hat(ks, kmin):
    tail = [k for k in ks if k >= kmin]
    a = 1 + len(tail) / sum(math.log(k / (kmin - 0.5)) for k in tail)
    return a, (a - 1) / math.sqrt(len(tail)), len(tail)

def lr_test(ks, kmin):
    x = [k for k in ks if k >= kmin]; xm = kmin - 0.5; n = len(x)
    a = 1 + n / sum(math.log(v / xm) for v in x)
    lp = [math.log((a - 1) / xm) - a * math.log(v / xm) for v in x]
    lx = [math.log(v) for v in x]
    def ln_ll(mu, s):
        tailp = 0.5 * math.erfc((math.log(xm) - mu) / (s * math.sqrt(2)))
        if tailp < 1e-300: return None
        c = -math.log(s * math.sqrt(2 * math.pi)) - math.log(tailp)
        return [c - l - (l - mu) ** 2 / (2 * s * s) for l in lx]
    best = None
    grid = [(mu / 4, s / 10) for mu in range(-96, 17) for s in range(2, 41)]
    for mu, s in grid:
        ll = ln_ll(mu, s)
        if ll is not None and (best is None or sum(ll) > best[0]):
            best = (sum(ll), mu, s, ll)
    d = [p - q for p, q in zip(lp, best[3])]
    R = sum(d); sd = math.sqrt(sum((v - R / n) ** 2 for v in d) / n)
    z = R / (sd * math.sqrt(n))
    return R, z, 2 * PHI(-abs(z)), best[1], best[2]

for name, ks in samples.items():
    print(f"{name}: max value {max(ks)}")
    for kmin in (2, 4, 8, 16):
        a, se, n = alpha_hat(ks, kmin)
        print(f"   kmin {kmin:2d}: alpha = {a:.2f} +/- {se:.2f} (n tail = {n})")
    R, z, p, mu, sig = lr_test(ks, 8)
    if p >= 0.1:
        verdict = "cannot tell them apart"
    else:
        verdict = "power law favoured" if z > 0 else "log-normal favoured"
    print(f"   kmin 8, power law vs log-normal: R = {R:+.1f}, z = {z:+.2f},"
          f" p = {p:.3f}")
    print(f"      -> {verdict}; best log-normal mu = {mu:.2f}, sigma = {sig:.1f}")

Single source and citation

Fan, Y. (2026). Social Network Topology, Structural Holes and Complex Contagion (Version 1.0.0), Chapter 4: Scale-Free Networks, Preferential Attachment and Robustness. 5D Library. https://doi.org/10.5281/zenodo.23764990

DOI: 10.5281/zenodo.23764990 · Read the monograph · 5DL-B-025 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026025,
  author    = {Fan, Yafu},
  title     = {Social Network Topology, Structural Holes and Complex Contagion},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  doi       = {10.5281/zenodo.23764990},
  url       = {https://doi.org/10.5281/zenodo.23764990}
}

Other chapter answers in this book