Professional Documents
Culture Documents
Introduction
What is a graph G?
It is a pair G = (V,
E), where
V = V(G) = set of vertices
E = E(G) = set of edges
v
u
Example:
V = {s, u, v, w, x, y, z}
E = { (x,v), (x,u), (v,w),
(s,v), (s,u), (s,w), (s,y),
(w,y), (u,y), (u,z),(y,z)}
09/12/16
y
w
s
1
Special edges
Parallel edges
Two or more edges
joining a pair of
vertices
Loops
An edge that starts
and ends at the
same vertex
In the example,
vertex a has a loop
09/12/16
v
c
y
w
s
2
Simple graph
Simple graph
A graph without
loops or parallel
edges.
v
u
y
w
s
09/12/16
Degree of a vertex
x
v
d(x) = 3, d(v) = 3,
d(u) = 4, d(y) = 4,
d(z) = 2, d(s) = 5, w
d(w) = 3.
u
y
s
z
09/12/16
d(u) = 2|E|
i=1
Degree sequence
Degree sequence if we arrange
degrees of vertices of the
graph in non increasing order
then resulting string of length
n of nonnegative integers is
called degree sequence of G
Examples
09/12/16
d(x) = 3, d(v) = 3,
d(u) = 4, d(y) = 4,
d(z) = 2, d(s) = 5,
d(w) = 3.
Degree
sequence of
graph G is
(5,4,4,3,3,3,2)
x
v
u
y
w
s
z
09/12/16
Number of vertices of
odd degree is even
09/12/16
Walk : A walk is a
sequence
of
edges
and
x
vertices in which none
of edges can be repeated
but a vertex can be
repeated like u-v-x-wu-z
vertex u occurs twice in
the above walk
09/12/16
w
z
u
x
v
10
u
y
y
w
s
z
09/12/16
z
11
Complete graph K
The complete
graph Kn is the
graph with n
vertices and every
pair of vertices is
joined by an edge.
The figure
represents K5
Number of Edges
in Kn is n(n-1)/2
09/12/16
c
z
12
Bipartite graphs
A bipartite graph G is
a graph such that
V(G) = V V
|V | = r, |V | = s
V V =
There does not exist
any edge between
any two vertices in
the subset V & V
w
x
13
K 3,4
09/12/16
Number of edges in K
r,s
=rs
14
c
G
G
d
09/12/16
m
15
Connected graphs
A graph is connected if
every pair of vertices can
be connected by a path
09/12/16
16
Component of a graph
We have already defined sub graph
and connected graph .
Definition :A maximal
connected subgraph
G=(V,E)of a graph
G=(V,E) is called
component of G
09/12/16
17
09/12/16
18
Thm : A graph G is
disconnected iff its
vertex set V can be
partitioned into two
nonempty disjoint sets V
and V such that none of
the vertices in V are
joined through an edge
to a vertex in V.
09/12/16
19
Example
c
g w
09/12/16
A disconnected
graph with
three
m component
20
Not a component
of G as it is not
maximal
connected
a
z
09/12/16
21
Example
c
g w
v
z
Partition of V
09/12/16
A disconnected
m graph with
three
component
V=
{a,c,m,z,w}
V ={u,v,q,g}
22
09/12/16
23
Circuit or cycle
Circuit : Circuit is
a closed walk all
of whose vertices
except starting
and end vertex
are distinct. In a
circuit every
vertex is of degree
2
09/12/16
u
v
Length of
circuit is
number of
vertices in G
24
be q i .
i 1
q (q
i
i 1
Why ?
09/12/16
25
09/12/16
26
(q i2 ) 2n r (n r ) 2
i 1
i 1
1
q i (q i 1) / 2
2
i 1
i 1
2
qi
1
2n r ( n r ) 2 n / 2
2
1 2
(n 2nr r 2 n r )
2
1
(n r ) 2 (n r )
2
09/12/16
i 1
27
e
c
Bipartite ?
If so Partition
09/12/16
28
29
09/12/16
30
Theorem : G is an
unicursal graph if and
only if G is connected
and G has exactly two
vertices of odd degree.
09/12/16
31
v
m
w
z
32
09/12/16
33
v
m
w
z
34
Hamiltonian circuits
Traveling salesperson
problem
To visit every vertex of
a graph G by a circuit.
Such a circuit is called
a Hamiltonian circuit.
If a connected graph G
has a Hamiltonian
circuit, G is called a
Hamiltonian graph.
09/12/16
z
m
35
q
09/12/16
36
Theorem : Let G = (V , E ) be a
undirected graph with | V |= n 3.
If deg(u ) n / 2 , u V
then G contains contains a Hamilton
circuit.
09/12/16
37
38
deg(u)=3
deg(a)=3
G has a
Hamiltonian
circuit.
v
m
w
z
09/12/16
a
39
40
d
v
09/12/16
41
c
w
z
a
d
v
09/12/16
42
m
c
w
z
Similarly mw and wu
09/12/16
43
m
c
w
z
a
d
v
Edge ca, ad
mw, wu
should be in
Hamiltonian
circuit.now
clearly cd can
not be in
Hamiltonian
circuit Hence
cm should be
there hence
mz is not
there
44
c
f
i
09/12/16
45
46
09/12/16
47
09/12/16
48
Edges incident
on vertices of
degree 2 are put first
c
v
u
q
w
09/12/16
r
s
e
x
49
u
q
w
09/12/16
r
s
e
x
50
u
q
w
09/12/16
r
s
e
x
51
Q. What is a necessary
condition for a Bipartite
graph to be Hamiltonian
Partite sets should have equal number of
vertices? Why?
As Hamiltonian circuit passes through
every vertex and every edge joins two
vertices in different partite sets ,
hence to complete the circuit we must
have partite sets must have equal
number of vertices
09/12/16
52
09/12/16
53
z
m
09/12/16
09/12/16
55
09/12/16
56
09/12/16
57
09/12/16
58
09/12/16
59
09/12/16
60
Operations on graphs
Union & intersection
G = (V, E) & G = (V, E) are two
graphs then
GG=(VV, EE)
GG=(VV, EE)
09/12/16
61
09/12/16
62
G G= null graph
If G = Kn and G
G then GG =
is a subgraph of
G\G is as well
written as G-G
Defn : G is a subgraph of G then
G-G is called compliment of G in G
09/12/16
63
a
c
z
m
09/12/16
G
64
a
c
65
Edge decompositon of
graph G
Defn : A graph is said to have
decomposed into graphs G&G
if
GG=G & GG = null graph
i.e. every edge of G occurs in G or G
But not in both. Some of the vertices may
occur in both
09/12/16
66
a
z
m
d
z
m
z
m
09/12/16
67
Operation of deletion
of a vertex v from G
If v is any vertex of G then
G\{v} the graph obtained after
deleting vertex v is the graph in
which vertex v and any edge
incident on v is deleted
09/12/16
68
m
c
G\{z}
a
z
G
09/12/16
69
70
G
a
{a,c}
deg({a,c}) = deg(a)+deg(c)
09/12/16
71
72
q
z
v
{v,w}
u
z
u
73
m
w
q
{c,z}
m
w
09/12/16
q
74
75
09/12/16
76
09/12/16
77
09/12/16
78
09/12/16
79
Q.1 When a graph G said to be Hamiltonian. Are the Graphs G & G Hamiltonian?
Justify your answer clearly.
Home work.
09/12/16
80
09/12/16
81
09/12/16
82
ISOMORPHISM
In simple graphs
09/12/16
83
09/12/16
84
09/12/16
85
II
I
z
m
09/12/16
86
IV
III
z
m
09/12/16
87
VI
z
m
VIII
VII
z
09/12/16
88
IX&
X
09/12/16
89
09/12/16
90
91
09/12/16
92
An effective way of
proving two graphs are
non-isomorphic is
through showing that
graphs have different
degree sequence.
09/12/16
93
DEGREE Sequence
Degree sequence can help
to identify that given two
graphs are non-isomorphic
and cannot be used to
conclude that the graphs are
isomorphic
09/12/16
94
q. Isomorphic graphs
have equal number of
circuits of same length ?
Solution :
95
a
c
w
x
m
Why not Isomorphic ?
09/12/16
z
96
G
G is not
isomorphic to G
G
09/12/16
97
09/12/16
98
09/12/16
99
3+1
100
Degree sequence
(4,4,4,3,3,2)
09/12/16
101
102
(4,4,4,3,3),
z
m
09/12/16
103
Complete graph
(4,4,4,4,4)
(4,3,3,3,3)
d
z
m
09/12/16
104
09/12/16
105
SELF COMPLIMENTARY
GRAPHS
A graph is said to be self
complimentary G
If G is isomorphic to
A simple example
09/12/16
106
G and
09/12/16
108
What is compliments
degree sequence?
(6, 5, 5, 4, 4, 3,2,1)
Number of vertices 8
Hence degree sequence
(7-6,7-5,7-5,7-4,7-4,7-3,7-2,7-1)
Rearrange (6,5,4,3,3,2,2,1) hence
not
Self complimentary.
09/12/16
109
09/12/16
110
Regular of degree 2
Circuit of length 6
and graph consists of two triangles
09/12/16
111
09/12/16
112
Regular of degree 4
complement of 1 regular graph
Regular of degree 5
K5
09/12/16
113
09/12/16
114
115
09/12/16
116
117
(4,3,3,2,1,1)
(4,3,3,2,1,1
)
09/12/16
(4,3,2,2,2,1)
(4,2,2,2,2,2)
09/12/16
119
Try to draw all graphs with compliments degree sequence then we have answer for
Above question?
09/12/16
120