Please enable JavaScript.
Coggle requires JavaScript to display documents.
Graph Theory 2 (Trees (characterization (theorem1 (if G is connected, then…
Graph Theory 2
Trees
-
characterization
theorem1
if G is connected, then n <= e +1
-
theorem3
a simple graph G is a tree iff for all u,v vertices there exist a unique (u,v)-path
-
Spanning Tree
-
minimal ST
definition
if G is weighted, a spanning tree is minimal if the sum of the weights of its edges is minimal
lemma
T is a ST of G and e an edge in E(G) \ E(T), then H = T U {e} contains a cycle
lemma (joining fragment)
if G is weighted connected, V1 and V2 2 non empty paritions of V(G). e is an edge in G with minimum weight linking V1 and V2. Then there is a MST of G containing e.
Kruskal algorithm
G connected. Initially each vertex is a separate subtree. In each step, an edge of lowest weight is used to join 2 subtrees (without creating cycles). Do that until all vertices are connected.
-
routing
-
-
Dijkstra's algorithm
-
d(x) is the distance from x to u, n(x) the next vertex after x on this path (F is none)
algorithm
d(u) = 0, d(v) = inf for all v != u
n(v) = F for all vertices
H contains all vertices, S is empty
While H is non-empty:
- remove a vertex v from H with the smallest d-value and add it to S
- for each x in Nin(v) inter H if w(<x,v>) + d(v) < d(x) then d(x) <- w(<x,v>) + d(v) and n(x) <- v
when H is empty the n-values constitute a sink tree and the d-values the weights of shortest paths
Bellman-Ford
compute the shortest paths from all vertices to a vertex u in a weighted graph (weights can be negative)
algorithm
for i= 1 to n-1 do:
for each arc <x,v> do
if w(<x,v>)+d(v) < d(x) then
d(x) <- w(<x,v>) + d(v)
n(x) <- v
for each arc <x,v> do
if w(<x,v>) + d(v) < d(x) then
return "graph contains a negative-weight cycle"
-
Network analysis
distance statistics
-
eccentricity
e(u) = max{d(u,v) | v in V(G)}
-
diameter
diam(G) = max{d(u,v) | u,v in V(G)}
diam(G) = max(e(u) | u in V(G)}
clustering coefficient
-
-
if G is simple, the maximum number of edges between neighbors of a vertex v is: deg(v)*(deg(v)-1)/2 = deg(v) choose 2
clustering coefficient of a vertex v:
cc(v) = mv/(deg(v) choose 2) if deg(v) > 1, undefined otherwise
-
-
Centrality
center
-
at the center = at minimal distance to the farthest vertex.
the higher the centrality the closer to the center of the graph
-
betweeness centrality
S(x,y) set of shortest paths between x and y
S(x,u,y) set of shortest paths that pass through u
Cb(u) =
closeness
Cc(u) =
-
random networks
Erdos-Renyi model
ER(n,p) graph with n vertice, each pair of distinct vertices is adjacent with propability of p
-
-
probability of a vertex u to have a degree k:
(n-1 choose k)p^k(1-p)^(n-1-k)
average shortest path length
avgD(G) =
-
Small-world networks
-
Watts-Strogatz graphs
algorithm
V = {v1, v2, ... vn}
n >> k >> ln(n) >> 1 with k even
- construct Harary graph Hk,n
- considering each edge <u,v> in Hk,n only once, for each vertex u, replace <u,v> by <u,w> where w != u is in V - N(u) with a probability of p
- result: WS(n,k,p)
-
WS(n,k,0) = Harary graph Hk,n
CC(G) = 0.75 for any G in WS(n,k,0)
theorem2
for all graphs WS(n,k,0) the average shortest path length from u to any other vertex is roughly avgD(u) = n/2k
-
Scale-free networks
the degree distribution follow a power law function:
scale-free function f:

for some constant Cb
-
Barabasi-Albert graphs
algorithm1
start with G in ER(n0,p) and V=V(G). Let n >> n0.
While |V| < n do:
- V <- V U {v} for some vertex v
- add edges <v,u> for m <= n0 distinct vertices u in V-{v}
each u is chosen with a probability proportional to its degree:
Result is a BA(n,n0,m) graph
degree distribution of a BA(n,n0,m):
-
-
-
-
-
Web and communities
Web
scale-free network
degree distribution:
Google's page rank
-
-
d in [0,1) is a constant (d=0.85 for Google)
-
Communities
proximity prestige
-
-
proximity prestige pprox(v):
= 
fraction of vertices that can reach v, divided by the average distance of these vertices to v
-
structural balance
-
signed graph
-
sign of a walk T
product of the signs of its edges
sign(T) =
-
theorem (Harary)
a signed graph G is balanced iff V(G) can be partitioned into 2 disjoint subsets V0 and V1 such that:
- each negative edge is incident to a vertex from V0 and from V1
- each positive edge is incident to vertices from the same set
-
affiliation networks
-
representation
-
edge <a,e> represents that actor a participates in event e
Adjacency submatrix AE
AE[a,e]=1 iff actor a participated in event e
-
-