introduction to complex networks
DESCRIPTION
Introduction to complex networks. I discuss percolation and appearance of giant components and related issues such as epidemics and attack tolerance.TRANSCRIPT
Introduction to Complex Networks
V.A. Traag
KITLV, Leiden, the Netherlandse-Humanities, KNAW, Amsterdam, the Netherlands
March 30, 2014
eRoyal Netherlands Academy of Arts and SciencesHumanities
Overview
1 What are networks?
2 Classics: scale free & small worlds.
3 Percolation: giant components, failure & attack and epidemics.I Probability generating functions.
Examples
• Neural networks
• Power grids
• Gas networks
• Internet router network
• World Wide Web
• Road networks
• Airline networks
• Call networks
• Social networks
• Social media networks
Examples
• Neural networks
• Power grids
• Gas networks
• Internet router network
• World Wide Web
• Road networks
• Airline networks
• Call networks
• Social networks
• Social media networks
Examples
• Neural networks
• Power grids
• Gas networks
• Internet router network
• World Wide Web
• Road networks
• Airline networks
• Call networks
• Social networks
• Social media networks
Examples
• Neural networks
• Power grids
• Gas networks
• Internet router network
• World Wide Web
• Road networks
• Airline networks
• Call networks
• Social networks
• Social media networks
Examples
• Neural networks
• Power grids
• Gas networks
• Internet router network
• World Wide Web
• Road networks
• Airline networks
• Call networks
• Social networks
• Social media networks
Examples
• Neural networks
• Power grids
• Gas networks
• Internet router network
• World Wide Web
• Road networks
• Airline networks
• Call networks
• Social networks
• Social media networks
Basics
Network
• Graph or networks G = (V ,E )
• Nodes V = 1, . . . , n (vertices)I Power station, webpage, intersection, person.
• Edges E ⊆ V × V (links, ties)I Power cables, hyperlinks, roads, friendships.I Can be directed, and possibly weighted
Essentials
• Degree ki is number of links at node i .
• If |E | = m number of edges, then∑
i ki = 2m.
• Average degree 〈k〉 = 2mn .
• Density p = m
(n2)= 〈k〉
n−1 ≈〈k〉n .
• Most networks sparse: 〈k〉, 〈p〉 low.
Picture worth . . . words
Visualisations essentially wrong, but sometimes insightful.Need to assess statistics to understand networks.
Analysed properties
Analysis strategy
• Focus on some key (statistical) ingredients.
• Only overall general properties, no particulates.
• Compare to random graph: what can we expect?
• Modelling ⇒ replicate key properties.
Some key properties
• Degree distribution
• Degree correlations
• Path lengths
• Clustering
• Modularity
• Dynamics: inter event times
Small world
Milgram’s experiment (1960s)
• Ask people to reach specific person:John Doe, Journalist, Kansas
• Send letter to acquaintance, who forwards, and so on
• Result: about 5 intermediaries to reach destination.
• Six degrees of separation.
Key question: is this different from a random graph?
Erdos-Renyi (ER) graphs
Random graph
• Create empty graph G with n nodes.
• Every edge probability p of appearing.
• On average p(n2
)= m edges.
• Average degree 〈k〉 = pn.
• Random graph essentially a (very simple) model.
• Was (and still is) used frequently.I Biology, epidemiology: well mixed population.
• Many interesting questions still.
Small world?
Path length
• Every node ki ≈ 〈k〉, in ` steps, reach about 〈k〉`.• When 〈k〉` = n reached whole network.
• Hence ` ≈ log nlog〈k〉 : grows slowly!
Random edges create short paths.
Clustering
• Clustering, Ci =ei(ki2
) .• In ER graph 〈Ci 〉 =
p3n(n − 1)
p2n(n − 1)= p.
• Networks are sparse, low p, so low 〈Ci 〉.
Real world: both short paths & clustering. How to get that?
Small world?
Path length
• Every node ki ≈ 〈k〉, in ` steps, reach about 〈k〉`.• When 〈k〉` = n reached whole network.
• Hence ` ≈ log nlog〈k〉 : grows slowly!
Random edges create short paths.
Clustering
• Clustering, Ci =ei(ki2
) .• In ER graph 〈Ci 〉 =
p3n(n − 1)
p2n(n − 1)= p.
• Networks are sparse, low p, so low 〈Ci 〉.
Real world: both short paths & clustering. How to get that?
Watts & Strogatz
Small world model
• Create lattice (connect to nearest neighbours).
• Rewire edge (or add) with probability p.
Watts & Strogatz
Watts & Strogatz
Small world model
• Create lattice (connect to nearest neighbours).
• Rewire edge (or add) with probability p.
Few shortcuts enough to create short paths
Degree distribution
0 20 40 60 80 100
ki ≈ 〈k〉
Degree
Pro
bab
ility
• In real networks, power-law ki ∼ k−α, usually 2 < α < 3.
• In ER graphs, poisson ki ∼ 〈k〉k
k! .
Degree distribution
100 101 102
Hubs
Degree
Pro
bab
ility
• In real networks, power-law ki ∼ k−α, usually 2 < α < 3.
• In ER graphs, poisson ki ∼ 〈k〉k
k! .
Barabasi & Albert
How to get power-law degree distribution?
Preferential attachment, cumulative advantage
Start with graph with q nodes
1 Add node
2 Add q links to previous nodes with probability pi ∼ ki
3 Repeat (1)-(2).
Results
• Analysis by master rate equation p(k) = k−12 p(k − 1)− k
2p(k).
• Leads to p(k) = m(m+1)(m+2)k(k+1)(k+2) ∼ k−3.
• Preferential attachment ⇒ scale free network.
Scale free
Scale free: so what?Why does it matter?
• Scale free networks robust again random node failure.
• Vulnerable for targeted attacks (take out the hubs).
• No threshold for epidemic spreading.
Approach: percolation & generating functions.
Generating functions
Definition (Generating function)
Let Pr(S = k) = pk . Then
g(x) = E (xS) =∑k
pkxk
is the probability generating function (pgf).
Properties
• Normalized g(1) = E (1S) =∑
k pk = 1
• Calculate mean 〈k〉 =∑
k kpk
• Sum S =∑
Si , pgf f (x) = E (xS)
Generating functions
Definition (Generating function)
Let Pr(S = k) = pk . Then
g(x) = E (xS) =∑k
pkxk
is the probability generating function (pgf).
Properties
• Normalized g(1) = E (1S) =∑
k pk = 1
• Calculate mean 〈k〉 =∑
k kpk
• Sum S =∑
Si , pgf f (x) = E (xS)
Generating functions
Definition (Generating function)
Let Pr(S = k) = pk . Then
g(x) = E (xS) =∑k
pkxk
is the probability generating function (pgf).
Properties
• Normalized g(1) = E (1S) =∑
k pk = 1
• Calculate mean 〈k〉 =∑
k kpk
• Sum S =∑
Si , pgf f (x) = E (xS)
Generating functions
Definition (Generating function)
Let Pr(S = k) = pk . Then
g(x) = E (xS) =∑k
pkxk
is the probability generating function (pgf).
Properties
• Normalized g(1) = E (1S) =∑
k pk = 1
• Calculate mean 〈k〉 =∑
k kpk1k−1
• Sum S =∑
Si , pgf f (x) = E (xS)
Generating functions
Definition (Generating function)
Let Pr(S = k) = pk . Then
g(x) = E (xS) =∑k
pkxk
is the probability generating function (pgf).
Properties
• Normalized g(1) = E (1S) =∑
k pk = 1
• Calculate mean 〈k〉 = g ′(1)
• Sum S =∑
Si , pgf f (x) = E (xS)
Generating functions
Definition (Generating function)
Let Pr(S = k) = pk . Then
g(x) = E (xS) =∑k
pkxk
is the probability generating function (pgf).
Properties
• Normalized g(1) = E (1S) =∑
k pk = 1
• Calculate moment 〈km〉 =(x ∂∂x
)mg∣∣∣x=1
• Sum S =∑
Si , pgf f (x) = E (xS)
Generating functions
Definition (Generating function)
Let Pr(S = k) = pk . Then
g(x) = E (xS) =∑k
pkxk
is the probability generating function (pgf).
Properties
• Normalized g(1) = E (1S) =∑
k pk = 1
• Calculate moment 〈km〉 =(x ∂∂x
)mg∣∣∣x=1
• Sum S =∑
Si , pgf f (x) = E (xS)
Generating functions
Definition (Generating function)
Let Pr(S = k) = pk . Then
g(x) = E (xS) =∑k
pkxk
is the probability generating function (pgf).
Properties
• Normalized g(1) = E (1S) =∑
k pk = 1
• Calculate moment 〈km〉 =(x ∂∂x
)mg∣∣∣x=1
• Sum S =∑
Si , pgf f (x) = E (x∑
Si )
Generating functions
Definition (Generating function)
Let Pr(S = k) = pk . Then
g(x) = E (xS) =∑k
pkxk
is the probability generating function (pgf).
Properties
• Normalized g(1) = E (1S) =∑
k pk = 1
• Calculate moment 〈km〉 =(x ∂∂x
)mg∣∣∣x=1
• Sum S =∑
Si , pgf f (x) =∏
E (xSi )
Generating functions
Definition (Generating function)
Let Pr(S = k) = pk . Then
g(x) = E (xS) =∑k
pkxk
is the probability generating function (pgf).
Properties
• Normalized g(1) = E (1S) =∑
k pk = 1
• Calculate moment 〈km〉 =(x ∂∂x
)mg∣∣∣x=1
• Sum S =∑
Si , pgf f (x) =∏
g(x)
Generating functions
Definition (Generating function)
Let Pr(S = k) = pk . Then
g(x) = E (xS) =∑k
pkxk
is the probability generating function (pgf).
Properties
• Normalized g(1) = E (1S) =∑
k pk = 1
• Calculate moment 〈km〉 =(x ∂∂x
)mg∣∣∣x=1
• Sum S =∑
Si , pgf f (x) = g(x)m
Degree generating function
Example, ER degree distribution
• Let pk be probability node has degree k .
• Take pk =(nk
)pk(1− p)n−k (Erdos-Renyi)
• Then pgf g(x) =∑
k
(nk
)pk(1− p)n−kxk
• Normalized g(1) = e〈k〉(1−1) = 1.
• Mean g ′(x) = 〈k〉e〈k〉(x−1).• Number of neighbours of m nodes g(x)m = em〈k〉(x−1).
Degree generating function
Example, ER degree distribution
• Let pk be probability node has degree k .
• Take pk =(nk
)pk(1− p)n−k (Erdos-Renyi)
• Then pgf g(x) =∑
k
(nk
)pk(1− p)n−kxk
• Normalized g(1) = e〈k〉(1−1) = 1.
• Mean g ′(x) = 〈k〉e〈k〉(x−1).• Number of neighbours of m nodes g(x)m = em〈k〉(x−1).
Degree generating function
Example, ER degree distribution
• Let pk be probability node has degree k .
• Take pk =(nk
)pk(1− p)n−k (Erdos-Renyi)
• Then pgf g(x) =∑
k
(nk
)(xp)k(1− p)n−k (binomial theorem)
• Normalized g(1) = e〈k〉(1−1) = 1.
• Mean g ′(x) = 〈k〉e〈k〉(x−1).• Number of neighbours of m nodes g(x)m = em〈k〉(x−1).
Degree generating function
Example, ER degree distribution
• Let pk be probability node has degree k .
• Take pk =(nk
)pk(1− p)n−k (Erdos-Renyi)
• Then pgf g(x) = (px + (1− p))n
• Normalized g(1) = e〈k〉(1−1) = 1.
• Mean g ′(x) = 〈k〉e〈k〉(x−1).• Number of neighbours of m nodes g(x)m = em〈k〉(x−1).
Degree generating function
Example, ER degree distribution
• Let pk be probability node has degree k .
• Take pk =(nk
)pk(1− p)n−k (Erdos-Renyi)
• Then pgf g(x) = (1 + p(x − 1))n (remember 〈k〉 = pn)
• Normalized g(1) = e〈k〉(1−1) = 1.
• Mean g ′(x) = 〈k〉e〈k〉(x−1).• Number of neighbours of m nodes g(x)m = em〈k〉(x−1).
Degree generating function
Example, ER degree distribution
• Let pk be probability node has degree k .
• Take pk =(nk
)pk(1− p)n−k (Erdos-Renyi)
• Then pgf g(x) = (1 + 〈k〉(x−1)n )n (limn→∞, def. exp)
• Normalized g(1) = e〈k〉(1−1) = 1.
• Mean g ′(x) = 〈k〉e〈k〉(x−1).• Number of neighbours of m nodes g(x)m = em〈k〉(x−1).
Degree generating function
Example, ER degree distribution
• Let pk be probability node has degree k .
• Take pk =(nk
)pk(1− p)n−k (Erdos-Renyi)
• Then pgf g(x) = e〈k〉(x−1)
• Normalized g(1) = e〈k〉(1−1) = 1.
• Mean g ′(x) = 〈k〉e〈k〉(x−1).• Number of neighbours of m nodes g(x)m = em〈k〉(x−1).
Degree generating function
Example, ER degree distribution
• Let pk be probability node has degree k .
• Take pk =(nk
)pk(1− p)n−k (Erdos-Renyi)
• Then pgf g(x) = e〈k〉(x−1)
• Normalized g(1) = e〈k〉(1−1) = 1.
• Mean g ′(x) = 〈k〉e〈k〉(x−1).• Number of neighbours of m nodes g(x)m = em〈k〉(x−1).
Degree generating function
Example, ER degree distribution
• Let pk be probability node has degree k .
• Take pk =(nk
)pk(1− p)n−k (Erdos-Renyi)
• Then pgf g(x) = e〈k〉(x−1)
• Normalized g(1) = e〈k〉(1−1) = 1.
• Mean g ′(x) = 〈k〉e〈k〉(x−1).• Number of neighbours of m nodes g(x)m = em〈k〉(x−1).
Degree generating function
Example, ER degree distribution
• Let pk be probability node has degree k .
• Take pk =(nk
)pk(1− p)n−k (Erdos-Renyi)
• Then pgf g(x) = e〈k〉(x−1)
• Normalized g(1) = e〈k〉(1−1) = 1.
• Mean g ′(1) = 〈k〉.• Number of neighbours of m nodes g(x)m = em〈k〉(x−1).
Degree generating function
Example, ER degree distribution
• Let pk be probability node has degree k .
• Take pk =(nk
)pk(1− p)n−k (Erdos-Renyi)
• Then pgf g(x) = e〈k〉(x−1)
• Normalized g(1) = e〈k〉(1−1) = 1.
• Mean g ′(1) = 〈k〉.• Number of neighbours of m nodes g(x)m = em〈k〉(x−1).
Degree generating function
Example, ER degree distribution
• Let pk be probability node has degree k .
• Take pk =(nk
)pk(1− p)n−k (Erdos-Renyi)
• Then pgf g(x) = e〈k〉(x−1)
• Normalized g(1) = e〈k〉(1−1) = 1.
• Mean g ′(1) = 〈k〉.• Number of neighbours of m nodes (g(x)m)′ = m〈k〉em〈k〉(x−1).
Degree generating function
Example, ER degree distribution
• Let pk be probability node has degree k .
• Take pk =(nk
)pk(1− p)n−k (Erdos-Renyi)
• Then pgf g(x) = e〈k〉(x−1)
• Normalized g(1) = e〈k〉(1−1) = 1.
• Mean g ′(1) = 〈k〉.• Number of neighbours of m nodes (g(1)m)′ = m〈k〉.
Excess degree distribution
Earlier: random nodeNow: follow random edge to node
• Probability that node has k links is kpk∑k kpk
.
• Average neighbour degree∑
k kpk〈k〉 .
• Probability that node has k other links is qk = (k+1)pk+1
〈k〉
• pgf g1(x) = 1〈k〉∑
k qkxk
• Second neigbhours for m degree g1(x)m
• Distribution of second neighbours∑
m
∑k pmp2(k |m)xk
• Average number of second neighbours 〈k2〉 − 〈k〉.
Excess degree distribution
Earlier: random nodeNow: follow random edge to node
• Probability that node has k links is kpk∑k kpk
.
• Average neighbour degree∑
k kpk〈k〉 .
• Probability that node has k other links is qk = (k+1)pk+1
〈k〉
• pgf g1(x) = 1〈k〉∑
k qkxk
• Second neigbhours for m degree g1(x)m
• Distribution of second neighbours∑
m
∑k pmp2(k |m)xk
• Average number of second neighbours 〈k2〉 − 〈k〉.
Excess degree distribution
Earlier: random nodeNow: follow random edge to node
• Probability that node has k links is kpk〈k〉 .
• Average neighbour degree∑
k kpk〈k〉 .
• Probability that node has k other links is qk = (k+1)pk+1
〈k〉
• pgf g1(x) = 1〈k〉∑
k qkxk
• Second neigbhours for m degree g1(x)m
• Distribution of second neighbours∑
m
∑k pmp2(k |m)xk
• Average number of second neighbours 〈k2〉 − 〈k〉.
Excess degree distribution
Earlier: random nodeNow: follow random edge to node
• Probability that node has k links is kpk〈k〉 .
• Average neighbour degree∑
k kpk〈k〉 .
• Probability that node has k other links is qk = (k+1)pk+1
〈k〉
• pgf g1(x) = 1〈k〉∑
k qkxk
• Second neigbhours for m degree g1(x)m
• Distribution of second neighbours∑
m
∑k pmp2(k |m)xk
• Average number of second neighbours 〈k2〉 − 〈k〉.
Excess degree distribution
Earlier: random nodeNow: follow random edge to node
• Probability that node has k links is kpk〈k〉 .
• Average neighbour degree 〈k2〉〈k〉 .
• Probability that node has k other links is qk = (k+1)pk+1
〈k〉
• pgf g1(x) = 1〈k〉∑
k qkxk
• Second neigbhours for m degree g1(x)m
• Distribution of second neighbours∑
m
∑k pmp2(k |m)xk
• Average number of second neighbours 〈k2〉 − 〈k〉.
Excess degree distribution
Earlier: random nodeNow: follow random edge to node
• Probability that node has k links is kpk〈k〉 .
• Average neighbour degree 〈k2〉〈k〉 > 〈k〉.
• Probability that node has k other links is qk = (k+1)pk+1
〈k〉
• pgf g1(x) = 1〈k〉∑
k qkxk
• Second neigbhours for m degree g1(x)m
• Distribution of second neighbours∑
m
∑k pmp2(k |m)xk
• Average number of second neighbours 〈k2〉 − 〈k〉.
Excess degree distribution
Earlier: random nodeNow: follow random edge to node
• Probability that node has k links is kpk〈k〉 .
• Average neighbour degree 〈k2〉〈k〉 − 〈k〉 > 0.
• Probability that node has k other links is qk = (k+1)pk+1
〈k〉
• pgf g1(x) = 1〈k〉∑
k qkxk
• Second neigbhours for m degree g1(x)m
• Distribution of second neighbours∑
m
∑k pmp2(k |m)xk
• Average number of second neighbours 〈k2〉 − 〈k〉.
Excess degree distribution
Earlier: random nodeNow: follow random edge to node
• Probability that node has k links is kpk〈k〉 .
• Average neighbour degree 〈k2〉−〈k〉2〈k〉 > 0.
• Probability that node has k other links is qk = (k+1)pk+1
〈k〉
• pgf g1(x) = 1〈k〉∑
k qkxk
• Second neigbhours for m degree g1(x)m
• Distribution of second neighbours∑
m
∑k pmp2(k |m)xk
• Average number of second neighbours 〈k2〉 − 〈k〉.
Excess degree distribution
Earlier: random nodeNow: follow random edge to node
• Probability that node has k links is kpk〈k〉 .
• Average neighbour degree 〈k2〉−〈k〉2〈k〉 > 0 (friendship paradox).
• Probability that node has k other links is qk = (k+1)pk+1
〈k〉
• pgf g1(x) = 1〈k〉∑
k qkxk
• Second neigbhours for m degree g1(x)m
• Distribution of second neighbours∑
m
∑k pmp2(k |m)xk
• Average number of second neighbours 〈k2〉 − 〈k〉.
Excess degree distribution
Earlier: random nodeNow: follow random edge to node
• Probability that node has k links is kpk〈k〉 .
• Average neighbour degree 〈k2〉−〈k〉2〈k〉 > 0 (friendship paradox).
• Probability that node has k other links is qk = (k+1)pk+1
〈k〉
• pgf g1(x) = 1〈k〉∑
k qkxk
• Second neigbhours for m degree g1(x)m
• Distribution of second neighbours∑
m
∑k pmp2(k |m)xk
• Average number of second neighbours 〈k2〉 − 〈k〉.
Excess degree distribution
Earlier: random nodeNow: follow random edge to node
• Probability that node has k links is kpk〈k〉 .
• Average neighbour degree 〈k2〉−〈k〉2〈k〉 > 0 (friendship paradox).
• Probability that node has k other links is qk = (k+1)pk+1
〈k〉
• pgf g1(x) = 1〈k〉∑
k qkxk
• Second neigbhours for m degree g1(x)m
• Distribution of second neighbours∑
m
∑k pmp2(k |m)xk
• Average number of second neighbours 〈k2〉 − 〈k〉.
Excess degree distribution
Earlier: random nodeNow: follow random edge to node
• Probability that node has k links is kpk〈k〉 .
• Average neighbour degree 〈k2〉−〈k〉2〈k〉 > 0 (friendship paradox).
• Probability that node has k other links is qk = (k+1)pk+1
〈k〉
• pgf g1(x) = 1〈k〉∑
k(k + 1)pk+1xk
• Second neigbhours for m degree g1(x)m
• Distribution of second neighbours∑
m
∑k pmp2(k |m)xk
• Average number of second neighbours 〈k2〉 − 〈k〉.
Excess degree distribution
Earlier: random nodeNow: follow random edge to node
• Probability that node has k links is kpk〈k〉 .
• Average neighbour degree 〈k2〉−〈k〉2〈k〉 > 0 (friendship paradox).
• Probability that node has k other links is qk = (k+1)pk+1
〈k〉
• pgf g1(x) = 1〈k〉∑
k kpkxk−1
• Second neigbhours for m degree g1(x)m
• Distribution of second neighbours∑
m
∑k pmp2(k |m)xk
• Average number of second neighbours 〈k2〉 − 〈k〉.
Excess degree distribution
Earlier: random nodeNow: follow random edge to node
• Probability that node has k links is kpk〈k〉 .
• Average neighbour degree 〈k2〉−〈k〉2〈k〉 > 0 (friendship paradox).
• Probability that node has k other links is qk = (k+1)pk+1
〈k〉
• pgf g1(x) = 1〈k〉g
′(x)
• Second neigbhours for m degree g1(x)m
• Distribution of second neighbours∑
m
∑k pmp2(k |m)xk
• Average number of second neighbours 〈k2〉 − 〈k〉.
Excess degree distribution
Earlier: random nodeNow: follow random edge to node
• Probability that node has k links is kpk〈k〉 .
• Average neighbour degree 〈k2〉−〈k〉2〈k〉 > 0 (friendship paradox).
• Probability that node has k other links is qk = (k+1)pk+1
〈k〉
• pgf g1(x) = 1〈k〉g
′(x)
• Second neigbhours for m degree g1(x)m
• Distribution of second neighbours∑
m
∑k pmp2(k |m)xk
• Average number of second neighbours 〈k2〉 − 〈k〉.
Excess degree distribution
Earlier: random nodeNow: follow random edge to node
• Probability that node has k links is kpk〈k〉 .
• Average neighbour degree 〈k2〉−〈k〉2〈k〉 > 0 (friendship paradox).
• Probability that node has k other links is qk = (k+1)pk+1
〈k〉
• pgf g1(x) = 1〈k〉g
′(x)
• Second neigbhours for m degree g1(x)m =∑
k p2(k |m)xk
• Distribution of second neighbours∑
m
∑k pmp2(k |m)xk
• Average number of second neighbours 〈k2〉 − 〈k〉.
Excess degree distribution
Earlier: random nodeNow: follow random edge to node
• Probability that node has k links is kpk〈k〉 .
• Average neighbour degree 〈k2〉−〈k〉2〈k〉 > 0 (friendship paradox).
• Probability that node has k other links is qk = (k+1)pk+1
〈k〉
• pgf g1(x) = 1〈k〉g
′(x)
• Second neigbhours for m degree g1(x)m =∑
k p2(k |m)xk
• Distribution of second neighbours∑
m
∑k pmp2(k |m)xk
• Average number of second neighbours 〈k2〉 − 〈k〉.
Excess degree distribution
Earlier: random nodeNow: follow random edge to node
• Probability that node has k links is kpk〈k〉 .
• Average neighbour degree 〈k2〉−〈k〉2〈k〉 > 0 (friendship paradox).
• Probability that node has k other links is qk = (k+1)pk+1
〈k〉
• pgf g1(x) = 1〈k〉g
′(x)
• Second neigbhours for m degree g1(x)m =∑
k p2(k |m)xk
• Distribution of second neighbours∑
m pm∑
k p2(k |m)xk
• Average number of second neighbours 〈k2〉 − 〈k〉.
Excess degree distribution
Earlier: random nodeNow: follow random edge to node
• Probability that node has k links is kpk〈k〉 .
• Average neighbour degree 〈k2〉−〈k〉2〈k〉 > 0 (friendship paradox).
• Probability that node has k other links is qk = (k+1)pk+1
〈k〉
• pgf g1(x) = 1〈k〉g
′(x)
• Second neigbhours for m degree g1(x)m =∑
k p2(k |m)xk
• Distribution of second neighbours∑
m pmg1(x)m
• Average number of second neighbours 〈k2〉 − 〈k〉.
Excess degree distribution
Earlier: random nodeNow: follow random edge to node
• Probability that node has k links is kpk〈k〉 .
• Average neighbour degree 〈k2〉−〈k〉2〈k〉 > 0 (friendship paradox).
• Probability that node has k other links is qk = (k+1)pk+1
〈k〉
• pgf g1(x) = 1〈k〉g
′(x)
• Second neigbhours for m degree g1(x)m =∑
k p2(k |m)xk
• Distribution of second neighbours g(g1(x))
• Average number of second neighbours 〈k2〉 − 〈k〉.
Excess degree distribution
Earlier: random nodeNow: follow random edge to node
• Probability that node has k links is kpk〈k〉 .
• Average neighbour degree 〈k2〉−〈k〉2〈k〉 > 0 (friendship paradox).
• Probability that node has k other links is qk = (k+1)pk+1
〈k〉
• pgf g1(x) = 1〈k〉g
′(x)
• Second neigbhours for m degree g1(x)m =∑
k p2(k |m)xk
• Distribution of third neighbours g(g1(g1(x)))
• Average number of second neighbours 〈k2〉 − 〈k〉.
Excess degree distribution
Earlier: random nodeNow: follow random edge to node
• Probability that node has k links is kpk〈k〉 .
• Average neighbour degree 〈k2〉−〈k〉2〈k〉 > 0 (friendship paradox).
• Probability that node has k other links is qk = (k+1)pk+1
〈k〉
• pgf g1(x) = 1〈k〉g
′(x)
• Second neigbhours for m degree g1(x)m =∑
k p2(k |m)xk
• Distribution of d neighbours g(g1(· · · g1(x) · · · ))
• Average number of second neighbours 〈k2〉 − 〈k〉.
Excess degree distribution
Earlier: random nodeNow: follow random edge to node
• Probability that node has k links is kpk〈k〉 .
• Average neighbour degree 〈k2〉−〈k〉2〈k〉 > 0 (friendship paradox).
• Probability that node has k other links is qk = (k+1)pk+1
〈k〉
• pgf g1(x) = 1〈k〉g
′(x)
• Second neigbhours for m degree g1(x)m =∑
k p2(k |m)xk
• Distribution of d neighbours g(g1(· · · g1(x) · · · ))
• Average number of second neighbours 〈k2〉 − 〈k〉.
Giant component
Giant component (GC)
• Always only one GC (and lots of small ones).
• Probability link does not connect node to GC u.
• Probability node of degree k not in GC uk
• Probability node not in giant component∑
k pkuk = g(u)
• Size of giant component: S = 1− g(u).
But what is u?
Self consistency
• Probability link not connects to GC is u.
• Connects to node with k other neighbours: excess degree.
• Average probability:∑
k qkuk = g1(u).
Giant component
Giant component (GC)
• Always only one GC (and lots of small ones).
• Probability link does not connect node to GC u.
• Probability node of degree k not in GC uk
• Probability node not in giant component∑
k pkuk = g(u)
• Size of giant component: S = 1− g(u).
But what is u?
Self consistency
• Probability link not connects to GC is u.
• Connects to node with k other neighbours: excess degree.
• Average probability:∑
k qkuk = g1(u).
Giant component
Giant component (GC)
• Always only one GC (and lots of small ones).
• Probability link does not connect node to GC u.
• Probability node of degree k not in GC uk
• Probability node not in giant component∑
k pkuk = g(u)
• Size of giant component: S = 1− g(u).
But what is u?
Self consistency
• Probability link not connects to GC is u.
• Connects to node with k other neighbours: excess degree.
• Average probability:∑
k qkuk = g1(u).
Giant component
Giant component (GC)
• Always only one GC (and lots of small ones).
• Probability link does not connect node to GC u.
• Probability node of degree k not in GC uk
• Probability node not in giant component∑
k pkuk = g(u)
• Size of giant component: S = 1− g(u).
But what is u?
Self consistency
• Probability link not connects to GC is u.
• Connects to node with k other neighbours: excess degree.
• Average probability:∑
k qkuk = g1(u).
Giant component
Giant component (GC)
• Always only one GC (and lots of small ones).
• Probability link does not connect node to GC u.
• Probability node of degree k not in GC uk
• Probability node not in giant component∑
k pkuk = g(u)
• Size of giant component: S = 1− g(u).
But what is u?
Self consistency
• Probability link not connects to GC is u.
• Connects to node with k other neighbours: excess degree.
• Average probability:∑
k qkuk = g1(u).
Giant component
Giant component (GC)
• Always only one GC (and lots of small ones).
• Probability link does not connect node to GC u.
• Probability node of degree k not in GC uk
• Probability node not in giant component∑
k pkuk = g(u)
• Size of giant component: S = 1− g(u).
But what is u?
Self consistency
• Probability link not connects to GC is u.
• Connects to node with k other neighbours: excess degree.
• Average probability:∑
k qkuk = g1(u).
Giant component
Giant component (GC)
• Always only one GC (and lots of small ones).
• Probability link does not connect node to GC u.
• Probability node of degree k not in GC uk
• Probability node not in giant component∑
k pkuk = g(u)
• Size of giant component: S = 1− g(u).
But what is u?
Self consistency
• Probability link not connects to GC is u.
• Connects to node with k other neighbours: excess degree.
• Average probability:∑
k qkuk = g1(u).
Giant component
Giant component (GC)
• Always only one GC (and lots of small ones).
• Probability link does not connect node to GC u.
• Probability node of degree k not in GC uk
• Probability node not in giant component∑
k pkuk = g(u)
• Size of giant component: S = 1− g(u).
But what is u?
Self consistency
• Probability link not connects to GC is u.
• Connects to node with k other neighbours: excess degree.
• Average probability:∑
k qkuk = g1(u) = u.
Giant component
How to solve g1(u) = u?
Giant component
If derivative g ′1(1) > 1 giant component appears.
Giant component
• GC appears when 1 < g ′1(1).
• For ER graphs 〈k2〉 − 〈k〉 = 〈k〉2, so 〈k〉 > 1 the GC appears.
0 1 2 3 4 5 6
0
0.5
1
〈k〉
S
• For scale free graphs 〈k2〉 → ∞ , so always GC (if 2 < α < 3).
Giant component
• GC appears when 1 < g ′1(1) =∑
k kqk .
• For ER graphs 〈k2〉 − 〈k〉 = 〈k〉2, so 〈k〉 > 1 the GC appears.
0 1 2 3 4 5 6
0
0.5
1
〈k〉
S
• For scale free graphs 〈k2〉 → ∞ , so always GC (if 2 < α < 3).
Giant component
• GC appears when 1 < g ′1(1) = 1〈k〉∑
k k(k + 1)pk+1.
• For ER graphs 〈k2〉 − 〈k〉 = 〈k〉2, so 〈k〉 > 1 the GC appears.
0 1 2 3 4 5 6
0
0.5
1
〈k〉
S
• For scale free graphs 〈k2〉 → ∞ , so always GC (if 2 < α < 3).
Giant component
• GC appears when 1 < g ′1(1) = 1〈k〉∑
k(k − 1)kpk .
• For ER graphs 〈k2〉 − 〈k〉 = 〈k〉2, so 〈k〉 > 1 the GC appears.
0 1 2 3 4 5 6
0
0.5
1
〈k〉
S
• For scale free graphs 〈k2〉 → ∞ , so always GC (if 2 < α < 3).
Giant component
• GC appears when 1 < g ′1(1) = 1〈k〉∑
k k2pk −
∑kpk .
• For ER graphs 〈k2〉 − 〈k〉 = 〈k〉2, so 〈k〉 > 1 the GC appears.
0 1 2 3 4 5 6
0
0.5
1
〈k〉
S
• For scale free graphs 〈k2〉 → ∞ , so always GC (if 2 < α < 3).
Giant component
• GC appears when 1 < g ′1(1) = 〈k2〉−〈k〉〈k〉 .
• For ER graphs 〈k2〉 − 〈k〉 = 〈k〉2, so 〈k〉 > 1 the GC appears.
0 1 2 3 4 5 6
0
0.5
1
〈k〉
S
• For scale free graphs 〈k2〉 → ∞ , so always GC (if 2 < α < 3).
Giant component
• GC appears when 1 < g ′1(1) = 〈k2〉−〈k〉〈k〉 .
• For ER graphs 〈k2〉 − 〈k〉 = 〈k〉2, so 〈k〉 > 1 the GC appears.
0 1 2 3 4 5 6
0
0.5
1
〈k〉
S
• For scale free graphs 〈k2〉 → ∞ , so always GC (if 2 < α < 3).
Giant component
• GC appears when 1 < g ′1(1) = 〈k2〉−〈k〉〈k〉 .
• For ER graphs 〈k2〉 − 〈k〉 = 〈k〉2, so 〈k〉 > 1 the GC appears.
0 1 2 3 4 5 6
0
0.5
1
〈k〉
S
• For scale free graphs 〈k2〉 → ∞ , so always GC (if 2 < α < 3).
Giant component
• GC appears when 1 < g ′1(1) = 〈k2〉−〈k〉〈k〉 .
• For ER graphs 〈k2〉 − 〈k〉 = 〈k〉2, so 〈k〉 > 1 the GC appears.
0 1 2 3 4 5 6
0
0.5
1
〈k〉
S
• For scale free graphs 〈k2〉 → ∞ , so always GC (if 2 < α < 3).
Node failure
How fast is giant component destroyed if nodes are removed?
Same approach
• Probability φ node does not “fail”.
• Again u probability link does not connect to GC.
Self consistency
• I: Neighbour is removed (1− φ).
• II: Neighbour is not removed (φ), but not in GC (uk).
• So, probability is 1− φ+ φuk .
• On average∑
k qk(1− φ+ φuk).
• Solve for u gives solution.
Node failure
How fast is giant component destroyed if nodes are removed?
Same approach
• Probability φ node “functions”.
• Again u probability link does not connect to GC.
Self consistency
• I: Neighbour is removed (1− φ).
• II: Neighbour is not removed (φ), but not in GC (uk).
• So, probability is 1− φ+ φuk .
• On average∑
k qk(1− φ+ φuk).
• Solve for u gives solution.
Node failure
How fast is giant component destroyed if nodes are removed?
Same approach
• Probability φ node not removed from network.
• Again u probability link does not connect to GC.
Self consistency
• I: Neighbour is removed (1− φ).
• II: Neighbour is not removed (φ), but not in GC (uk).
• So, probability is 1− φ+ φuk .
• On average∑
k qk(1− φ+ φuk).
• Solve for u gives solution.
Node failure
How fast is giant component destroyed if nodes are removed?
Same approach
• Probability φ node not removed from network.
• Again u probability link does not connect to GC.
Self consistency
• I: Neighbour is removed (1− φ).
• II: Neighbour is not removed (φ), but not in GC (uk).
• So, probability is 1− φ+ φuk .
• On average∑
k qk(1− φ+ φuk).
• Solve for u gives solution.
Node failure
How fast is giant component destroyed if nodes are removed?
Same approach
• Probability φ node not removed from network.
• Again u probability link does not connect to GC.
Self consistency
• I: Neighbour is removed (1− φ).
• II: Neighbour is not removed (φ), but not in GC (uk).
• So, probability is 1− φ+ φuk .
• On average∑
k qk(1− φ+ φuk).
• Solve for u gives solution.
Node failure
How fast is giant component destroyed if nodes are removed?
Same approach
• Probability φ node not removed from network.
• Again u probability link does not connect to GC.
Self consistency
• I: Neighbour is removed (1− φ).
• II: Neighbour is not removed (φ), but not in GC (uk).
• So, probability is 1− φ+ φuk .
• On average∑
k qk(1− φ+ φuk).
• Solve for u gives solution.
Node failure
How fast is giant component destroyed if nodes are removed?
Same approach
• Probability φ node not removed from network.
• Again u probability link does not connect to GC.
Self consistency
• I: Neighbour is removed (1− φ).
• II: Neighbour is not removed (φ), but not in GC (uk).
• So, probability is 1− φ+ φuk .
• On average∑
k qk(1− φ+ φuk).
• Solve for u gives solution.
Node failure
How fast is giant component destroyed if nodes are removed?
Same approach
• Probability φ node not removed from network.
• Again u probability link does not connect to GC.
Self consistency
• I: Neighbour is removed (1− φ).
• II: Neighbour is not removed (φ), but not in GC (uk).
• So, probability is 1− φ+ φuk .
• On average 1− φ+ φ∑
k qkuk .
• Solve for u gives solution.
Node failure
How fast is giant component destroyed if nodes are removed?
Same approach
• Probability φ node not removed from network.
• Again u probability link does not connect to GC.
Self consistency
• I: Neighbour is removed (1− φ).
• II: Neighbour is not removed (φ), but not in GC (uk).
• So, probability is 1− φ+ φuk .
• On average 1− φ+ φg1(u).
• Solve for u gives solution.
Node failure
How fast is giant component destroyed if nodes are removed?
Same approach
• Probability φ node not removed from network.
• Again u probability link does not connect to GC.
Self consistency
• I: Neighbour is removed (1− φ).
• II: Neighbour is not removed (φ), but not in GC (uk).
• So, probability is 1− φ+ φuk .
• On average 1− φ+ φg1(u) = u.
• Solve for u gives solution.
Node failure
How fast is giant component destroyed if nodes are removed?
Same approach
• Probability φ node not removed from network.
• Again u probability link does not connect to GC.
Self consistency
• I: Neighbour is removed (1− φ).
• II: Neighbour is not removed (φ), but not in GC (uk).
• So, probability is 1− φ+ φuk .
• On average 1− φ+ φg1(u) = u.
• Solve for u gives solution.
Node failure
• Again, solving u = 1− φ+ φg1(u) not easy.
• But if ∂∂u1− φ+ φg1(u) > 1 GC exists.
• For ER φc = 1/〈k〉, for scale free φc = 0.
0 0.2 0.4 0.6 0.8 1
0
0.2
0.4
0.6
0.8
1
ER
Scale Free
φ
S
Node failure
• Again, solving u = 1− φ+ φg1(u) not easy.
• But if ∂∂u1− φ+ φg1(u) > 1 GC exists.
• For ER φc = 1/〈k〉, for scale free φc = 0.
0 0.2 0.4 0.6 0.8 1
0
0.2
0.4
0.6
0.8
1
ER
Scale Free
φ
S
Node failure
• Again, solving u = 1− φ+ φg1(u) not easy.
• But if φg ′1(u) > 1 GC exists.
• For ER φc = 1/〈k〉, for scale free φc = 0.
0 0.2 0.4 0.6 0.8 1
0
0.2
0.4
0.6
0.8
1
ER
Scale Free
φ
S
Node failure
• Again, solving u = 1− φ+ φg1(u) not easy.
• But if φ > 1g ′1(u)
GC exists.
• For ER φc = 1/〈k〉, for scale free φc = 0.
0 0.2 0.4 0.6 0.8 1
0
0.2
0.4
0.6
0.8
1
ER
Scale Free
φ
S
Node failure
• Again, solving u = 1− φ+ φg1(u) not easy.
• But if φ > 1g ′1(u)
= φc GC exists.
• For ER φc = 1/〈k〉, for scale free φc = 0.
0 0.2 0.4 0.6 0.8 1
0
0.2
0.4
0.6
0.8
1
ER
Scale Free
φ
S
Node failure
• Again, solving u = 1− φ+ φg1(u) not easy.
• But if φ > 1g ′1(u)
= φc GC exists.
• For ER φc = 1/〈k〉, for scale free φc = 0.
0 0.2 0.4 0.6 0.8 1
0
0.2
0.4
0.6
0.8
1
ER
Scale Free
φ
S
Node failure
• Again, solving u = 1− φ+ φg1(u) not easy.
• But if φ > 1g ′1(u)
= φc GC exists.
• For ER φc = 1/〈k〉, for scale free φc = 0.
0 0.2 0.4 0.6 0.8 1
0
0.2
0.4
0.6
0.8
1
ER
Scale Free
φ
S
0 0.2 0.4 0.6 0.8 1
0
0.2
0.4
0.6
0.8
1
ER
Scale Free
φ
S
Node attack
What if we attack specific nodes?
Same approach
• Probability φk node of degree k does not “fail”.
• On average 〈φ〉 =∑
k φkpk .
• Again u probability link does not connect to GC.
Self consistency
• I: Neighbour is removed (1− φk).
• II: Neighbour is not removed (φk), but not in GC (uk−1).
• So on average u =∑
k qk−1(1− φk + φkuk−1).
• Define f (u) =∑
k φkqk−1uk−1.
• Then u = 1− f (1) + f (u), solve for u gives solution.
Node attack
What if we attack specific nodes?
Same approach
• Probability φk node of degree k does not “fail”.
• On average 〈φ〉 =∑
k φkpk .
• Again u probability link does not connect to GC.
Self consistency
• I: Neighbour is removed (1− φk).
• II: Neighbour is not removed (φk), but not in GC (uk−1).
• So on average u =∑
k qk−1(1− φk + φkuk−1).
• Define f (u) =∑
k φkqk−1uk−1.
• Then u = 1− f (1) + f (u), solve for u gives solution.
Node attack
What if we attack specific nodes?
Same approach
• Probability φk node of degree k does not “fail”.
• On average 〈φ〉 =∑
k φkpk .
• Again u probability link does not connect to GC.
Self consistency
• I: Neighbour is removed (1− φk).
• II: Neighbour is not removed (φk), but not in GC (uk−1).
• So on average u =∑
k qk−1(1− φk + φkuk−1).
• Define f (u) =∑
k φkqk−1uk−1.
• Then u = 1− f (1) + f (u), solve for u gives solution.
Node attack
What if we attack specific nodes?
Same approach
• Probability φk node of degree k does not “fail”.
• On average 〈φ〉 =∑
k φkpk .
• Again u probability link does not connect to GC.
Self consistency
• I: Neighbour is removed (1− φk).
• II: Neighbour is not removed (φk), but not in GC (uk−1).
• So on average u =∑
k qk−1(1− φk + φkuk−1).
• Define f (u) =∑
k φkqk−1uk−1.
• Then u = 1− f (1) + f (u), solve for u gives solution.
Node attack
What if we attack specific nodes?
Same approach
• Probability φk node of degree k does not “fail”.
• On average 〈φ〉 =∑
k φkpk .
• Again u probability link does not connect to GC.
Self consistency
• I: Neighbour is removed (1− φk).
• II: Neighbour is not removed (φk), but not in GC (uk−1).
• So on average u =∑
k qk−1(1− φk + φkuk−1).
• Define f (u) =∑
k φkqk−1uk−1.
• Then u = 1− f (1) + f (u), solve for u gives solution.
Node attack
What if we attack specific nodes?
Same approach
• Probability φk node of degree k does not “fail”.
• On average 〈φ〉 =∑
k φkpk .
• Again u probability link does not connect to GC.
Self consistency
• I: Neighbour is removed (1− φk).
• II: Neighbour is not removed (φk), but not in GC (uk−1).
• So on average u =∑
k qk−1(1− φk + φkuk−1).
• Define f (u) =∑
k φkqk−1uk−1.
• Then u = 1− f (1) + f (u), solve for u gives solution.
Node attack
What if we attack specific nodes?
Same approach
• Probability φk node of degree k does not “fail”.
• On average 〈φ〉 =∑
k φkpk .
• Again u probability link does not connect to GC.
Self consistency
• I: Neighbour is removed (1− φk).
• II: Neighbour is not removed (φk), but not in GC (uk−1).
• So on average u =∑
k qk−1(1− φk + φkuk−1).
• Define f (u) =∑
k φkqk−1uk−1.
• Then u = 1− f (1) + f (u), solve for u gives solution.
Failure and Attack
Epidemics
Disease spreading
• Standard models: Susceptable, Infected, Recovered.
• SIR: transmission rate β, recovery rate ν.
• Infect neighbour with probability φ = 1− eβτ
• How far will it spread: giant component.
Percolation
• I: Disease not transmitted (1− φ).
• II: Disease transmitted (φ), but not to GC (uk).
• Already solved: critical φc = 1g ′1(u)
.
• Epidemiological threshold βτ = log 〈k2〉−〈k〉
〈k2〉−2〈k〉
Epidemics
Disease spreading
• Standard models: Susceptable, Infected, Recovered.
• SIR: transmission rate β, infectious time τ = 1/ν.
• Infect neighbour with probability φ = 1− eβτ
• How far will it spread: giant component.
Percolation
• I: Disease not transmitted (1− φ).
• II: Disease transmitted (φ), but not to GC (uk).
• Already solved: critical φc = 1g ′1(u)
.
• Epidemiological threshold βτ = log 〈k2〉−〈k〉
〈k2〉−2〈k〉
Epidemics
Disease spreading
• Standard models: Susceptable, Infected, Recovered.
• SIR: transmission rate β, infectious time τ = 1/ν.
• Infect neighbour with probability φ = 1− eβτ
• How far will it spread: giant component.
Percolation
• I: Disease not transmitted (1− φ).
• II: Disease transmitted (φ), but not to GC (uk).
• Already solved: critical φc = 1g ′1(u)
.
• Epidemiological threshold βτ = log 〈k2〉−〈k〉
〈k2〉−2〈k〉
Epidemics
Disease spreading
• Standard models: Susceptable, Infected, Recovered.
• SIR: transmission rate β, infectious time τ = 1/ν.
• Infect neighbour with probability φ = 1− eβτ
• How far will it spread: giant component.
Percolation
• I: Disease not transmitted (1− φ).
• II: Disease transmitted (φ), but not to GC (uk).
• Already solved: critical φc = 1g ′1(u)
.
• Epidemiological threshold βτ = log 〈k2〉−〈k〉
〈k2〉−2〈k〉
Epidemics
Disease spreading
• Standard models: Susceptable, Infected, Recovered.
• SIR: transmission rate β, infectious time τ = 1/ν.
• Infect neighbour with probability φ = 1− eβτ
• How far will it spread: giant component.
Percolation
• I: Disease not transmitted (1− φ).
• II: Disease transmitted (φ), but not to GC (uk).
• Already solved: critical φc = 〈k〉〈k2〉−〈k〉 .
• Epidemiological threshold βτ = log 〈k2〉−〈k〉
〈k2〉−2〈k〉
Epidemics
Disease spreading
• Standard models: Susceptable, Infected, Recovered.
• SIR: transmission rate β, infectious time τ = 1/ν.
• Infect neighbour with probability φ = 1− eβτ
• How far will it spread: giant component.
Percolation
• I: Disease not transmitted (1− φ).
• II: Disease transmitted (φ), but not to GC (uk).
• Already solved: critical φc = 〈k〉〈k2〉−〈k〉 .
• Epidemiological threshold βτ = log 〈k2〉−〈k〉
〈k2〉−2〈k〉
Epidemics
Epidemic threshold
• For ER, threshold βτ = log 〈k〉〈k〉−1 .
• For scale free, 〈k2〉 diverges: always epidemic outbreak.
0 0.2 0.4 0.6 0.8 1
0
0.5
1
ER
Scale Free
φ
S
Conclusions
Models
• Short pats & clustering: small world model
• Scale free: preferential attachment
• Many other mechanisms: e.g. triadic closure, homophily, etc. . .
• Focus on stylistic features.
Analysis
• Scale-free networks robust, spread fast, but vulnerable for attack.
• Generating functions greatly help analysis.
• Compare observed network to random/model. How does itdeviate?
Questions?