graph theory and network measurment
TRANSCRIPT
Graph Theory and Network Measurment
Social and Economic Networks
Jafar Habibi
MohammadAmin Fazli
Social and Economic Networks 1
ToC
β’ Network Representation
β’ Basic Graph Theory Definitions
β’ (SE) Network Statistics and Characteristics
β’ Some Graph Theory
β’ Readings:β’ Chapter 2 from the Jackson book
β’ Chapter 2 from the Kleinberg book
Social and Economic Networks 2
Network Representation
β’ N = {1,2,β¦,n} is the set of nodes (vertices)
β’ A graph (N,g) is a matrix [gij]nΓn where gij represents a link (relation, edge) between node i and node j
β’ Weighted network: πππ β π
β’ Unweighted network: πππ β {0,1}
β’ Undirected network: πππ = πππ
Social and Economic Networks 3
Network Representation
β’ Edge list representation: π = 12, 23
β’ Edge addition and deletion: g+ij, g-ij
β’ Network isomorphism between (N, g) and (Nβ, gβ): βπ:πβπβ²πππ
= ππ π π(π)β²
β’ (Nβ,gβ) is a subnetwork of gβ if πβ² β π, πβ²β π
β’ Induced (restricted graphs): π π ππ = πππ ππ π β π, π β π
0
Social and Economic Networks 4
Path and Cycles
β’ A Walk is a sequence of edges connecting a sequence of nodesπ = π1π2, π2π3, π3π4, β¦ , ππβ1ππ
βπ: ππππ+1 β π
β’ A Path is a walk in which no node repeats
β’ A Cycle is a path which starts and ends at the same nodeππ = π1
β’ The number of walks between two nodes:
Social and Economic Networks 5
Components & Connectedness
β’ (N,g) is connected if every two nodes in g are connected by some path.
β’ A component of a network (N,g) is a non-empty subnetwork (Nβ,gβ) which isβ’ (Nβ,gβ) is connectedβ’ If π β πβ² and ππ β π then π β πβ²and ππ β πβ²
β’ Strongly connectivity and strongly connected components for directed graphs.
β’ C(N,g) = C(g) = set of gβs connected components
β’ The link ij is a bridge iff g-ij has more components than g
β’ Giant component is a component which contains a significant fraction of nodes.β’ There is usually at most one giant component
Social and Economic Networks 6
Special Kinds of Graphs
β’ Star:
β’ Complete Graph:
Social and Economic Networks 7
Special Kinds of Graphs
β’ Tree: a connected network with no cycle β’ A connected network is a tree iff it has n-1 links
β’ A tree has at least two leaves
β’ In a tree, there is a unique path between any pair of nodes
β’ Forest: a union of trees
β’ Cycle: a connected graph with n edges in which the degree of every node is 2.
Social and Economic Networks 8
Neighborhood
β’ ππ π = π: πππ = 1
β’ ππ2 π = ππ π βͺ πβππ π ππ π
β’ πππ π = ππ(π) βͺ πβππ π ππ
πβ1 π
β’ πππ π = πβπππ
π
β’ Degree: ππ π = #ππ(π)
β’ For directed graphs out-degree and in-degree is defined
Social and Economic Networks 9
Degree Distribution
β’ Degree distribution of a network is a description of relative frequencies of nodes that have different degrees.
β’ P(d) is the fraction of nodes that have degree d under the degree distribution P.
β’ Most of social and economical networks have scale-free degree distribution
β’ A scale-free (power-law) distribution P(d) satisfies:π π = cdβπΎ
β’ Free of Scale: P(2) / P(1) = P(20)/P(10)
Social and Economic Networks 10
Degree Distribution
Social and Economic Networks 11
Degree Distribution
β’ Scale-free distributions have fat-tailsβ’ For large degrees the number of
nodes that degree is much more than the random graphs.
Social and Economic Networks 12
log π π = log π β πΎlog(π)
Diameter & Average Path Length
β’ The distance between two nodes is the length of the shortest path between them.
β’ The diameter of a network is the largest distance between any two nodes.
β’ Diameter is not a good measure to path lengths, but it can work as an upper-bound
β’ Average path length is a better measure.
Social and Economic Networks 13
Diameter & Average Path Length
β’ The tale of Six-degrees of Separationβ’ The diameter of SENs is 6!!!
β’ Based on Milgramβs Experiment
β’ The true story:β’ The diameter of SENs may be
high
β’ The average path length is low [π(log π )]
Social and Economic Networks 14
Diameter & Average Path Length
β’ The distance distribution in graph of all active Microsoft Instant Messenger user accounts
Social and Economic Networks 15
Cliquishness & Clustering
β’ A clique is a maximal complete subgraph of a given network (π β π, π π is a complete network and for any π β π β π: π πβͺ π is not complete.
β’ Removing an edge from a network may destroy the whole clique structure (e.g. consider removing an edge from a complete graph).
β’ An approximation: Clustering coefficient,
β’ This is the overall clustering coefficient
Social and Economic Networks 16
Cliquishness & Clustering
β’ Individual Clustering Coefficient for node i:
β’ Average Clustering Coefficient:
β’ These values may differ
Social and Economic Networks 17
Cliquishness & Clustering
Social and Economic Networks 18
Cliquishness & Clustering
β’ Average clustering goes to 1
β’ Overall clustering goes to 0
Social and Economic Networks 19
Transitivity
β’ Consider a directed graph g, one can keep track of percentage of transitive triples:
Social and Economic Networks 20
Centrality
β’ Centrality measures show how much central a node is.
β’ Different measures for centrality have been developed.
β’ Four general categories:β’ Degree: how connected a node is
β’ Closeness: how easily a node can reach other nodes
β’ Betweenness: how important a node is in terms of connecting other nodes
β’ Neighborsβ characteristics: how important, central or influential a nodeβs neighbors are
Social and Economic Networks 21
Degree Centrality
β’ A simple measure:ππ π
π β 1
Social and Economic Networks 22
Closeness Centrality
β’ A simple measure:
πβ π π π, π
π β 1
β1
β’ Another measure (decay centrality)
πβ π
πΏπ(π,π)
β’ What does it measure for πΏ = 1?
Social and Economic Networks 23
Betweenness Centrality
β’ A simple measure:
Social and Economic Networks 24
Neighbor-Related Measures
β’ Katz prestige:
πππΎ π =
πβ π
ππππππΎ(π)
ππ π
β’ If we define πππ =πππ
ππ π, we have
ππΎ π = πππΎ π
or
πΌ β π ππΎ π = 0
β’ Calculating Katz prestige reduces to finding the unit eigenvector.
Social and Economic Networks 25
Eigenvectors & Eigenvalues
β’ For an π Γ π matrix T an eigenvector v is a π Γ 1 vector for which
βπ ππ£ = ππ£
β’ Left-hand eigenvector:π£π = ππ£
β’ Perron-Ferobenius Theorem: if T is a non-negative column stochastic matrix (the sum of entries in each column is one), then there exists a right-hand eigenvector v and has a corresponding eigenvalue π = 1.
β’ The same is true for right-hand eigenvectors and row stochastic matrixes.
Social and Economic Networks 26
Eigenvectors & Eigenvalues
β’ How to calculate:π β ππΌ π£ = 0
β’ For this equation to have a non-zero solution v, T β ππΌ must be singular (non-invertible):
det π β ππΌ = 0
Social and Economic Networks 27
Neighbor-Related Measures
β’ Computing Katz prestige for the following
β’ Katz prestige β degree!
β’ Not interesting on undirected networks, but interesting on directed networks.
Social and Economic Networks 28
Neighbor-Related Measures
β’ To solve the problem: Eigenvector Centrality: ππΆππ π = π ππππΆπ
π π
ππΆπ π = ππΆπ(π)
β’ Katz2: ππΎ2 π, π = πππΌ + π2π2πΌ + π3π3πΌ + β―
ππΎ2 π, π = 1 + ππ + π2π2 +β― πππΌ = πΌ β ππ β1πππΌ
β’ Bonacich: πΆππ΅ π, π, π = 1 β ππ β1πππΌ
Social and Economic Networks 29
Final Discussion about Centrality Measures
Social and Economic Networks 30
Matching
β’ A matching is a subset of edges with no common end-point.
β’ Finding the maximum matching is an interesting problem specially in bipartite graphs (recall Matching Markets)β’ A bipartite network (N,g) is one for which N can be partitioned into two sets A
and B such that each edge in g resides between A and B.
β’ A perfect matching infects all vertices.
β’ Philip-Hall Theorem: For a bipartite graph (N,g), there exists a matching of a set πΆ β π΄, if and only if
βπβπΆ ππ π β₯ π
Proof: see the whiteboard.
Social and Economic Networks 31
Set Covering and Independent Set
β’ Independent Set: a subset of nodes π΄ β π for which for each π, π β π΄, ππβ π
β’ Consider two graphs (N,g) and (N,gβ) such that π β πβ². β’ Any independent set of gβ is an independent set of g.
β’ If π β πβ², there exists an independent sets of g that are not independent set of gβ.
β’ Free-rider game on networks: β’ Each player buy the book or he can borrow the book freely from one of the book
owners in his neighborhood.
β’ Indirect borrowing is not permitted.
β’ Each player prefer paying for the book over not having it.
β’ The equilibrium is where the nodes of a maximal independent set pays for the book.
Social and Economic Networks 32
Coloring
β’ Example: We have a network of researchers in which an edge between node i and j means i or j wants to attends the others presentation. How many time slots are needed to schedule all the presentations?
β’ In each time slot, we should color the vertices in a way no two neighboring nodes get the same colors: The Coloring Problem.
β’ The minimum number of colors needed colors: the chromatic number
β’ Many number of results, most famous is the 4-color problem: Every planar graph can be colored with 4 colors.β’ A planar graph is a graph which can be drawn in a way that no two edges
cross each other.
Social and Economic Networks 33
Coloring
β’ Intuition: The 6-color problem:β’ Any planar graph can be colored with 6 colors.
β’ Proof sktech:β’ Euler formula: v+f = e+2β’ π β€ 3π£ β 6
β’ πΏ β€ 5
β’ Recursive coloring
β’ Four color is needed:
Social and Economic Networks 34
Eulerian Tours & Hamilton Cycles
β’ Euler Tour: a closed walk which pass through all edges
β’ Euler theorem: A connected network g has a closed walk that involveseach link exactly once if and only if the degree of each node is even.
β’ Proof sketch: β’ Induction on the number of edges
Social and Economic Networks 35
Eulerian Tours & Hamilton Cycles
β’ Hamilton Cycle: a cycle that passes through all vertices
β’ Dirac theorem: If a network has π β₯ 3 nodes and each node has degree of at least n/2, then the network has a Hamilton cycle.
β’ Proof sketch:β’ Graph is connected
β’ Consider the longest path and prove it is in fact a cycle
β’ Consider a node outside this cycle
Social and Economic Networks 36
Eulerian Tours and Hamilton Cycles
β’ Chvatal Theorem: Order the nodes of a network of π β₯ 3 nodes inincreasing order of their degrees, so that node 1 has the lowest degree and node n has the highest degree. If the degrees are such that ππ β€ π for some π < π/2 implies ππβπ β₯ π β π, then the network has a Hamilton cycle.
Social and Economic Networks 37