0% found this document useful (0 votes)
14 views33 pages

GRTH Basics

Uploaded by

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

GRTH Basics

Uploaded by

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

BASIC CONCEPTS OF

GRAPH THEORY
Basic Concepts of Graph Theory

Undirected graph
Basic Concepts of Graph Theory

The vertices of a graph

vertex set V, α0 := |V |
Basic Concepts of Graph Theory

The edges of a graph

edge set E, α1 := |E|, −→ Graph G = (V, E)

|E|
density ε(G) = |V |
Basic Concepts of Graph Theory

Special edges: loops and multiple edges

Graphs without loops and multiple edges: simple graphs


Basic Concepts of Graph Theory

Adjacency and incidence


Basic Concepts of Graph Theory

A vertex v and the set of its neighbours Γ(v)


d(v) = dG(v) = |Γ(v)| = the degree of v

δ(G) = minv∈V d(v), ∆(G) = maxv∈V d(v)


Basic Concepts of Graph Theory

Directed case: successors Γ+(v) and predecessors Γ−(v)


d+(v) = |Γ+(v)| and d−(v) = |Γ−(v)|: out-degree and indegree of v,
respectively.
Basic Concepts of Graph Theory

Directed case: successors Γ+(v) and predecessors Γ−(v)


d+(v) = |Γ+(v)| and d−(v) = |Γ−(v)|: out-degree and indegree of v,
respectively.

Theorem (Handshaking lemma)

d+(x) = d−(x) = |E(G)|


X X X
d(x) = 2|E(G)|, directed case:
x∈V (G) x∈V (G) x∈V (G)
Basic Concepts of Graph Theory

Example: Hypercube

G = ({0, 1}n, E)

For v = v1v2 · · · vn and w = w1w2 · · · wn we stipulate


n
X
vw ∈ E :⇐⇒ |vi − wi| = 1.
i=1
Basic Concepts of Graph Theory

Example: Hypercube

G = ({0, 1}n, E)

For v = v1v2 · · · vn and w = w1w2 · · · wn we stipulate


n
X
vw ∈ E :⇐⇒ |vi − wi| = 1.
i=1

Then, for all x ∈ V we have d(x) = n and |V | = 2n.


Basic Concepts of Graph Theory

Example: Hypercube

G = ({0, 1}n, E)

For v = v1v2 · · · vn and w = w1w2 · · · wn we stipulate


n
X
vw ∈ E :⇐⇒ |vi − wi| = 1.
i=1

Then, for all x ∈ V we have d(x) = n and |V | = 2n.

So,
1 X 1 X 1
|E| = d(x) = n = · n2n = n2n−1
2 x∈V 2 x∈V 2
Basic Concepts of Graph Theory

A graph G and one of its subgraphs, G0

G0 = (V 0, E 0), V 0 ⊆ V, E0 ⊆ E
Basic Concepts of Graph Theory

Induced subgraphs of G = (V, E): G[V0] determined by its vertex set


V0 ⊆ V

edge set of G[V0] maximal w.r.t. inclusion


Basic Concepts of Graph Theory

sequences of edges with “no jumps” = walks

3
4 7 2
5 6
1

trails: no edge repetition allowed

paths: no edge and no vertex repetition allowed


(actually, paths are particular subgraphs)
Basic Concepts of Graph Theory

Particular walks: cylces (no edge and no vertex repetition allowed)


(actually, cycles are particular subgraphs)

circuits (tours): no edge repetition, but vertex repetition allowed,


(circuits are therefore closed trails, but can also be seen as subgraphs)
Basic Concepts of Graph Theory

Theorem If there is a walk from v to w, then there is a path from v


to w as well.

Theorem If in an undirected graph there exist two different paths


from v to w, then there is a cycle (of positive length).
If in a directed graph there exists a closed walk, then there is a
cycle (of positive length).
Basic Concepts of Graph Theory

The adjacency matrix of G = (V, E):



1, if (vi, vj ) ∈ E,
V = {v1 . . . , vn}, A = (aij )i,j=1,...,n with aij =
0 else.

2 5 8
4 6  
0 1 1 0 0 0 0 0
1 0 1 0 0 0 0 0
 
1 7
3 
1 1 0 1 0 0 1 0

 
0 0 1 0 1 0 0 0
A=
 
0 0 0 1 0 1 0 0

 
0 0 0 0 1 0 1 0
 
0 0 1 0 0 1 0 0
 
0 0 0 0 0 0 0 0
Basic Concepts of Graph Theory

The adjacency matrix of G = (V, E):



1, if (vi, vj ) ∈ E,
V = {v1 . . . , vn}, A = (aij )i,j=1,...,n with aij =
0 else.

2 5 8
4 6  
0 1 1 0 0 0 0 0
1 0 1 0 0 0 0 0
 
1 7
3 
1 1 0 1 0 0 1 0

 
0 0 1 0 1 0 0 0
A=
 
