0% found this document useful (0 votes)
3 views

course 1-2

The document discusses the study of complex networks, highlighting their usefulness in understanding various systems such as social networks, organizational communication, and recipe ingredient relationships. It explains key concepts like node degrees, network types, and structures, as well as modeling techniques and software tools for network analysis. The document emphasizes the insights gained from visualizing networks and their applications in processes like information diffusion and resilience to attacks.

Uploaded by

Alexandru Berci
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

course 1-2

The document discusses the study of complex networks, highlighting their usefulness in understanding various systems such as social networks, organizational communication, and recipe ingredient relationships. It explains key concepts like node degrees, network types, and structures, as well as modeling techniques and software tools for network analysis. The document emphasizes the insights gained from visualizing networks and their applications in processes like information diffusion and resilience to attacks.

Uploaded by

Alexandru Berci
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 39

COMPLEX NETWORKS

1
October 2021
What do we get out of studying
systems as networks?
The world is very complex, by representing it as a
network we can gain very useful insights. We can
understand how:
■ information diffuses in social networks
■ resilient different infrastructure networks, such as
roads, or the electrical power grid are to random
or intentional shocks
■ to quantify properties of the connectivity and
topology of the analyzed systems and identify
important structural components
Political blogs

[Adamic & Glance 2005]


A data set of political blogs prior to the 2004
presidential election
■ The Liberal blogs are colored in blue
■ The Conservatives are colored red
■ Liberal to liberal ties are blue, conservative to
conservative are red
■ Liberal to conservative are purple, conservative to
liberal ties are orange yellow.
■ an echo chamber effect is apparent right away:
Liberals are primarily talking to Liberals and
Conservatives are primarily talking to
Conservatives.
Organizations

[Adamic & Adar 2005]


Email communication of Hewlett-Packard labs’
researchers
■ If two people had exchanged at least a couple of
emails back and forth over the period of a few
months they get a gray edge
■ black edges, which represent the formal organization,
who reports to whom
the email communication is more likely to occur
between individuals who are closer together in the
organizational hierarchy.
But there are enough shortcuts across the organization
that any two individuals are connected through a short
number of hops.
Facebook networks
■ This network is an ego-centered Facebook
network example on which was performed an
automated community detection algorithm
■ the different groups roughly corresponds to the
different contexts in which the person met people
from family, school to work, to outside of school
and work activities.
■ The node sizes are proportional to the number of
messages exchanged with the corresponding user.
Ingredients network
Network of recipe ingredients
■ Tens of thousands of recipes were analyzed to find
which ingredients go well together and made a
network.
■ In this networks this one you can be seen that there
are two main communities. One of savorer
ingredients, and one of sweeter ingredients.
What was shown you so far is that even just simple
visualization can provide us with a lot of
understanding on the multitude of connections that
we know are there but that might be rather invisible to
us until we represent them as a network where they
are all connected together.
Internet Map
Protein-Protein Interaction

[Jeong et al. 2001]


What are networks?
■ Networks are sets of nodes N connected by edges E
■ Network ≡ Graph = G(N,E)

points lines
vertices edges, arcs math
computer
nodes links science
sites bonds physics
ties,
actors relations sociology
Degrees of a nodes
■ the degree of a node of a graph is the
number of edges incident to the node
■ In a directed graph each node has a in-
degree and an out-degree.
■ In-degree: number of edges leaving the
node
■ Out-degree: number of edges entering the
node
■ Degree = In-degree + Out-degree
Degree distribution

The degree distribution is a function P(k), which gives the probability


of a randomly chosen node from the graph having degree k.

What is the degree distribution of the complete graph on 1000 nodes?


