Discrete Mathematics: Graph Theory 1
Discrete Mathematics: Graph Theory 1
Discrete Mathematics: Graph Theory 1
Graph Theory 1
1
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
Example:
V = {s, u, v, w, x, y, z}
E = {(x,s), (x,v)1, (x,v)2, (x,u),
(v,w), (s,v), (s,u), (s,w), (s,y),
(w,y), (u,y), (u,z),(y,z)}
2
Edges
An edge may be labeled by a pair of vertices, for
instance e = (v,w).
e is said to be incident on v and w.
Isolated vertex = a vertex without incident
edges.
3
Special edges
Parallel edges
Two or more edges
joining a pair of vertices
in the example, a and b
are joined by two parallel
edges
Loops
An edge that starts and
ends at the same vertex
In the example, vertex d
has a loop
4
Special graphs
Simple graph
A graph without loops
or parallel edges.
Weighted graph
A graph where each
edge is assigned a
numerical label or
“weight”.
5
Directed graphs (digraphs)
G is a directed graph or
digraph if each edge
has been associated
with an ordered pair
of vertices, i.e. each
edge has a direction
6
Complete graph K n
7
Bipartite graphs
A graph G = (V, E) is V1
V2
bipartite if there exist
subsets
V and V of V such that
1 2
V ∩ V = ∅, V ∪ V = V,
1 2 1 2
and
each edge in E is
incident on one vertex
in V and one vertex in
1
V.2
8
Not bipartite
Here vertex set can be partitioned
into two subsets V1 and V2 such
that each edge is incident on one
vertex in V1 and one vertex in V2.
Now consider the vertices v4, v5,
and v6. Since v4 and v5 are
adjacent, one is in V1 and the
other in V2. We may assume that
v4 is in V1 and that v5 is in V2.
Since v5 and v6 are adjacent and
v5 is in V2, v6 is in V1. Since v4
and v6 are adjacent and v4 is in
V1, v6 is in V2. But now v6 is in
both V1 and V2, which is a
contradiction
since V1 and V2 are disjoint.
Therefore, the graph in Figure is
not bipartite.
9
Complete bipartite graph Km,n
|V(G2)| = n
10
Connected graphs
A graph is connected if
every pair of vertices
can be connected by a
path
11
Not connected graphs
12
Path
A path of length n is a
v w
sequence of n + 1
vertices and n
consecutive edges
No repeated vertices
in simple path
13
Cycles
A cycle (or circuit) is
a path of nonzero
length from v to v
with no repeated
edges.
14
Paths & Cycles
15
Solution
16
Degree of a vertex
The degree of a vertex
v, denoted by (v), is
the number of edges
incident on v
Example:
(a) = 4, (b) = 3,
(c) = 4, (d) = 6,
(e) = 4, (f) = 4,
(g) = 3.
17
Reference
‘Discrete Mathematics’ by Richard
Johnsonbaugh, 8th Edition
Section 8.1 and Section 8.2
18