GENERATING Networks that obey power laws

•Generating
Network Topologies That Obey Power Laws,
C. Palmer, J. G. Steffan
•Emergence
Of Scaling in Random Networks, A. Barabási, R. Albert
Μυρτώ Ντέτσικα
´
Many “real-world networks” have been found to
fall into the category of scale-free networks
² Social networks
² Computer networks
² World Wide Web
² Internet
´
Defining characteristic: their degree distribution follows a power-law
relationship : the number of vertices N(m) with m edges is given by
N(m) ~ m -α
•Scale-free:
independency from the total
number of vertices
•Many
•Few
•
•
•
vertices with a few links
vertices with high connectivity (hubs)
Fault tolerance
Connectedness
small world network (small diameter)
´
Power –Law 1: rank exponent R
« The out-degree, du, of a node u, is proportional to the rank of the node
(after sorting all nodes from the most connected to the least
connected), ru , to the power of a constant,
R: du ∞ ruR
´
Power –Law 2: out-degree exponent O
« The frequency ,fd, of an out-degree, d, is proportional to the out-degree
to the power of a constant,
O: fd ∞ dO
´
Power –Law 3: hop-plot exponent H
« The total number of pairs of nodes, P(h), within h hops, is proportional to
the number of hops to the power of a constant,
H: P(h) ∞ hH , h<<δ, where δ is the diameter
´
Power –Law 4: eigen exponent Є
« The eigenvalues, λi ,of a graph are proportional to the order i, to the
power of a constant,
Є : λi ∞ i Є
[ Generating Network Topologies That Obey Power Laws,
C. Palmer, J. G. Steffan ]
´
´
PLOD (Power-Law Out-Degree Algorithm
Recursive Topology generator
•Initially,
each node is
randomly assigned an outdegree using the exponential
distribution (credits)
•Then,
until M edges are
added in the adjacency
matrix,
•
•
Pick a random pair of
nodes
Add an edge between
them if both nodes have
remaining out-degree
credits and they are not
already connected
•We
define a probability
distribution function that
randomly selects a pair of
nodes
•We
use this function to
produce a network graph
with real-valued edge weight
•20-80
•The
distribution is used
size of the network has
to be a power of 2.
•Adjacency
•0
matrix
in diagonal – symmetric
: percentage of
edges placed in each
subarray
α
β
γ
δ
•α,β,γ,δ
[Emergence of Scaling in Random Networks,
A. Barabási, R. Albert]
´
Introduction of a model based on two generic mechanisms
« Growth of the network
« Preferential attachment
´
Power-law are found to have two basic features:
«
They are generally grown as vertices and edges are
added over time (scalability)
«
New nodes that join the network are most likely connected
to a well-connected node that already exists in the network
(preferential attachment)
²
A new vertex is connected to an existing vertex having degree d
with rate proportional to d.
´
´
´
Initially, we consider that the network consists of a small number, mo, of
nodes.
At each timestep a new node is added.
« After t timesteps, the network size is m0 + t
Each new node is added with m edges that link the node with m different
nodes already present in the network.
« Preferential attachment: the probability Π of a newly entered node to
connect to node i depends on the connectivity ki of node i:
Π(ki ) = ki /Σ kj
« After t timesteps, the total number of edges in the network is m t
Node 11 joins:
•m=3
nodes need to be chosen
to connect to node 11
•The sum of all degrees is 18
• node 1 is chosen with
probability 5/18
• node 2 is chosen with
probability 3/18;
•node 7 is chosen with
probability 3/18;
•Each of nodes 3,4,5,6,7,8 are
chosen with probability 1/18;
10
9
3
2
4
8
1
7
5
6
´
Objective Modular Network Testbed in C++
http://www.omnetpp.org
´
Discrete Event Simulation Environment
Object Oriented design
Open – source
´
´
´
General structure
« Modules implement application-specific functionality
« Modules can be connected by connections through input and output
gates
« Modules communicate by exchanging messages
« Modules are implemented as C++ objects
² All modules are subclasses of cSimpleModule class
« Topology of module connections is specified using an OMNeT++-specific
language called NED
² OMNeT++ contains a graphical editor for .ned files: GNED
« Communication between modules is achieved through channels
Bit rate, latency and error rate can also be implemented
simple Txc1
gates:
in: in;
out: out;
endsimple
// Two instances (tic and toc) of Txc1 connected both ways.
// Tic and toc will pass messages to one another.
module Tictoc1
submodules:
tic: Txc1;
toc: Txc1;
connections:
tic.out --> delay 100ms --> toc.in;
tic.in <-- delay 100ms <-- toc.out;
endmodule
network tictoc1 : Tictoc1
endnetwork
#include <string.h>
#include <omnetpp.h>
class Txc1 : public cSimpleModule
{
protected:
virtual void initialize();
virtual void handleMessage(cMessage *msg);
};
Define_Module(Txc1);
void Txc1::initialize()
{
if (strcmp("tic", name()) == 0)
{
// The `ev' object works like `cout' in C++.
ev << "Sending initial message\n";
cMessage *msg = new cMessage("tictocMsg");
send(msg, "out");
}
}
void Txc1::handleMessage(cMessage *msg)
{
// msg->name() is name of the msg object, here it
will be "tictocMsg".
ev << "Received message `" << msg->name() << "',
sending it out again\n";
send(msg, "out");
}