Title: Power Law Network and the Small world phenomena
1Power Law Network and the Small world phenomena
2Introduction
- Graphs are everywhere
- What can we do with graphs?
- What patterns or laws hold for most real-world
graphs? - Can we build models of graph generation and
evolution?
Needle exchange networks of drug users
3Internet
4Power Law Patterns
- Power Law degree distributions
Many low-degree nodes
Few high-degree nodes
log(Count)
log(Degree)
Internet in December 1998
YaXb
5Small World Patterns
- Small-world
- Watts, Strogatz
- 6 degrees of separation
- Small diameter
- Effective diameter
- Distance at which 90 of pairs of nodes are
reachable
Epinions who-trusts-whom social network
6A Model for small world Watts-Strogatz
In a small world, there is the Clustering effect
My friends will know each other with high
probability!
Probability to be connected C p
of links between 1,2,n neighbors
C
n(n-1)/2
Clustering coefficient measures the fraction of
neighbors of a node that are connected themselves
(Nature 393, 440 (1998))
7Watts and Strogatz model WS98
- Start with a ring, where every node is connected
to the next z nodes ( a regular lattice) - With probability p, rewire every edge (or, add a
shortcut) to a uniformly chosen destination.
order
p 0
0 lt p lt 1
p 1
randomness
Small world
8Clustering and Path Length
Random Graphs have a low clustering coefficient
but a low diameter
Regular Graphs have a high clustering coefficient
but also a high diameter
9Clustering Coefficient Characteristic Path
Length
log-scale in p
For small p, C ¾ L logn
When p 0, C 3(k-2)/4(k-1) ¾ L n/k
10Social Small world phenomena
- Small worlds networks with short paths
Stanley Milgram (1933-1984) The man who shocked
the world
Obedience to authority (1963)
Small world experiment (1967)
11Small world experiment
- Letters were handed out to people in Nebraska to
be sent to a target in Boston - People were instructed to pass on the letters to
someone they knew on first-name basis - The letters that reached the destination followed
paths of length around 6 - Six degrees of separation (play of John Guare)
- Small world project http//smallworld.columbia.ed
u/index.html
12Milgrams experiment revisited
- What did Milgrams experiment show?
- (a) There are short paths in large networks that
connect individuals - (b) People are able to find these short paths
using a simple, greedy, decentralized algorithm - Small world models take care of (a)
- what about (b)? Kleinberg
13Kleinbergs model
- Consider a directed 2-dimensional lattice
- For each vertex u add q shortcuts
- choose vertex v as the destination of the
shortcut with probability proportional to
d(u,v)-r - when r 0, we have uniform probabilities
14(No Transcript)
15(No Transcript)
16Siginficance of r
- Given node u if we can partition the remaining
peers into sets A1, A2, A3, , AlogN , where Ai,
consists of all nodes whose distance from u is
between 2i and 2i1, i0..logN-1. - Then given r dim each long range contact of u
is nearly equally likely to belong to any of the
sets Ai - When q logN on average each node will have a
link in each set of Ai
17a probability decaying like the dth power of the
distance is in fact uniform over all distance
scalesa node is roughly as likely to form links
at distances 1 to 10 as it is at distances 10 to
100, 100 to 1000, and so on.
18Searching in a small world
- Given a source s and a destination t, the search
algorithm - knows the positions of the nodes on the grid
(geography information) - knows the neighbors and shortcuts of the current
node (local information) - operates greedily, each time moving as close to t
as possible (greedy operation) - knows the neighbors and shortcuts of all nodes
seen so far (history information) - Kleinberg proved the following
- When r2, an algorithm that uses only local
information at each node (not 4) can reach the
destination in expected time O(log2n). - When rlt2 a local greedy algorithm (1-4) needs
expected time O(n(2-r)/3). - When rgt2 a local greedy algorithm (1-4) needs
expected time O(n(r-2)/(r-1)). - Generalizes for a d-dimensional lattice, when rd
(query time is independent of the lattice
dimension) - d 1, the Watts-Strogatz model
19The decentralized search algorithm
- Given a source s and a grid position of
destination t, the search algorithm - knows the positions of the nodes on the grid
(geography information) - knows the neighbors and shortcuts of the current
node (local information) - operates greedily, each time moving as close to
t as possible (greedy operation) - knows the neighbors and shortcuts of all nodes
seen so far (history information) - Greedy algorithm
- Send the message to the neighbor which ever is
closer to the target node
20Kleinberg results
- When r2, an algorithm that uses only local
information at each node (not 4) can reach the
destination in expected time O(log2n). - When rlt2 a local greedy algorithm (1-4) needs
expected time O(n(2-r)/3). - When rgt2 a local greedy algorithm (1-4) needs
expected time O(n(r-2)/(r-1)).
21Searching in a small world
- For r lt 2, the graph has paths of logarithmic
length (small world), but a greedy algorithm
cannot find them - For r gt 2, the graph does not have short paths
- For r 2 is the only case where there are short
paths, and the greedy algorithm is able to find
them
22Traditional DHTs and Kleinberg model
- P-Grids model
- Kleinbergs model
23Power-law networks
- The degree distributions of networks may follow a
power law - p(k) Ck-a
24Power-law signature
- Power-law distribution gives a line in the
log-log plot - a power-law exponent (typically 2 a 3)
log p(k) -a logk logC
a
log frequency
frequency
log degree
degree
25BA model for generating PLRG
A.-L.Barabási, R. Albert, Science 286, 509 (1999)
26Barabási/Albert Graph Construction
- Allocating an initial number (N0) of unconnected
nodes. - Allocate the remaining N nodes by assigning K
edges to each new node, which are connected to
the already allocated nodes "preferentially". - preferentially choosing the node to connected
based on the number of nodes already allocated to
that node. - P(i)Ki/Sum(Ki)
27(No Transcript)
28public class BAGraph extends Graph int N
int N0 int K ArrayList P BAGraph
(int N, int N0, int K) super() this.N
N this.N0 N0 this.K K initGraph()
public void initGraph() for (int i0
iltN i) nodes.add(new Node(i)) P new
ArrayList() //Allocating N0 of unconnected
nodes for (int i0 iltN0 i)
P.add(nodes.get(i)) for (int iN0 iltN i)
linkNode(i) sortByDegree(true)
public void linkNode(int i) Node n
(Node)nodes.get(i) TreeSet Q new
TreeSet() while (Q.size()ltK) // randomly
select nodes from P until QK
Q.add(P.get(randInt(P.size()))) for(Iterat
or itQ.iterator()it.hasNext()) Node n1
(Node)it.next() n.addEdge(n1) n1.addEdge(n)
P.add(n1) P.add(n)
public static void main (String args)
boolean print false int NInteger.parseInt(
arg(args, 0, "100")) if (Nlt100) // if lt 100
or neg NMath.abs(N) printtrue int
KInteger.parseInt(arg(args, 1, "4")) int
N0Integer.parseInt(arg(args, 2, "8")) String
name"Bag"N"-"K"-"N0 System.out.println(nam
e " BAGraph N"N" K"K" N0"N0) BAGraph
g new BAGraph(N, N0, K) if (print)
g.printByLevel() g.printHist("Edge
Histogram") g.printLevels("Levels Histogram")
29power-law graph
30Poisson graph
31Bag100-2-4 B/A graph 100 nodes, 2 edge/node,
initial 4 empty nodes
32plots
- Histogram
- A log-log edge histogram showing the power-law
characteristics of the dataset. - Levels
- A bar chart of the number of nodes at each
"level", the distance to the root, or most
connected, node - Searches
- A point plot of 3 sets of 100 sample searches.
The data points are sorted (by power-law first)
and plotted by rank order thus the X axis is
simply ordered from 0-99 for the 100 samples. - Power Law search look at the node, its edge
nodes, and their edge nodes. If the search does
not succeed, hop to the most populous node
counting the three search levels (the node, its
edges, and their edges). - Depth-First Use radius of three, but randomly
choosing the node to hop to - Breadth-First
33Histogram
34Levels
35Search graph