0 0 0 1 0 1 0 0

 
0 0 0 0 1 0 1 0
 
0 0 1 0 0 1 0 0
 
0 0 0 0 0 0 0 0
n
X n
X
We have: d(vi) = aij = aji
j=1 j=1
Basic Concepts of Graph Theory

Theorem Let G = (V, E) be an undirected graph and v ∼ w by defi-


nition if and only if there exists a (possibly empty) walk from v to w.
Then ∼ is an equivalence relation.

Theorem Let G = (V, E) be a directed graph and v ∼ w by definition


if and only if there exists a (possibly empty) walk from v to w and
likewise a (possibly empty) walk from w to v. Then ∼ is an equivalence
relation.

Matrix of the relation ∼ (undirected case): Let G = (V, E) be undi-


rected with |V | = n and |E| = m.

M = (mi,j )i,j=1,...,n, where mi,j = sgn(ci,j )


and
min(m,n−1)
Ak .
X
C=
k=0
Basic Concepts of Graph Theory

connected graph

not connected graph


Basic Concepts of Graph Theory

A weakly, but not strongly connected graph


Basic Concepts of Graph Theory

The strongly connected components


Basic Concepts of Graph Theory

Reduction GR = (VR , ER ): VR = { strongly connected components },


ER : directions given by G = (V, E).
Basic Concepts of Graph Theory

A vertex basis of a directed graph G = (V, E) is a set B ⊆ V such that

• For all x ∈ V there is a vertex y ∈ B such that there exists a (di-


rected) path y x

• B is minimal with that property, i.e. for all B 0 $ B there is an x ∈ V


such that for all y ∈ B 0 there is no (directed) path y x.
Basic Concepts of Graph Theory

A vertex basis of a directed graph G = (V, E) is a set B ⊆ V such that

• For all x ∈ V there is a vertex y ∈ B such that there exists a (di-


rected) path y x

• B is minimal with that property, i.e. for all B 0 $ B there is an x ∈ V


such that for all y ∈ B 0 there is no (directed) path y x.

Remarks:
• The reduction GR of a graph G = (V, E) is always acyclic.

• The reduction GR of a graph G = (V, E) has a unique vertex basis,


namely
B = {x ∈ GR | d−(x) = 0}

• The vertex bases of G constructible from the vertex basis of GR .


Basic Concepts of Graph Theory

Trees and Forests

A simple undirected graph without cycles of positive length is called


forest.

A connected forest is called tree.

Theorem In a tree T = (V, E) any two vertices v, w ∈ V are connected


by a unique path W (v, w).

The length of W (v, w) is denoted by dT (v, w) and called the distance


between v and w
Basic Concepts of Graph Theory

Particular classes of trees: rooted trees, plane rooted trees, binary


trees, . . .
Basic Concepts of Graph Theory

A vertex v with d(v) = 1 is called a leaf.

Theorem A tree with at least two vertices has at least two leaves.

Proof: Consider a path

v − v1 − v2 − v3 − · · · · · · − vk − w
of maximal length. Then v and w must be leaves.
Basic Concepts of Graph Theory

Theorem Let T = (V, E). Then the following statements are equiv-
alent:

1. T is a tree.

2. For all v, w ∈ V (T ) there is a unique path from v to w.

3. T is connected and |V | = |E| + 1.

4. T is a minimal connected graph (every edge is a bridge)

5. T is a maximal acyclic graph.


Basic Concepts of Graph Theory

Proof: (1)=⇒(3), that is

“If T = (V, E) is a tree, then it is connected and satisfies |V | = |E|+1.”

We prove the state by induction on n = α0(T ) = |V (T )|.

Induction start: α0(T ) = 1, α1(T ) = |E(T )| = 0.

Now consider a tree T = (V, E) with n + 1 vertices. Then there is a


leaf v and let e be the edge incident to v. Let T 0 = (V \ {v}, E \ {e}).

As α0(T 0) = n, we can apply the induction hypothesis to T 0.


Basic Concepts of Graph Theory

(3)=⇒(1), that is

“T = (V, E) connected and |V | = |E| + 1 =⇒ T is a tree.”

Set n = |V |.
If T has no cycle, we are done.

If T has a cycle, then remove an edge from the cycle. −→ graph T 0.

T 0 is connected and cycle-free and has n − 2 edges.

But every connected graph on n vertices has at least n − 1 edges


(proof by induction)
Basic Concepts of Graph Theory

A spanning tree of a connected graph G = (V, E) is a subgraph T of


G such that T is a tree, V (T ) = V (G), E(T ) ⊆ E(G).

A spanning forest of a graph G = (V, E) is a subgraph F of G such that


F is a forest, V (F ) = V (G), E(F ) ⊆ E(G), each connected component
of F is a spanning tree of a connected component of G.

Remark: If a subgraph H of G satisfies V (H) = V (G), then it is called


a spanning subgraph.

Theorem Every connected graph contains a spanning tree.

You might also like