Download as pdf or txt
Download as pdf or txt
You are on page 1of 24

Networks in economics

Lecture 2 - Graph Theory


and finance
Outline

• Types of networks

• Graphs - notation and terminology

• Properties of graphs

• Basic random graph model

• Why your friends have more friends than you do


What are networks and why study them?

• A network is a set of items (nodes) connected by edges or links.

Units (nodes) Interaction


Individuals Friendship
Firms Trade
Banks Credit flow
Airports Transportation
Websites Web links

• Networks are also found in biological (genetic and metabolic networks) and
ecological systems (food webs).

• Questions we can address with networks: How does structure effect


performance and fragility? Are there systemic risks (bank failures, spread of
disease, etc)?
The history of the study of networks

• Graph theory ~ begins with Euler’s 1735 solution to the Koenigsberg Bridge
problem.

• Networks in sociology ~ Focus on structure and interaction in small networks


that were constructed from survey data. Typical question “Which node in this
network would prove most crucial to the network's [property] if it were
removed?”

• More recently ~ lots of data (networks with 1000‘s of nodes) is available and
handled by computers. Statistical tools have been deployed to investigate
these networks. Now the question is “What percentage of nodes need to be
removed to substantially affect network [property]?”

• Modern theory ~ (i) statistical tools to characterize real networks, (ii) build
models of networks and make predictions.
Graph theory

• A graph G = (V, E) consists of a set of nodes (vertices) V = {1, . . . , N } and


edges describing which pair of vertices are connected, E = {(i, j) | i, j ∈ V } .

• Graph may be weighted [(i, j) ∈ R] or not [(i, j) ∈ {0, 1}] .

• Graph is undirected if (i, j) = (j, i).

• Adjacency matrix A ∈ {0, 1}N ×N where Aij = 1 ↔ (i, j) ∈ E .


Walks, Paths and Cycles - 1

• Walk ~ sequence of edges: (i,c),(c,k),(k,j),(j,p).

• Path ~ walk between two specific nodes (i and j, for example): (i,c),(c,k),(k,j).

• Cycle ~ path starting and ending at the same node: (i,c),(c,k),(k,j),(j,i).

• Geodesic ~ shortest path between two nodes: (i,j).

• A path’s (walk’s) length is the number of edges involved.


Walks, Paths and Cycles - 2
!!
• Using the adjacency matrix, A =
3
Aij Ajk Aki gives us all the cycles of
length 3 in the graph. i j,k

• (A × A)ij gives all paths of length 2 between nodes i and j.


Components

• An undirected graph is connected if every two nodes in the network are


joined together in a path.

• A component in a graph is a connected subgraph, i.e.,


G! = (V ! , E ! ), s.t. V ! ⊂ V, E ! ⊂ E.
∀ i, j ∈ V ! ∃ a path contains in E !

• A directed graph is strongly connected if there is a directed path in between


every pair of nodes, i.e., i -> j and j -> i.
Types of graphs
Maximal independent set

• Given an undirected graph G = (V, E) an independent set is a subset U ⊂ V


such that ∀ i, j ∈ U, (i, j) ∈
/ E.

• An independent set is maximal if no new node can be added to the set


without violating independence.
Neighborhood and degree of a node

• The neighborhood of a node i is the set of other node that i is adjacent


with, Ni = {j | (i, j) ∈ E}.

• For an undirected graph, the degree of node i is the cardinality of it’s


neighborhood, di = |Ni |.

• For an undirected graph:


!
In degree : diin = Aij
j
!
Out degree : diout = Aji
j
Properties of networks

• Small networks are easy to visualize. But once we increase the number of
nodes, we need to resort to other descriptive summary statistics.

• Examples of such measures: (i) Average path length, (ii) Clustering, (iii)
Centrality and (iv) Degree distribution.
Diameter and average path length

• Define G(i,j) as the geodesic (shortest) path length between nodes i and j in an
undirected graph. The diameter is the largest geodesic path, i.e.,

diameter = max G(i, j)


i,j

• The average path length is the average distance between any two nodes in
the graph. !
i<j G(i, j)
average path length = N (N −1)
2

• The average path length is bounded above by the diameter.

• If a graph is not connected, take the diameter of the largest component.


Clustering

• Measure for how tightly linked nodes are by counting the number of triangles.

• Ratio of the number of triangles in the graph over the number of triples
(subgraphs of 3 nodes with either 2 or 3 edges between themselves).
3 × number of triangles in network
CI =
number of connected triples of vertices

• The clustering coefficient is bounded above and below by 1 and 0,


respectively.
Clustering

• One can also measure the clustering of individual nodes. For an undirected
graph: !
j,k Aij Ajk Aki
CIi = d (d −1)
i i
2

• The average clustering coefficient:


1 !
CI Avg
= CIi
N i
Centrality

• A measure of how important a particular node is in the network. Examples


include:
di
degree centrality :
(N − 1)
N −1
closeness centrality : !
j!=i G(i, j)
1
eigenvector centrality : x = Ax
λ
Degree distribution

• P(d) ~ frequency of different nodes having degree = d. For a given graph, P(d)
is a histogram of fraction of nodes with degree d.

• For random graphs, P(d) is a well defined probability distribution. Examples


of degree distributions include:

P (d) = c e−α d , c > 0, α > 0


P (d) = c d−γ , c > 0, γ > 0
Assortativity

• A measure for how different nodes prefer to attach themselves to each other.

• Case 1: High degree nodes typically attach themselves to other high degree
nodes. This tendency is referred to as assortativity.

• Case 2: The opposing case where High degree nodes are typically linked to
low degree nodes is referred to as dissortativity.

• Define eij as the fraction of edges connecting nodes of degree i with nodes
of degree j.
! ! !
eij = 1, eij = ai , eij = bj .
ij j i
! !
i eii! i ai bi
r= .
1 − i ai bi
Basic random graph model

• Erdos Renyi Random graph ~ N nodes; Link between two nodes occurs with
probability p.

• Average degree per node?

• Degree distribution?

• Clustering coefficient?

• Diameter?

• Largest Component?
Why your friends have more friends than you

• Paper by S. Feld published in the American Journal of Sociology in 1991.

• Viewing friendship as a way of evaluating ones self, how do people determine


what is an adequate number of friends?

• “If people look at the number of friends their friends have, it is likely they will
feel relatively inadequate.”

• Specifically: “The mean number of friends’ friends is always greater than the
mean number of friends of an individual.”
Why your friends have more friends than you

Full network consisted of 146 girls.


Why your friends have more friends than you
Why your friends have more friends than you
Why your friends have more friends than you

Network structure matters ~ Assortativity influences the mean

You might also like