Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
04/01/17 1
04/01/17 2
04/01/17 3
Today's Class
Graph Isomorphism
Path
Connectivity
04/01/17 4
04/01/17 5
04/01/17 6
04/01/17 7
04/01/17 8
04/01/17 9
04/01/17 10
EXAMPLE
04/01/17 11
04/01/17 12
Example
04/01/17 13
Connectivity
1 2
3
4
04/01/17 14
Connectivity
1 2
3
4
04/01/17 15
Connected Components
1
6 2
8 7
5 3
4
04/01/17 16
04/01/17 17
EXAMPLE: Are the directed graphs G and H shown in
Figure strongly connected? Are they weakly
connected?
H is strongly connected
weakly strongly
because there is a path
Connected connected between any two vertices
in this directed graph.
Hence, H is also weakly
connected.
K R
5 4
5 4
04/01/17 20
Graph Isomorphism
-Example
2 2
1 3 1 3
5 4
5 4
04/01/17 21
Graph Isomorphism
-Example
2 2
1 3 1 3
5 4
5 4
04/01/17 22
Graph Isomorphism
-Example
2 2
1 3 1 3
5 4
5 4
04/01/17 23
Graph Isomorphism
-Example
2 2
1 3 1 3
5
4 5 4
04/01/17 24
Graph Isomorphism
-Example
2 2
1 3 1 3
5 4 5 4
04/01/17 25
Graph Isomorphism
-Example
5 4
5 4
04/01/17 26
Example: Determine whether the graphs G and H shown
in Figure are isomorphic.
04/01/17 27
Solution:
Both G and H have six vertices and eight edges.
04/01/17 28
Example: Determine whether the graphs G and H shown
in Figure are isomorphic.
04/01/17 29
Solution:
04/01/17 31
Consider digraph adjacency matrix:
1 0 1 0
1. Find a path from a to d.
0 1 0 1
1 1 0 0
1. Is there a path from d to a?
0 1 0 0
04/01/17 32
Paths in Directed Graphs
Answer: a b c d
1 0
a
0 1
b
0 1 0 1
1 1 0 0
c
0 1 0 0
d
1. acbd.
04/01/17 33
Today's Class
Euler circuit:
An Euler circuit in a graph G is a simple
circuit containing every edge of G.
Euler path:
An Euler path in G is a simple path
containing every edge of G.
04/01/17 35
Which of the following graphs are Euler
path or circuit?
04/01/17 36
EXAMPLE: Which of the undirected graphs in Figure (s37)
have an Euler circuit? Of those that do not,
which have an Euler path?
Solution:
04/01/17 37
04/01/17 38
Which graphs shown in Figure 7 have an Euler path?
04/01/17 39
Solution:
G1 contains exactly two vertices of odd degree,
namely, b and d. Hence, it has an Euler path that
must have b and d as its endpoints.
04/01/17 40
Which of the following directed graphs have an Euler circuit?
Of those that do not, which have an Euler path?
04/01/17 45
Finding Euler Circuits: Mohammeds Scimitars
04/01/17 46
Finding Euler Circuits
Mohammeds Scimitars
Found a cycle after starting from middle vertex.
04/01/17 47
Finding Euler Circuits
Mohammeds Scimitars
Found a cycle after starting from middle vertex.
04/01/17 48
Finding Euler Circuits
Mohammeds Scimitars
Found a cycle after starting from middle vertex.
04/01/17 49
Finding Euler Circuits
Mohammeds Scimitars
Found a cycle after starting from middle vertex.
04/01/17 50
Finding Euler Circuits
Mohammeds Scimitars (home work)
04/01/17 51
Finding Euler Circuits
Mohammeds Scimitars
04/01/17 53
Finding Euler Circuits
Mohammeds Scimitars
1
2
04/01/17 54
Finding Euler Circuits
Mohammeds Scimitars
1
2
3
04/01/17 55
Finding Euler Circuits
Mohammeds Scimitars
1
2
3 4
Find another cycle from middle vertex:
04/01/17 56
Finding Euler Circuits
Mohammeds Scimitars
1
2
3 5
4
Find another cycle from middle vertex:
04/01/17 57
Finding Euler Circuits
Mohammeds Scimitars
1
2 6
3 5
4
Find another cycle from middle vertex:
04/01/17 58
Finding Euler Circuits
Mohammeds Scimitars
7
1
2 6
3 5
4
Find another cycle from middle vertex:
04/01/17 59
Finding Euler Circuits
Mohammeds Scimitars
8
7
1
2 6
3 5
4
Find another cycle from middle vertex:
04/01/17 60
Finding Euler Circuits
Mohammeds Scimitars
9 8
7
1
2 6
3 5
4
Find another cycle from middle vertex:
04/01/17 61
Finding Euler Circuits
Mohammeds Scimitars
9 8
10 7
1
2 6
3 5
4
Find another cycle from middle vertex:
04/01/17 62
Finding Euler Circuits
Mohammeds Scimitars
9 8
10 7
1
2 11 6
3 5
4
Find another cycle from middle vertex:
04/01/17 63
Finding Euler Circuits
Mohammeds Scimitars
9 8
10 7
1
2 11 6
3 5
4
Amalgamate it to Euler cycle of deleted graph, and delete
it. Need to insert cycle between former edges 10 &
11:
04/01/17 64
Finding Euler Circuits
Mohammeds Scimitars
04/01/17 65
Finding Euler Circuits
Mohammeds Scimitars
04/01/17 66
Finding Euler Circuits
Mohammeds Scimitars
04/01/17 67
Finding Euler Circuits
Mohammeds Scimitars
04/01/17 68
Finding Euler Circuits
Mohammeds Scimitars
04/01/17 69
Finding Euler Circuits
Mohammeds Scimitars
04/01/17 70
Finding Euler Circuits
Mohammeds Scimitars
9 8
10 14 13 7
1 12
2 15 11 6
3 5
4
04/01/17 71
Finding Euler Circuits
Mohammeds Scimitars
9 8
?? ?? ?? 7
1 ??
2 ?? ?? 6
3 5
4
04/01/17 72
Finding Euler Circuits
Mohammeds Scimitars
04/01/17 73