Graphs and Their Applications: May 30, 2014 21:27 WSPC/Book Trim Size For 9in X 6in Bgtbook
Graphs and Their Applications: May 30, 2014 21:27 WSPC/Book Trim Size For 9in X 6in Bgtbook
Chapter 1
1.1 Introduction
A graph consists of a set of vertices and set of edges, each joining two ver-
tices. Usually an object can be represented by a vertex and a relationship
between two objects is represented by an edge. Thus a graph may be used
to represent any information that can be modeled as objects and relation-
ships between those objects. Graph theory deals with study of graphs. The
foundation stone of graph theory was laid by Euler in 1736 by solving a
puzzle called Königsberg seven-bridge problem. Königsberg is an old city in
Eastern Prussia lies on the Pregel river. The Pregel river surrounds an is-
land called Kneiphof and separates into two brances as shown in Fig. 1.1(a)
where four land areas are created: the island A, two river banks B and C ,
and the land D between two branches. Seven bridges connect the four land
areas of the city. It is said that the people of Königsberg used to entertain
themselves by trying to devise a route around the city which would cross
each of the seven bridges just once. Since their attempts had always failed,
many of them beleived that the task was impossible, but there was no proof
until 1736. In that year, one of the leading mathematician of that time,
Leonhard Euler published a solution to the problem that no such walk is
possible. He not only dealt with this particular problem, but also gave a
general method for other problems of the same type. Euler constructed
1
May 30, 2014 21:27 WSPC/Book Trim Size for 9in x 6in bgtbook
a mathematical model for the problem in which each of the four lands A,
B, C and D is represented by four points and each of the seven bridges is
represented by a curve or a line segment as illustrated in Fig. 1.1(b). The
problem can now be stated as follows: Beginning at one of the points A, B,
C and D, is it possible to trace the figure without traversing the same edge
twice? The matematical model constructed for the problem is known as a
graph model of the problem. The points A, B, C and D are called vertices,
the line segments are called edges, and the whole diagram is called a graph.
A
D
(a)
A D
C
(b)
denote the set of vertices of a graph G by V (G) and the set of edges of G
by E(G). Let e = (u, v) be an edge of a graph G. Then the two vertices u
and v are said to be adjacent in G and the edge e is said to be incident to
the vertices u and v. The vertex u is also called a neighbor of v in G and
vice versa. The graph in Figure 1.2(b) has six vertices A, B, C, D, E and
F, and ten edges. Vertices A and B are end vertices of edge (A,B). So A
and B are adjacent. Vertices B, C and F are the neighbors of the vertex A.
Given a map containing several countries, we are asked to color the countries
using different colors so that no two countries with a boundary line in
common share the same color. Of course, our objective will be to use
minimum number of colors. Such a problem can easily be modeled by a
graph, as follows. We represent each country by a vertex and add an edge
between two vertices if the two countries corresponding to the vertices share
a boundary, as illustrated in Figure 1.2 where the Figure ??(b) illustrates
the graph model for the map in Figure 1.2(b). Now the problem becomes
a graph problem which asks to color the vertices of the graphs using the
minimum number of colors so that two adjecent vertices get different colors.
The vertices of the graph in Figure 1.2(b) are colored with four colors and
hence the regions of the map in Figure 1.2(b) can be colored with four
colors.
May 30, 2014 21:27 WSPC/Book Trim Size for 9in x 6in bgtbook
F F 1
A E
C 2 E
A 2
3
B
D
C
D
B
4 1
(a) (b)
Fig. 1.2 (a) A map and (b) a graph model for map coloring.
vertices in such a way that the minimum difference of two adjacent labels
is 2.
E
A
(a)
4 1 3 5 2
A 3 B 2 C 2 D 3 E
(b)
Fig. 1.3 (a) Transmitters with their transmission range, (b) a graph model with fre-
quency assignment.
A gas company wants to supply gas to a locality from a single gas source.
They are allowed to pass the underground gas lines along the road network
only, because no one allows to pass gas lines through the bottom of his
building. The road network divides the locality into many regions as illus-
trated in Figure 1.4(a), where each road is represented by a line segment
and a point at which two or more roads meet is represented by a small
black circle. A point at which two or more roads meet is called an intersec-
tion point. Each region is bounded by some line segments and intersection
points. These regions need to be supplied gas. If a gas line reaches an
intersection point on the boundary of a region, then the region may receive
May 30, 2014 21:27 WSPC/Book Trim Size for 9in x 6in bgtbook
gas from the line at that intersection point. Thus the gas lines should reach
the boundaries of all the regions of the locality. Gas will be supplied from
a gasfield which is located outside of the locality and a single pipe line will
be used to supply gas from the gasfield to an intersection point on the outer
boundary of the locality.
gas field
(a) (b)
The gas company wants to minimize the establishment cost of gas lines
by selecting the roads for laying gas lines such that the total length of the
selected roads is minimum. Since gas will be supplied from the gasfield using
a single line to the locality, the selected road network should be connected
and contains an intersection point on the outer boundary of the locality.
Thus the gas company needs to find a set of roads that induces a connected
road network, supply gas in all the regions of the locality and the length of
the induced road network is minimum. Such a set of roads is illustrated by
thick lines in Figure 1.4(b).
The problem mentioned above can be modeled using a “plane graph.”
A graph is planar if it can be embedded in the plane without edge crossings.
A plane graph is a planar graph with a fixed planar embedding in the plane.
A plane graph divides the plane into connected regions called faces. Let
May 30, 2014 21:27 WSPC/Book Trim Size for 9in x 6in bgtbook
4 4
5 5
4 4
2 2
7 6 6
3 3 2 3 3 2
4 4
2 3 6 6
3 2 3 3
4 2 3 2
2 5 5
6 6 2
4 4
4 2 2
4
3 3
5 5
4 4
(a) (b)
Fig. 1.5 A simple graph with (a) a face-spanning subgraph of cost 22 and (b) another
face-spanning subgraph of cost 17.
1.2.4 Floorplanning
b b
b
a f a f
a b
f
e c a f
e e
g e
g g d g c
c c
d
d d
(a) (b) (c) (d)
Fig. 1.6 (a) Graph F , (b) triangulated graph F ′ , (c) dual-like graph G, and (d) rect-
angular drawing of G.
The World Wide Web can be modeled as a graph, where the web pages are
represented by vertices and the hyperlinks between them are represented
by edges. Examining web graphs it is possible to discover interesting infor-
mation. For example, extracting dense subgraphs in a web graphs we can
find a community of particular interest. In a graph representation of a web
graph shown in Figure 1.7, two possible communites of particular interests
are indicated by dotted circles.
1.2.6 Bioinformatics
a
a a
g c g
a a
g a
g c
u u
g a a u
Exercise
1. Study your campus map and model the road network inside your campus
by a graph.
May 30, 2014 21:27 WSPC/Book Trim Size for 9in x 6in bgtbook
4. There are five jobs {J1 , J2 , J3 , J4 , J5 } in a company for which there are
five workers A, B, C, D & E to do those jobs. However, everybody does
not have expertise to do every job. Their expertise is as follows: A =
{J1 , J2 , J3 }, B = {J2 , J4 }, C = {J1 , J3 , J5 }, D = {J3 , J5 }, E = {J1 , J5 }.
Develop a graph model to represent the job expertise of the persons and
find an assignment of jobs to the workers such that every worker can do
a job.
May 30, 2014 21:27 WSPC/Book Trim Size for 9in x 6in bgtbook