Professional Documents
Culture Documents
10 to Graph
LEARNING OUTCOMES
By the end of this topic, you should be able to:
1. Elaborate the concept of graph and some of the terminologies
related to graph theory; and
2. Identify eight different types of graphs.
X INTRODUCTION
A graph is a discrete structure consisting of vertices (or nodes) and edges that
connect these vertices. There are several different types of graphs. In this topic,
we will discuss the basic concept of graphs. The second part of this topic
introduces a number of different types of graphs.
SELF-CHECK 10.1
In technical terms of discrete mathematics, how what can you
defined graphs? Is it all about graphical representation or more than
that?
124 X TOPIC 10 INTRODUCTION TO GRAPH
If G is a graph with vertices V and edges E, we write G = (V, E). Unless specified
otherwise, the sets V and E are assumed to be finite and V is assumed to be non-
empty. If an edge e E connects vertices v1, v2 V, we can write e = (v1, v2).
This type of graph is also called undirected graph. Graphically, graphs are drawn
by representing vertices as dots and edges as linesconnecting the vertices.
Example 10.1a
The following graph consists of a set of vertives V = {v1, v2, v3} and a set of edges
E = {e1, e2} with e1 = (v1, v2) and e2 = (v2, v3).
Definition 10.1b: An edge e in a graph that is associated with the pair of vertices
v and w, that is e = (v,w), are said to be incident on e and to be adjacent vertices.
Example 10.1b
ACTIVITY 10.1
(a) (b)
(c)
126 X TOPIC 10 INTRODUCTION TO GRAPH
ACTIVITY 10.2
What are the distinct differences and similarities between the graphs
that you have learnt in this topic? List the types of graphs, the
differences and the similarities.
Example 10.2a
A directed graph is shown the figure 10.3. The directed edges are indicated by
arrows. Edge e1 is associated with the ordered pair (a,b) of vertices, and edge e2 is
associated with the ordered pair (c,d) of vertices.
Definition 10.2b:
(a) Edges e1 and e2 in a graph G that are both associated with the vertex pair
(v1, v2) are known as parallel edge.
(b) An edge incident on a single vertex is called a loop.
(c) A vertex that is not incident on any edges is called an isolated vertex.
Example 10.2b
Definition 10.2c: A graph with neither loops nor parallel edges is called a simple
graph.
Example 10.2c
Since the graph below has neither parallel edges nor loops, it is a simple graph.
128 X TOPIC 10 INTRODUCTION TO GRAPH
Example 10.2d
For example, in the Figure 10.6 above the weights of edge (c, e) is 5.
The complete graph K1, K2, and K3 are shown in the figure below:
TOPIC 10 INTRODUCTION TO GRAPH W 129
10.2.5 Cycles
Definition 10.2f: The cycle Cn, n t 3, consists of n vertices v1,v2 , ., vn and
edges (v1,v2), (v2,v3), ., (vn,v1).
Example 10.2f
C3 C4 C5
Figure 10.8: Cycles
10.2.6 n-cube
Example 10.2g
The n-cube, Qn with n = 1,2 and 3 are shown in the figure below:
Example 10.2h
V4
V5
Example 10.2i
V4
Suppose that the graph in figure 10.11 is bipartite. Then, the vertex set can be
partitioned into two subsets V1 and V2 such that each edge is incident one on
vertex in 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 V1 and that v5 V2
Since v5 and v6 are adjacent and v5 V2, v6 V1.
Since v4 and v6 are adjacent and v4 V1, v6 V2.
But now v6 V1 and V6 v2, which is a contradiction since V1 and V2 are
disjoint. Therefore, the graph in figure 10.11 is not bipartite.
Example 10.2j
The complete graph K1 on one vertex is bipartite. We may let V1 be the set
containing the one vertex and V2 be the empty set. Then each edge (namely
none!) is incident on one vertex in V1 and one in V2.
Example 10.2k
The complete bipartite graph on two and four vertices, K2,4 is shown as follows.
ACTIVITY 10.3
1. Determine whether the following graphs are simple or not.
(a) (b)
(c) (d)
(a) (b)
(c)
5. Draw the complete bipartite graph: K3,1, K5,3, K6,6 and K4,7.
(a) (b)
134 X TOPIC 10 INTRODUCTION TO GRAPH
10.3 SUBGRAPH
Sometimes we need to consider only a part of a graph. For example, if we have a
large computer network, we may need to analyse only a small part of the
network in order to solve a certain problem. A subgraph Gc can be obtained by
selecting certain edges and vertices from a graph G subject to the restriction that
if we select an edge e in G that is incident on vertices v and w, we must include v
and w in Gc.
Example 10.3a
The graph Gc = (Vc, Ec) of figure 10.13(a) is a subgraph of the graph G = (V, E) of
figure 10.13(b) since Vc V and Ec E.
e4
V4 V4
(a) (b)
Figure 10.13: Subgraphs
TOPIC 10 INTRODUCTION TO GRAPH W 135
ACTIVITY 10.4
(a) (b)
(c) (d)
This site is available for all IBM compatible machines. You can download games
from this site and start playing with it. Additionally you need about 2.5 MB of
disk space to install the software.
URL: http://www.math.ucalgary.ca/~laf/colorful/download.html