You are on page 1of 13

To pic X Introduction

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.

10.1 THE CONCEPT OF GRAPH

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

Definition 10.1a: A graph G consists of a set V of vertices and a set E of edges


such that each edge e  E is associated with an unordered pair of vertices.

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).

Figure 10.1: Example 10.1a

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.

Definition 10.1c: Two vertices u and v in a graph G are called adjacent in G if


(u,v) is an edge in G.

Definition 10.1d: The degree of a vertex in a graph is the number of edges


incident with it, except that a loop at the vertex contributes twice to the
degree the vertex. The degree of vertex v is denoted by deg(v).
TOPIC 10 INTRODUCTION TO GRAPH W 125

Example 10.1b

In the graph below:

Examples of adjacent vertices  a and b, b and c, c and d, a and c.

deg(a) = 4, deg(b) = 4, deg(c) = 4, deg(d) = 4, deg(e) = 4.

Figure 10.2: Adjacent vertices

ACTIVITY 10.1

List all the vertex and edges of the following graphs:

(a) (b)

(c)
126 X TOPIC 10 INTRODUCTION TO GRAPH

10.2 TYPES OF GRAPH

10.2.1 Directed 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.

Definition 10.2a: A directed graph (or digraph) G consists of a set V of vertices


and a set E of edges such
such that
that each edge ee 
each edge E E is associated with an ordered
pair of vertices.

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.

Figure 10.3: Directed graph


TOPIC 10 INTRODUCTION TO GRAPH W 127

10.2.2 Simple Graph

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

In the graph below:


(a) e1 and e2 are parallel adges
(b) e3 is a loop
(c) v4 is an isolated vertex

Figure 10.4: 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

Figure 10.5: Simple graph

10.2.3 Weighted Graph

Definition 10.2d: A graph with numbers on the edges is called a weighted


graph. If edge e is labeled k, we say that the weight of edge e is k.

Example 10.2d

Figure 10.6: Weighted graph

For example, in the Figure 10.6 above the weights of edge (c, e) is 5.

10.2.4 Complete Graph


Example 10.2e

The complete graph K1, K2, and K3 are shown in the figure below:
TOPIC 10 INTRODUCTION TO GRAPH W 129

Figure 10.7: Example 10.2e

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

Cycles C3, C4, and C5 are shown in the figure below:

C3 C4 C5
Figure 10.8: Cycles

10.2.6 n-cube

Definition 10.2g: The n-cube, denoted by Qn is a graph that has vertices


representing the 2n bit strings of length n. The two vertices are adjacent if and
only if the bit strings that they represent differ in exactly one bit position.
130 X TOPIC 10 INTRODUCTION TO GRAPH

Example 10.2g

The n-cube, Qn with n = 1,2 and 3 are shown in the figure below:

Figure 10.9: n-cube

10.2.7 Bipartite Graph

Definition 10.2h: A graph G = (V, E) is bipartite if there exist subset V1 and V2


(either possibly empty) of V such that V1 ˆ V2 = ø and V1 ‰ V2 = V, and
each edge in E is incident on one vertex in V1 and one vertex in V2.

Example 10.2h

The graph in figure 10.10 is bipartite since if we let


V1 = {v1, v2, v3} and V2 = {v4, v5}
Each edge is incident on one vertex in V1 and one vertex in V2.

V4

V5

Figure 10.10: Bipartite graph

Example 10.2i

The graph in figure 10.11 is not bipartite.


TOPIC 10 INTRODUCTION TO GRAPH W 131

V4

Figure 10.11: Not bipartite graph

It is often easier to prove that a graph is not bipartite by arguing by contradiction.

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.

10.2.8 Complete Bipartite Graph

Definition 10.2i: The complete bipartite graph on m and n vertices, denoted


km,n, is the simple graph whose vertex set is partitioned into sets V1 with m
vertices and V2 with n vertices in which these are edges between each pair of
vertices v1 and v2, where v1 is in V1 and v2 is in v2.
132 X TOPIC 10 INTRODUCTION TO GRAPH

Example 10.2k

The complete bipartite graph on two and four vertices, K2,4 is shown as follows.

Figure 10.12: Complete bipartite graph

ACTIVITY 10.3
1. Determine whether the following graphs are simple or not.

(a) (b)

(c) (d)

2. In the following graph the vertices represent cities and the


numbers on the edges represent the cost of building the
indicated roads. Find the least expensive road system that
connects all the cities.
TOPIC 10 INTRODUCTION TO GRAPH W 133

3. Suppose the following graph models a communication


network. The vertices represent offices. An edge connects two
offices if there is a communication link between the two. Show,
by giving an example, that communication among all offices is
still possible even if some communication links are broken.

4. State which graphs below are bipartite graphs. If the graph is


bipartite, specify the disjoint vertex sets.

(a) (b)

(c)

5. Draw the complete bipartite graph: K3,1, K5,3, K6,6 and K4,7.

6. Determine whether the graphs below are complete bipartite


graph or not.

(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.

Definition 10.3a: Let G = (V, E) be a graph. We call (Vc, Ec) a subgraph of G


If
(a) Vc subset V and Ec subset E
(b) For every edge ec  Ec, if ec is incident on vc and wc, then vc, wc  Vc

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

Verify all the subgraph that are in the graphs below.

(a) (b)

(c) (d)

This site is a dictionary site that is full of information of graph. Easy to


understand for those who are still unfamiliar with the chapter on graph.
You can view them at:
URL: http://encyclopedia.thefreedictionary.com/Graph%20theory

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

You might also like