Graph Theory 1-11
Graph Theory 1-11
Theory
What is a Network?
Network = graph
Informally a graph is a set of nodes joined by a set of lines or
arrows.
1 1 2 3
2 3
4 5 6 4 5 6
Graph-based representations
Gustav Kirchhoff
Graph Theory - History
Enumeration of Chemical Isomers
Vertex
Basic Element
Drawn as a node or a dot.
Vertex set of G is usually denoted by V(G), or V
Edge
A set of two elements
Drawn as a line connecting two vertices, called end vertices, or
endpoints.
The edge set of G is usually denoted by E(G), or E.
Example
V:={1,2,3,4,5,6}
E:={{1,2},{1,5},{2,3},{2,5},{3,4},{4,5},{4,6}}
Simple Graphs
loop
multiple arc
arc node
Weighted graphs
1.2 2
1 2 3 1 2 3
.2
.5 1.5 5 3
.3 1
4 5 6 4 5 6
.5
Structures and structural
metrics
Graph structures are used to isolate
interesting or important sections of a
graph
Structural metrics provide a measurement
of a structural property of a graph
Global metrics refer to a whole graph
Local metrics refer to a single node in a graph
Graph structures
Identify interesting sections of a graph
Interesting because they form a significant
domain-specific structure, or because they
significantly contribute to graph properties
A subset of the nodes and edges in a
graph that possess certain characteristics,
or relate to each other in particular ways
Connectivity
a graph is connected if
you can get from any node to any other by following a sequence of edges
OR
any two nodes are connected by a path.
The degree of 5 is 3
Degree (Directed Graphs)
outdeg(1)=2
indeg(1)=0
outdeg(2)=2
indeg(2)=2
outdeg(3)=1
indeg(3)=4
Degree: Simple Facts
If G is a digraph then
Σ indeg(v)=Σ outdeg(v) = |E |
uv,vw,wx,…,yz.
A path is a walk in which all the edges and all the nodes are different.
1,2,5,1 2,3,4,5,2
3-cycle 4-cycle
Special Types of Graphs
Null graph
No nodes
Obviously no edge
Trees
Paths
Stars
Regular
Connected Graph
C3 C4 C5
Bipartite graph
Stars
Planar Graphs
D E F
G H I
Spanning subgraph
Incidence Matrix
VxE
[vertex, edges] contains the edge's data
Adjacency Matrix
VxV
Boolean values (adjacent or not)
Or Edge Weights
Matrices
1,2 1,5 2,3 2,5 3,4 4,5 4,6
1 1 1 0 0 0 0 0
2 1 0 1 1 0 0 0
3 0 0 1 0 1 0 0
4 0 0 0 0 1 1 1
5 0 1 0 1 0 1 0
6 0 0 0 0 0 0 1
1 2 3 4 5 6
1 0 1 0 0 1 0
2 1 0 1 0 1 0
3 0 1 0 1 0 0
4 0 0 1 0 1 1
5 1 1 0 1 0 0
6 0 0 0 1 0 0
Representation (List)
Edge List
pairs (ordered if directed) of vertices
Optionally weight and other data
Adjacency List (node list)
Implementation of a Graph.
Adjacency-list representation
an array of |V | lists, one for each vertex in V.
For each u ∈ V , ADJ [ u ] points to all its adjacent vertices.
Edge and Node Lists
Edge List
1 2 1.2
2 4 0.2
4 5 0.3
4 1 0.5
5 4 0.5
6 3 1.5
Topological Distance
1 2 3 4 5 6
1 0 1 2 2 1 3
2 1 0 1 2 1 3
3 2 1 0 1 2 2
4 2 2 1 0 1 1
5 1 1 2 1 0 2
6 3 3 2 1 2 0
N = 12
Random Graphs
Erdős and Renyi (1959)
p = 0.0 ; k = 0
N nodes
p = 1.0 ; k ≈ ½N2
Random Graphs
Erdős and Renyi (1959)
p = 0.0 ; k = 0
p = 0.09 ; k = 1
p = 0.045 ; k = 0.5
For k > 1:
almost all nodes connected
diameter shrinks
path lengths shorten
0 1.0 k
phase transition
Random Graphs
David Kentaro
Mumford Peter Toyama
Erdős and Renyi (1959) Belhumeur
Fan
Chung
Because the average person easily knows more than one person (k >> 1),
Erdő
Erdős and Renyi showed that average
path length between connected nodes is
Random Graphs
David Kentaro
Mumford Peter Toyama
Erdős and Renyi (1959) Belhumeur
Fan
Chung
Because the average person easily knows more than one person (k >> 1),
Erdő
Erdős and Renyi computed average
path length between connected nodes to be:
The Alpha Model
Watts (1999)
Watts (1999)
Watts (1999)
α
The Beta Model
Whatʼ
Whatʼs the degree (number of edges) distribution
over a graph, for real-world graphs?
Whatʼ
Whatʼs the degree (number of edges) distribution
over a graph, for real-world graphs?
Hint:
Paretoʼ
Paretoʼs* Law: Wealth distribution follows a
power law.
Power laws in real networks:
(a) WWW hyperlinks
(b) co-starring in movies
(c) co-authorship of physicists
(d) co-authorship of neuroscientists
Kleinberg (2000)
You donʼ
donʼt know all of the people whom your
friends know.
a) Variation of Wattsʼ
Wattsʼs β model:
Lattice is d-dimensional (d
(d=2).
One random link per node.
Parameter α controls probability of random link – greater for closer nodes.
Watts, Dodds,
Dodds, Newman (2002) show that for d = 2
or 3, real networks are quite searchable.