Beruflich Dokumente
Kultur Dokumente
Nitin Upadhyay
March 01, 2006
Bits-Pilani Goa campus
Discussion
e1
1 2
e3 e2
e6 3
e5
e4
4 5
Adjacency Matrix
1 2 3 4 5
1 0 1 0 1 0 The number The (1, 5)th entry of A4
2 1 0 1 0 1 of paths of length is 6, indicating that there
3 0 1 0 1 1 4 from a to d is the are six different paths of
(1, 5)th entry of A4. length 4 between 1 and
4 1 0 1 0 0
5.
Since
5 0 1 1 0 0
1:{1-4-1-2-5}
1 2 3 4 5
e1 2:{1-2-1-2-5}
1 2 1 9 3 11 1 6
2 3 15 7 11 8 3:{1-4-3-2-5}
e3 e2 3 11
e6 3 7 15 3 8 4:{1-2-5-2-5}
e5 4 1 11 3 9 6
5:{1-2-3-2-5}
e4 5 6 8 8 6 8
4 5 6:{1-2-5-3-5}
Counting Paths Example
How many paths of length 4 are Hence, the number
there from a to d in the right a b
graph? of paths of length
The adjacency matrix of the 4 from a to d is the
graph is (1, 4)th entry of A4.
Since 8 0 0 8 d c
0 1 1 0 0 8 8 0
1 0 0 1 A4 =
0 8 8 0
A = 1 0 0 1
8 0 0 8
0 1 1 0
There are 8 paths of length
4 from a to d.
Connectedness
An undirected graph is a b c
connected iff there is a path
between every pair of
distinct vertices in the graph.
E.g., Graph G1 is connected,
since for every pair of d e f
distinct vertices, there is a
path between them.
However, G2 is not a b c
connected. E.g., no path in
G2 between vertices a and c.
d e f
Connectedness
a b a b
c c
e d e d
G H
Directed Connectedness Example
G is strongly connected
since there is a directed
path between any two a b a b
vertices. Hence, G is also
weakly connected. H is not
strongly connected since, for c c
instance, there’s no
directed path from a to b. H d d
is however weakly
e e
connected since there is a G H
path between any two
vertices with all directions
removed.
General Graphs
d e
a
c b
Planar Graphs
d e
d e
a
a
c b
c b
Planar embedding
b c e f h j
d i
Interior regions- 1:{a-b-c-a} 3:{a-c-d-e-a} 5:{g-h-j-g} 6:{g-h-i-f-g}
2:{b-c-d-b} 4:{j-h-i-j}
Exterior region- 1:{a-b-d-e-f-i-j-g-f-e-a}
Degree example
b c e f h j
d i
Degree example
a g
b c e f h j
d i
Example 1
a 1:{b-d-c-b} 2:{e-f-g-e}
f degree: {3}
Exterior region
b d e
1: {a-b-c-d-e-f-g-e-d-b-a}
g Degree: {10}
c Total degree: 10 + (2 * 3) = 16
Questions Questions ?