4 RandomNetworks Lastupdate2324
4 RandomNetworks Lastupdate2324
Complejidad y Redes.
Universidad Politécnica de Madrid
Introduction
Complejidad y Redes.
Universidad Politécnica de Madrid Network models. Random Networks 2
Slides based on:
Network Science
slides by L. Barabási and R. Sinatra
Chapter 3 Original slides available at: http://barabasi.com/networksciencebook/
Networks: An Introduction.
Book by M.J. Newman
Complejidad y Redes.
Universidad Politécnica de Madrid Network models. Random Networks 3
Introduction
Complejidad y Redes.
Universidad Politécnica de Madrid Network models. Random Networks 4
Why models?
If we want to generalize and make inference about networks with the same properties, we need
models.
“In general, a random graph” is a model network in which some specific set of parameters take fixed
values, but the network is random in other respects” (Newman, 2010).
Random network models: abstractions that reproduce some of the properties of complex networks,
either for:
• Inferring information about the nature of those properties.
• Inferring information about the possible mechanisms of network formation.
• Be a substrate to study the dynamics of phenomena in networks.
Complejidad y Redes.
Universidad Politécnica de Madrid Network models. Random Networks 5
Random Network Theory
It defines a set (ensemble) of networks that can appear with a certain probability, i.e., a
probability distribution over the set of all possible networks.
Consequently, the statistical properties of the model should not be confused with the
particular properties of a particular realization.
Complejidad y Redes.
Universidad Politécnica de Madrid Network models. Random Networks 6
® Translated slide from NNTT y Empresa, by J.I. Santos
Random Networks
Complejidad y Redes.
Universidad Politécnica de Madrid Network models. Random Networks 7
Random graph G(n, m) The Erdős–Rényi model
“One of the simplest examples of a random graph is the network in which we fix only the
number of nodes n and the number of links m.
That is, we take n nodes and place m links among them at random.
More precisely, we choose m pairs of nodes uniformly at random from all possible pairs and
connect them with a link. Typically, one stipulates that the network should be a simple
graph, i.e., that it should have no multilinks or self-links.”
Complejidad y Redes.
Universidad Politécnica de Madrid Network models. Random Networks 8
® From Networks: An Introduction, by M.J. Newman
Example: G(n,m) = G(10,20), 3 replications
Complejidad y Redes.
Universidad Politécnica de Madrid Network models. Random Networks 9
Random graph G(n, m) The Erdős–Rényi model
“The random graph model is not defined in terms of a single randomly generated network,
but as an ensemble of networks, i.e., a probability distribution over possible networks.
Thus, the model G(n, m) is correctly defined as a probability distribution P(G) over all graphs
G in which P(G) = 1/Ω”
“When one talks about the properties of random graphs one typically means the average
properties of the ensemble”
Complejidad y Redes.
Universidad Politécnica de Madrid Network models. Random Networks 10
® From Networks: An Introduction, by M.J. Newman
Random graph G(n, m) The Erdős–Rényi model
$ $($'()
The maximum number of links with n nodes: 𝐿!"# = % =
%
The number of ways we can select m links out of 𝐿!"# possible ones is
𝐿!"# 𝐿!"# !
𝐶*!!"# = =
𝑚 𝐿!"# − 𝑚 ! 𝑚!
Some properties of the random graph G(n, m) are straightforward to calculate; obviously, the average
number of link is m, for instance, and the average degree is <k> = 2m/n.
Unfortunately, other properties are not so easy to calculate, and most mathematical work has actually
been conducted on a slightly different model that is considerably easier to handle. This model is called
G(n, p).
Complejidad y Redes.
Universidad Politécnica de Madrid Network models. Random Networks 11
® From Networks: An Introduction, by M.J. Newman
Example: G(10,20), 3 replications
n=10
𝑛 𝑛(𝑛 − 1)
𝐿$%& = = = 45
2 2
𝐿$%& 𝐿$%& !
𝐶'$!"# = = = 3.17 ∗ 10()
𝑚 𝐿$%& − 𝑚 ! 𝑚!
Complejidad y Redes.
Universidad Politécnica de Madrid Network models. Random Networks 12
Random graph G(n, p) The Erdős–Rényi-Gilbert model
“The random network model G(n, p) was independently introduced by Edgar Nelson Gilbert
(1923-2013) the same year Erdős and Rényi published their first paper on the subject.”
Network Science by A.L. Barabási
In G(n, p) we fix not the number but the probability of link between nodes. Again, we have
n nodes, but now we place a link between each distinct pair with independent probability p.
Again, the technical definition of the random graph is not in terms of a single network, but
in terms of an ensemble, a probability distribution over all possible networks. To be specific,
G(n, p) is the ensemble of networks with n nodes in which each simple graph G appears
with probability
!
𝑃𝑟! = 𝑝" (1 − 𝑝) " #"
Complejidad y Redes.
Universidad Politécnica de Madrid Network models. Random Networks 13
® From Networks: An Introduction, by M.J. Newman
Random graph G(n, p)
The number of graphs with exactly n nodes and m links is equal to the number of ways of
picking the positions of the links from the distinct node pairs. Each of these graphs appears
with the same probability PrG, and hence the total probability of drawing a graph with m
links from our ensemble is:
$
!
% " #"
𝑃 𝑚 = 𝑝" (1 − 𝑝)
𝑚
which is just the standard binomial distribution. Then the average number of links is
!
"
𝑛
𝑚 = * 𝑚𝑃 𝑚 = 𝑝
2
"&'
The average degree in a graph with exactly m links is <k> = 2m/n, and hence the average
degree in G(n, p) is
!
"
2𝑚 2 𝑛
𝑘 = * 𝑃 𝑚 = 𝑝= 𝑛−1 𝑝
𝑛 𝑛 2
"&'
The probability that an individual node has k links follows a Binomial (n, p)
𝑛−1 (
𝑝 𝑘 = 𝑝 (1 − 𝑝)$#(#)
𝑘
Complejidad y Redes.
Universidad Politécnica de Madrid Network models. Random Networks 15
® From Networks: An Introduction, by M.J. Newman
Example: G(n,p) = G(10,0.5), 3 replications
𝑃𝑟! = 𝑝" (1 − 𝑝)*#$%#"
Complejidad y Redes.
Universidad Politécnica de Madrid Network models. Random Networks 16
Random graph G(n, p)
In many cases we are interested in the properties of large networks, so that n can be
assumed to be large (𝑛 → ∞).
Many networks have an average degree that is approximately constant as the network size
becomes large.
Complejidad y Redes.
Universidad Politécnica de Madrid Network models. Random Networks 17
® From Networks: An Introduction, by M.J. Newman
Clustering coefficient of a random graph
To calculate Ci, we used the expected number of links Li between the node’s ki neighbors:
𝑘+ 𝑘+ (𝑘+ − 1)
𝐿+ = 𝑝 =𝑝
2 2
2𝑒+ 2 𝐿+
𝐶+ = = =𝑝
𝑘+ (𝑘+ − 1) 𝑘+ (𝑘+ − 1)
( (
So: 𝐶+ = ≃
($#)) $
Complejidad y Redes.
Universidad Politécnica de Madrid Network models. Random Networks 18
® Slide from Network Science by A.L. Barabási
Evolution of a random graph G(n, p)
If we vary p from 0 to 1, a phase transition appears with the emergence of a giant
component (component whose size grows in proportion to n).
Complejidad y Redes.
Universidad Politécnica de Madrid Network models. Random Networks 19
Evolution of a random graph G(n, p)
𝑝 < 𝑝! 𝑝! = 1/𝑁
Complejidad y Redes.
Universidad Politécnica de Madrid Network models. Random Networks 20
N Are real networks like random graphs?
7 Subcritical Supercritical Fully Connected
1
Internet
04
Power Grid
27
Science
Collaboration
Actor Network
Yeast Protein
Interactions
and
1 10 <k>
Image 3.8
Real networks (from the perspective of the random model) seem to be mostly in the supercritical
Most real networks are supercritical.
regime
ava- The four (a regimes
giant component, but fragmentation of disconnected components). However, this
predicted by random network theory, marking with a
s es- fragmentation does
cross the location not appear
of several in realofnetworks,
real networks showing
Table 3.1. The diagramthat
indi- the random model does not capture
ain- ancates
important
that mostpart of itsare
networks structure.
in the supercritical regime, hence they are
expected to be broken into numerous isolated components. Only the actor
therComplejidad
network is in the connected regime, meaning that all nodes are expected
y Redes.
cule® Slidetofrom
Universidad Politécnica de Madrid
beNetwork
part of a single
Science by A.L. giant
Network models. Random Networks
Barabásicomponent. Note that while the boundary be-
21
Are real networks like random graphs?
… Random networks do not have hubs. Most nodes have a similar degree.
The degree distribution of a random Erdös-Rényi network does not capture the distributions
of the real networks
Complejidad y Redes.
Universidad Politécnica de Madrid Network models. Random Networks 22
® Translated slide from NNTT y Empresa, by J.I. Santos
Are real networks like random graphs?
If we plot <C>/<k> as a
function of N for several
undirected networks, we find
that <C>/<k> does not
decrease as 1/N, but it is
largely independent of N.
Complejidad y Redes.
Universidad Politécnica de Madrid Network models. Random Networks 23
® Translated slide from NNTT y Empresa, by J.I. Santos
Are real networks like random graphs?
Ln 𝑁
𝑑~
Ln 𝑘
m odel?
New
Complejidad y Redes.
Universidad Politécnica de Madrid Network models. Random Networks 24
® Slide from Network Science by A.L. Barabási
Ejemplo
Complejidad y Redes.
Universidad Politécnica de Madrid Network models. Random Networks # 26
“Small world” property
Now we look at the "average path length" of a network, that is, what would be the
distance that separates two nodes extracted at random?
Intuition (correct?):
Small networks ~ small distance
Medium networks ~ medium distance
Large networks ~ large distance
Complejidad y Redes.
Universidad Politécnica de Madrid Network models. Random Networks # 27
® Translated slide from NNTT y Empresa, by J.I. Santos
Bacon number
How far is a Hollywood actor from Kevin Bacon? Assume that two actors have a link if they
have shared roles in at least one movie
The oracle of
Bacon
Complejidad y Redes.
Universidad Politécnica de Madrid Network models. Random Networks # 28
® Translated slide from NNTT y Empresa, by J.I. Santos
Erdös number
How far is an investigator from the mathematician Paul Erdös? Assume that two
researchers have a link if they have collaborated on at least one scientific article?
Complejidad y Redes.
Universidad Politécnica de Madrid Network models. Random Networks # 29
® Translated slide from NNTT y Empresa, by J.I. Santos
Stanley Milgram
• A social psychologist
• Yale and Harvard University
Complejidad y Redes.
Universidad Politécnica de Madrid Network models. Random Networks # 31
® Slide from Web Science and Web Technology by M. Strohmaier
The small-world problem
Starting with any two people in the world, what is the likelihood that they will know
each other?
A somewhat more sophisticated formulation, however, takes account of the fact that
while person X and Z may not know each other directly, they may share a mutual
acquaintance - that is, a person who knows both of them. One can then think of an
acquaintance chain with X knowing Y and Y knowing Z.
Moreover, one can imagine circumstances in which X is linked to Z not by a single link, but
by a series of links, X-A-B-C-D…Y-Z. That is to say, person X knows person A who in turn
knows person B, who knows C… who knows Y, who knows Z.
Complejidad y Redes.
Universidad Politécnica de Madrid Network models. Random Networks # 32
® Slide from Web Science and Web Technology by M. Strohmaier
An Experimental Study of the Small World Problem [Travers and Milgram 1969]
Milgram’s experiment (1967): send a letter from Nebraska to address Boston using only a
chain of acquaintances
Complejidad y Redes.
Universidad Politécnica de Madrid Network models. Random Networks # 34
® Translated slide from NNTT y Empresa, by J.I. Santos
Experiment:
Goal
• Define a single target person and a group of starting persons
• Generate an acquaintance chain from each starter to the target
Experimental Set Up
• Each starter receives a document
• was asked to begin moving it by mail toward the target
• Information about the target: name, address, occupation, company, college, year of
graduation, wife’s name and hometown
• Information about relationship (friend/acquaintance)
Constraints
• starter group was only allowed to send the document to people they know and
• was urged to choose the next recipient in a way as to advance the progress of the
document toward the target
Complejidad y Redes.
Universidad Politécnica de Madrid Network models. Random Networks # 35
® Slide from Web Science and Web Technology by M. Strohmaier
Experiment:
Questions
• How many of the starters would be able to establish contact with the target?
• How many intermediaries would be required to link starters with the target?
Complejidad y Redes.
Universidad Politécnica de Madrid Network models. Random Networks # 36
® Slide from Web Science and Web Technology by M. Strohmaier
An Experimental Study of the Small World Problem [Travers and Milgram 1969]
Set Up
• Target person:
• A Boston stockbroker
Complejidad y Redes.
Universidad Politécnica de Madrid Network models. Random Networks # 37
® Slide from Web Science and Web Technology by M. Strohmaier
Results
• Milgram himself never used the phrase "six degrees of separation”, but it comes from
the name of a play (and latter movie) written by American playwright John Guare from
1990.
Complejidad y Redes.
Universidad Politécnica de Madrid Network models. Random Networks # 38
® Slide from Web Science and Web Technology by M. Strohmaier
Follow up work (2008) https://arxiv.org/PS_cache/arxiv/pdf/0803/0803.0939v1.pdf
Complejidad y Redes.
Universidad Politécnica de Madrid Network models. Random Networks # 39
® Slide from Web Science and Web Technology by M. Strohmaier
Follow up work (2008) https://arxiv.org/PS_cache/arxiv/pdf/0803/0803.0939v1.pdf
Complejidad y Redes.
Universidad Politécnica de Madrid Network models. Random Networks # 40
® Slide from Web Science and Web Technology by M. Strohmaier
Small World property [Newman 2003] http://epubs.siam.org/doi/pdf/10.1137/S003614450342480
Complejidad y Redes.
Universidad Politécnica de Madrid Network models. Random Networks # 41
® based on Slide from Web Science and Web Technology by M. Strohmaier
ALL MODELS ARE WRONG, BUT SOME ARE USEFUL
George Box
Complejidad y Redes.
Universidad Politécnica de Madrid Network models. Random Networks 62
¡Gracias!
Complejidad y Redes.
Universidad Politécnica de Madrid