Professional Documents
Culture Documents
Graph Theory
Graph Theory
Topics
Definition
basic terminologies of graph
Isomorphism
Connectivity
Graph colouring
Operations on graphs
Euler graphs
Hamiltonian graphs
connected by lines
Graphs are discrete structures consist of vertices and edges
applications
Chemistry - study of molecules and atoms, and construction of bonds between
mechanisms.
biology - where a vertex represents regions where certain species exist and the
edges represent migration path or movement between the regions. This
information is important when looking at breeding patterns or tracking the
spread of disease, parasites and to study the impact of migration that affect
other species.
operations Research -For example, the traveling salesman problem, the
shortest spanning tree in a weighted graph
modeling of network topologies can be done using graph concepts.
concept of graph coloring is utilized in resource allocation, job scheduling and
other scheduling concepts.
5
Facebook is based
in graph theory
7
Google Maps:
10
Graphs
In elementary mathematics, "graph" refers to a function graph or
11
Example 1: The
following picture
is a graph. List its
vertices
and
A
D
edges.
C
E
B
12
Formal Definition
A graph or a linear graph G = (V ,E) consists of set of objects
Bender
Bender
Leela
Leela
Zoidberg
Zoidberg
Fry
Fry
14
Amy
Amy
Farnsworth
Farnsworth
15
vertices
Multiple
edges
16
loop
Simple Graph
each edge connects two different vertices and no two edges
connect same pair of vertices.
A graph that has neither self loops nor paralled edges
Multiple
edges
It is not
simple.
17
loo
p
It is a simple
graph.
Types of Graphs
Multigraph multiple edges connecting the same vertices
Pseudograph - A graph that may contain multiple
18
A
C
19
Null graph
It is possible for the edge set E to be empty.
Such a graph without any edges called null graph.
Every vertex in a null graph is an isolated vertex.
20
Complement
Complement of G: The complement G of a simple
graph G :
A simple graph
V(G) = V(G)
E(G) = { uv | uv E(G) }
u
G
x
21
y
w
v
x
22
Penguins
23
Giants
Toronto
Lbeck
New York
Hamburg
Washington
24
Graph Terminology
Example: Which vertices in the following graph are isolated,
which are pendant, and what is the maximum degree? What type of
graph is it?
f
d
a
e
g
27
Handshaking Theorem
Theorem: An undirected graph has an even number of
vertices of odd degree
Let G = (V, E) be an undirected graph with e edges.
V1 and V2 are set of even and odd degree vertices
respectively
Then 2e = vV deg(v)
2|E| = vV deg(v) = vV1 deg(v) + vV2 deg(v)
Example: How many edges are there in a graph with 10
vertices, each of degree 6?
Solution: The sum of the degrees of the vertices is 610 =
60. According to the Handshaking Theorem, it follows that
2e = 60, so there are 30 edges.
28
29
deg-(d) = 2
deg+(d) = 1
30
deg-(b) = 4
deg+(b) = 2
deg-(c) = 0
deg+(c) = 2
Representation of Graphs
31
a
b
d
c
32
Vertex
Adjacent
Vertices
Initial
Vertex
Terminal
Vertices
b, c, d
a, d
a, d
a, b, c
a, b, c
adjacency matrix
Let G = (V, E) be a simple graph with |V| = n.
Suppose that the vertices of G are listed in arbitrary
b
d
c
0 1 1 1
1 0 0 1
AG
1 0 0 1
1 1 1 0
Note: Adjacency matrices of undirected graphs are always symmetric.
34
Incident matrix
Let G = (V, E) be an undirected graph with |V| = n.
incidence matrix of G with respect to this listing of the
vertices and edges is the nm zero-one matrix with 1 as its
(i, j)th entry when edge ej is incident with vi, and 0
otherwise.
In other words, for an incidence matrix M = [mij]
mij = 1 if edge ej is incident with vi
mij = 0
35
otherwise.
36
Isomorphism of Graphs
37
38
39
Except for the labels of their vertices and edges, isomorphic graphs are same
graph, drawn differently. The figure shows two different ways of drawing the
same graph
It is not easy task to determine whether or not the given two graphs are isomorphic,
example these two graphs are isomorphic , but just by looking at them
40
observations
two isomorphic simple graphs must both have.
the same number of vertices,
the same number of edges, and
the same degrees of vertices.
there is a one to one correspondence between sets of Vertices of the
graph which establishes a one-to-one correspondence between edges.
It is not always an easy task to determine whether or not to find given
graphs are isomorphic. Non isomorphic graphs example :
41
a
e
e
b
Solution: Yes, they are isomorphic, because they can be arranged to look identical.
You can see this if in the right graph you move vertex b to the left of the edge {a,
c}. Then the isomorphism f from the left to the right graph is:
f(a) = e,
f(b) = a,
f(c) = b,
f(d) = c,
f(e) = d.
42
b
e
e
b
c
d
Solution: No, they are not isomorphic, because they differ in the
degrees of their vertices. Vertex d in right graph is of degree one, but
there is no such vertex in the left graph.
43
C6H6
44
46
subgraphs
A graph g is said to be subgraph of a graph G , if all the
47
Subgraphs examples
48
G1
v
G2
Edge-disjoint subgraphs
Two or more subgraphs g1 and g2 of a graph G are said to be
49
Connectivity
50
v1 a v2 b v3 c v3 d v4 e v2 f v5
52
path
53
circuit
A closed walk in which no vertex appears more than
once.
Degree of every vertex in a circuit =2
It is a subgraph of another graph.
Is also called a cycle, elementary cycle, circular path
and polygon
54
55
56
e
d
Yes.
No.
b
b
e
c
57
d
Yes.
d
c
f
No.
Connectivity
Example: Are the following directed graphs strongly or
weakly connected?
a
b
d
c
a
b
d
c
58
Special Graphs
Special Graphs
Example I: Is C3 bipartite?
No, because there is no way to partition the vertices into
two sets so that there are no edges with both endpoints in
the same set.
v1
v2
v3
v5
v3
60
v1
v6
v4
Yes, because we
can display C6 like
this:
v5
v3
v6
v2
v4
Special Graphs
Definition: The complete bipartite graph Km,n is the
graph that has its vertex set partitioned into two subsets of
m and n vertices, respectively. Two vertices are connected if
and only if they are in different subsets.
K3,2
61
K3,4
Special Graphs
Definition: The cycle Cn, n 3, consists of n vertices v1,
v2, , vn and edges {v1, v2}, {v2, v3}, , {vn-1, vn}, {vn, v1}.
C3
62
C4
C5
C6
Special Graphs
Definition: We obtain the wheel Wn when we add an
W3
63
W4
W5
W6
Graph Colouring
64
65
66
67
Operations on Graphs
Union
Intersection
Ring sum
Deletion
decomposition
fusion
68
G1
69
G2
G1 G2 = K5
Intersection of Graphs
Definition: The intersection of of two simple graphs G1
70
Ringsum operation
The ring sum of two graphs G1 and G2, denoted by
71
Example deletion
73
74
Knigsberg Bridges
In the 1700s, seven bridges connected two islands
75
76
Two problems:
1) Can you draw these without lifting your pen,
drawing each line only once
2)
77
8
1
9
1
0
78
79
80
circuit.
If we remove one edge from Hamiltonian circuit we are left with a path,
Theorem
A sufficient condition for a simple graph G to have a
82
Seating problem
Nine members of a club meet each day for lunch at a round table. They decide
to sit such that every member has different neighbors at each lunch. How
many days can this arrangement last?
Solution
This situation can be represented by a graph with 9 vertices such that each
vertex represents a member and an edge represents relationship of sitting
next to each other. Possible arrangements are
1234567891
1352749681
1573928461
1795836241
For n people number of arrangements are
(n-1)/ 2 if n is odd
(n-2)/2 if n is even
83
Example
Example
Hamilton versus
Euler
Example
Hamilton versus
Euler
more) and
consequently has
Hamilton paths (for
example, A, B, C, D,
E).
86
Example
Hamilton versus
Euler
87
Example
Hamilton versus
Euler
88
89
650
Chicago
700
700
600
550
Boston
200
New York
Solution: The shortest path is Boston, New York, Chicago, Toronto, Boston (2,000
miles).
90
91
Thank You
92