Graph representation - Adjacency matrix
Networks are sparse graphs
Graph representation - Adjacency List
2 5
6
7
.
.
2 9
4 69
5 6
7
7
A python-NetworkX code
example
■ Get the 5 most well connected persons
in the Zakary Karate Club
G = nx.karate_club_graph()
mapping={node: node+1 for node in G.degree()}
G=nx.relabel_nodes(G,mapping)
high_degrees = sorted([(node,G.degree(node)) \
for node in G.degree()], key=operator.itemgetter(1),
reverse=True )[0:4]

Out[1]: [(34, 17), (1, 16), (33, 12), (3, 10)]


Complete Graph
Bipartite Graph
Bipartite Graph - Projections
Connected components (undirected graphs)

A connected component
of an undirected graph is
a subgraph in which any
two nodes are connected
to each other by paths,
and which is connected to
no additional vertices in
the graph
Strongly connected components
(directed graph)
A directed graph is called strongly
connected if there is a path in each
direction between each pair of
vertices of the graph. A pair of nodes
u and v are said to be strongly
connected to each other if there is a
path in each direction between them.

A strongly connected component


of a directed graph G is a subgraph
that is strongly connected, and is
maximal with this property: no
additional edges or nodes from G can
be included in the subgraph without
Network structure

■ Are nodes connected through the network?


 The nodes are generally connected more then one way
■ How far apart are they?
 How many hops does it take following these different
connections?
■ Are some nodes more important due to their position in
the network?
■ Is the network composed of communities?
 sets of nodes that are especially densely connected
Model network formation
■ Randomly generated networks
 throwing edges at random and connecting different nodes.
■ Preferential attachment
 a phenomenon of rich get richer (As new edges are added,
they are more likely to be added to the nodes that already
have many other edges.
■ Small-world networks
 a friend of a friend is likely to be a friend because friends
tend to introduce their friends to each other, yet any two
people in the world are connected through a short number
of hops (Facebook: 4.7 hops)
■ Optimization, strategic network formation
How does network structure
affect processes?
■ information diffusion
 Sometimes viruses diffuse not information (how quickly a virus is going
to spread, and what would be the best immunization strategies)
■ opinion formation
 Could be a consensus to be reached across the network
■ coordination/cooperation
 If you have a certain task to do, but it, but it depends on increments from
the nodes that you're tied to, how quickly can you accomplish the task
■ resilience to attack
 a certain, subset of the nodes, are removed from the network, can the
network still function

=> interesting applications of complex networks analysis


Software tools in this class
■ NetLogo (modeling network dynamics, use Netlogo 5.x to see the examples)
■ Networkx (for programming assignments) + Python, Anaconda, Jupyter
Notebook
 extensive functionality
 scales to large networks by taking
 advantage of existing C, Fortran libraries for
 large matrix computations
 open source
 http://networkx.lanl.gov/
■ Gephi (visualization and basic network metrics)
 http://gephi.org/
 Take the datafile dining.gephi from moodle
 let’s play
Symmetric relationships

■ Nodes: people
■ Edges: Friendship, marital
or family ties
■ Generally symmetric relationships

[Kristakis and Fowler 2007]


Network types

■ Directed networks
■ Undirected networks
■ Weighted networks
■ Signed networks
■ Multigraphs

=> with associated Python NetworkX code


Asymmetric relationships

■ Nodes: animals
■ Edges: what eats what
■ Food web: asymmetric relationships
Edge direction
Undirected Networks: Directed Networks:
edges have no directions edges have directions
Weighted networks

■ Not all relationships are


equal. Some carry more
weight than others.
■ Edges are assigned a
numerical weight.
Labeled networks

■ Edges carry information


about antagonism or
friendship based on
conflict or agreement.
■ Ex: People can declare
friends or foes (Epinions,
Slashdot)
Labeled attributes

■ Edges can carry many


other labels attributes
■ Pairs of nodes can not
have multiple relations
simultaneously
Multigraphs
■ Multigraph: there can be
parallel edges connected
the same pair of nodes
■ So, pairs of nodes can have
multiple relations
simultaneously
NetworkX graph creation code bits

You might also like