Graph Theory Notes Module 5
Graph Theory Notes Module 5
The Pregolya River passes through a city once known as Konigsberg. In the 1700s seven bridges
were situated across this river in a manner similar to what you see in Figure 1.1. The city’s residents
enjoyed strolling on these bridges, but, as hard as they tried, no resident of the city was ever able
to walk a route that crossed each of these bridges exactly once. The Swiss mathematician Leonhard
Euler learned of this frustrating phenomenon, and in 1736 he wrote an article [98] about it. His
work on the “Konigsberg Bridge Problem” is considered by many to be the beginning of the field
of graph theory.
At first, the usefulness of Euler’s ideas and of “graph theory” itself was found only in solving
puzzles and in analyzing games and other recreations. In the mid 1800s, however, people began to
realize that graphs could be used to model many things that were of interest in society. For instance,
the “Four Color Map Conjecture,” introduced by DeMorgan in 1852, was a famous problem that
was seemingly unrelated to graph theory. The conjecture stated that four is the maximum number
of colors required to color any map where bordering regions are colored differently. This
conjecture can easily be phrased in terms of graph theory, and many researchers used this approach
during the dozen decades that the problem remained unsolved.
The field of graph theory began to blossom in the twentieth century as more and more modeling
possibilities were recognized and the growth continues. It is interesting to note that as specific
applications have increased in number and in scope, the theory itself has developed beautifully as
well.
CHAPTER
INTRODUCTION
It is no coincidence that graph theory has been independently discovered many times, since it
may quite properly be regarded as an area of applied mathematics.
The basic combinatorial nature of graph theory and a clue to its wide applicability are indicated
in the words of Sylvester, ‘‘The theory of ramification is one of pure colligation, for it takes no
account of magnitude or position ; geometrical lines are used, but have no more real bearing on the
matter than those employed in genealogical tables have in explaining the laws of procreation.’’
Indeed, the earliest recorded mention of the subject occurs in the works of Euler, and
although the original problem he was considering might be regarded as a somewhat frivolous
puzzle, it did arise from the physical world. Subsequent rediscoveries of graph theory by Kirchhoff
and Cayley also had their roots in the physical world.
Kirchhoff’s investigations of electric networks led to his development of the basic concepts and
theorems concerning trees in graphs, while Cayley considered trees arising from the enumeration of
organic chemical isomers. Another puzzle approach to graphs was proposed by Hamilton. After this,
the celebrated four colour conjecture came into prominence and has been notorious ever since.
In the present century, there have already been a great many rediscoveries of graph theory
which we can only mention most briefly in this chronological account.
Euler (1707–1782) became the father of graph theory as well as topology. Graph theory is con-
sidered to have begun in 1736 with the publication of Euler’s solution of the Königsberg bridge prob-
lem. The graph theory is one of the few fields of mathematics with a definite birth date by ore.
1
2 GRAPH THEORY WITH APPLICATIONS
Every graph has a diagram associated with it. The vertex u and an edge e are incident with each
other as are v and e. If two distinct edges say e and f are incident with a common vertex, then they are
adjacent edges.
A graph with p-vertices and q-edges is called a (p, q) graph.
The (1, 0) graph is called trivial graph.
In the following figure the vertices a and b are adjacent but a and c are not. The edges x and y are
adjacent but x and z are not.
Although the edges x and z intersect in the diagram, their intersection is not a vertex of the graph.
Examples :
(1) Let V = {1, 2, 3, 4} and E = {{1, 2}, {1, 3}, {3, 2}. {4, 4}}.
Then G(V, E) is a graph.
(2) Let V = {1, 2, 3, 4} and E = {{1, 5}, {2, 3}}.
Then G(V, E) is not a graph, as 5 is not in V.
(3)
Suppose e = (u, v) is a directed edge in a digraph, then (i) u is called the initial vertex of e and v
is the terminal vertex of e
(ii) e is said to be incident from u and to be incident to v.
(iii) u is adjacent to v, and v is adjacent from u.
1.3.1 Loop : An edge of a graph that joins a node to itself is called loop or self loop.
i.e., a loop is an edge (vi, vj) where vi = vf.
1.3.2. Multigraph
In a multigraph no loops are allowed but more than one edge can join two vertices, these edges
are called multiple edges or parallel edges and a graph is called multigraph.
Two edges (vi, vj) and (vf , vr) are parallel edges if vi = vr and vj, vf.
In Figure 1.2(a), there are two parallel edges associated with v2 and v3.
In Figure 1.2(b), there are two parallel edges joining nodes v1 and v2 and v2 and v3.
In a graph G, the out degree of a vertex vi of G, denoted by out degG (vi) or degG+ (vi), is the
number of edges beginning at vi and the in degree of vi, denoted by in degG (vi) or deg−G1 (vi), is the
number of edges ending at vi.
The sum of the in degree and out degree of a vertex is called the total degree of the vertex. A
vertex with zero in degree is called a source and a vertex with zero out degree is called a sink. Since
each edge has an initial vertex and terminal vertex.
Proof : Since the degree of a vertex is the number of edges incident with that vertex, the sum of the
degree counts the total number of times an edge is incident with a vertex.
Since every edge is incident with exactly two vertices, each edge gets counted twice, once
at each end.
Thus the sum of the degrees equal twice the number of edges.
Note : This theorem applies even if multiple edges and loops are present. The above theorem
holds this rule that if several people shake hands, the total number of hands shake must be
even that is why the theorem is called handshaking theorem.
Corollary : In a non directed graph, the total number of odd degree vertices is even.
Proof : Let G = (V, E) a non directed graph.
Let U denote the set of even degree vertices in G and W denote the set of odd degree
vertices.
n n
If G is a directed graph, then ∑ deg+ (vi ) = ∑ deg− (vi ) = |E|
i =1 i =1
k|V|≤ ∑ deg ( v) = 2 | E |
v ∈ V(G)
k|V|= ∑ deg ( v) = 2 | E | .
v ∈ V(G)
Problem 1.1. Show that, in any gathering of six people, there are either three people who all
know each other or three people none of whom knows either of the other two (six people at a party).
Solution. To solve this problem, we draw a graph in which we represent each person by a vertex
and join two vertices by a solid edge if the corresponding people know each other, and by a dotted edge
if not. We must show that there is always a solid triangle or a dotted triangle.
Let v be any vertex. Then there must be exactly five edges incident with v, either solid or dashed,
and so at least three of these edges must be of the same type.
Let us assume that there are three solid edges (see figure 5) ; the case of atleast three dashed
edges is similar.
Fig. 5.
If the people corresponding to the vertices w and x know each other, then v, w and x form a solid
triangle, as required.
Similarly, if the people corresponding to the vertices w and y, or to the vertices x and y, know each
other, then we again obtain a solid triangle.
These three cases are shown in Figure (6).
8 GRAPH THEORY WITH APPLICATIONS
Fig. 6.
Finally, if no two of the people corresponding to the vertices w, x and y know each other, then w,
x and y from a dotted triangle, as required (see figure (7).
Fig. 7.
Problem 1.2. Place the letters A, B, C, D, E, F, G, H into the eight circles in Figure (8), in such
a way that no letter is adjacent to a letter that is next to it in the alphabet.
Fig. 8.
Solution. First note that trying all the possibilities is not a practical proposition, as there are 8 ! =
40320 ways of placing eight letters into eight circles.
Note that (i) the easiest letters to place are A and H, because each has only one letter to which it
cannot be adjacent, namely, B and G, respectively.
(ii) the hardest circles to fill are those in the middle, as each is adjacent to six others.
This suggests that we place A and H in the middle circles. If we place A to the left of H, then the
only possible positions for B and G are shown in Figure (9).
Fig. 9.
INTRODUCTION TO GRAPH THEORY 9
The letter C must now be placed on the left-hand side of the diagram, and F must be placed on the
right-hand side.
It is then a simple matter to place the remaining letters, as shown in Figure (10).
Fig. 10.
Problem 1.3. Determine the number of edges in a graph with 6 vertices, 2 of degree 4 and 4 of
degree 2. Draw two such graphs.
Solution. Suppose the graph with 6 vertices has e number of edges. Therefore by Handshaking
lemma
6
∑ deg (vi ) = 2e
i=1
⇒ d(v1) + d(v2) + d(v3) + d(v4) + d(v5) + d(v6) = 2e
Now, given 2 vertices are of degree 4 and 4 vertices are of degree 2.
Hence the above equation,
(4 + 4) + (2 + 2 + 2 + 2) = 2e
⇒ 16 = 2e ⇒ e = 8.
Hence the number of edges in a graph with 6 vertices with given condition is 8.
Two such graphs are shown below in Figure (11).
Fig. 11.
Problem 1.4. How many vertices are needed to construct a graph with 6 edges in which each
vertex is of degree 2.
Solution. Suppose these are P vertices in the graph with 6 degree. Also given the degree of each
vertex is 2.
By handshaking lemma,
P
∑ deg (vi ) = 2q = 2 × 6
i =1
Problem 1.5. It is possible to construct a graph with 12 vertices such that 2 of the vertices have
degree 3 and the remaining vertices have degree 4.
Solution. Suppose it is possible to construct a graph with 12 vertices out of which 2 of them are
having degree 3 and remaining vertices are having degree 4.
Hence by handshaking lemma,
12
∑ d (vi ) = 2e where e is the number of edges
i =1
4×3
Hence a simple graph with 4 vertices will have at most = 6 edges.
2
Therefore, the simple graph with 4 vertices cannot have 7 edges.
Hence such a graph does not exist.
Problem 1.7. Show that the maximum degree of any vertex in a simple graph with P vertices is
(P – 1).
Solution. Let G be a simple graph with P-vertices. Consider any vertex v of G. Since the graph is
simple (i.e., without self loops and parallel edges), the vertex v can be adjacent to atmost remaining (P – 1)
vertices.
Hence the maximum degree of any vertex in a simple graph with P vertices is (P – 1).
Problem 1.8. Write down the vertex set and edge set of the following graphs shown in Figure
12(a) and 12(b).
Fig. 12.
INTRODUCTION TO GRAPH THEORY 11
Solution. (a) V(G) = {v1, v2, v3, v4, v5, v6, v7, v8, v9}
E(G) = {v1v2, v1v3, v2v3, v3v4, v5v6, v6v6, v7v8}
(b) V(G) = {α, β, γ, δ}
E(G) = {αβ, αγ, αδ, βδ, βγ, γδ}.
Problem 1.9. Show that the size of a simple graph of order n cannot exceed n C2.
Solution. Let G be a graph of order n.
Let V be a vertex set of G.
Then cardinality of V is n and elements of E are distinct two elements subsets of V.
The number of ways we can choose two elements from a set V of n elements is nC2.
Thus, E may not have more than nC2 elements (edges).
Problem 1.10. Find the degree sequence of the following graph.
Problem 1.12. Show that there exists no simple graph corresponds to the following degree
sequence :
(i) 0, 2, 2, 3, 4 (ii) 1, 1, 2, 3 (iii) 2, 2, 3, 4, 5, 5 (iv) 2, 2, 4, 6.
Solution. (i) to (iii) :
There are odd number of odd degree vertices in the graph.
Hence there exists no graph corresponds to this degree sequence.
(iv) Number of vertices in the graph is four and the maximum degree of a vertex is 6, which is not
possible as the maximum degree cannot exceed one less than the number of vertices.
26 GRAPH THEORY WITH APPLICATIONS
Here H is not an induced subgraph since v4v1 ∈ E(G), but v4v3 ∉ E(H).
On the otherhand the graph J is an induced subgraph of G. Thus every induced subgraph of a
graph G is obtained by deleting a subset of vertices from G.
Note : Let | V | = m and | E | = n. The total non-empty subsets of V is 2m – 1 and total subsets of
E is 2n.
Thus, number of subgraphs is equal to (2m – 1) × 2n.
The number of spanning subgraphs is equal to 2n.
Problem 1.41. Construct two edge-disjoint subgraphs and two vertex disjoint subgraphs of a
graph G shown below
Solution.
S3 and S4 are vertex disjoint subgraphs of G which are also edge-disjoint subgraphs of G.
Problem 1.42. Does there exist a proper subgraph S of G whose size is equal to the size of the
graph ?
Solution. Yes, consider the graph G shown in Figure below.
The graph S is a subgraph of G with V(S) ⊂ E(G) and E(S) = E(G).
INTRODUCTION TO GRAPH THEORY 29
Problem 1.43. Write down all possible non-isomorphic subgraphs of the following graphs G.
How many of they are spanning subgraphs ?
Solution. There are one-to-one correspondence between the vertices as well as between edges.
Further, the incidence property is preserved.
Therefore, G1 is isomorphic to G2.
Problem 1.66. Establish a one-one correspondence between the vertices and edges to show
that the following graphs are isomorphic.
42 GRAPH THEORY WITH APPLICATIONS
Define an isomorphism φ : V(G1) → V(G2) by φ(i) = i, we observe that φ preserves the adjacency
and non-adjacency of the vertices.
Hence G1 and G2 are isomorphic to each other.
1.10.1. Union
Given two graphs G1 and G2, their union will be a graph such that
V(G1 ∪ G2) = V(G1) ∪ V(G2)
and E(G1 ∪ G2) = E(G1) ∪ E(G2)
INTRODUCTION TO GRAPH THEORY 49
Fig. 30.
50 GRAPH THEORY WITH APPLICATIONS
Fig. 31.
A complete graph is always connected, also, a null graph of more than one vertex is disconnected
(see Fig. 32). All paths and circuits in a graph G are connected subgraphs of G.
Fig. 32.
Every graph G consists of one or more connected graphs, each such connected graph is a subgraph
of G and is called a component of G. A connected graph has only one component and a disconnected
graph has two or more components.
For example, the graphs in Figure 31(a, b) have two components each.
1.12.1. Path graphs and cycle graphs
A connected graph that is 2-regular is called a cycle graph. Denote the cycle graph of n vertices
by Γn. A circuit in a graph, if it exists, is a cycle subgraph of the graph.
The graph obtained from Γn by removing an edge is called the path graph of n vertices, it is
denoted by Pn.
Fig. 33.
The graphs Γ6 and P6 are shown in Figure 33(a) and 33(b) respectively.
INTRODUCTION TO GRAPH THEORY 57
Note that in the first of these, each vertex and each edge appears only once whereas in the second
each edge appears only once but the vertex v5 appears twice.
These walks may be denoted simply as v2v6v4v3 and v7v2v6v5v5 respectively.
Fig. 34.
The vertex with which a walk begins is called the initial vertex and the vertex with which a walk
ends is called the final vertex of the walk. The initial vertex and the final vertex are together called
terminal vertices. Non-terminal vertices of a walk are called its internal vertices.
A walk having u as the initial vertex and v as the final vertex is called a walk from u to v or briefly
a u – v walk. A walk that begins and ends at the same vertex is called a closed walk. In other words, a
closed walk is a walk in which the terminal vertices are coincident.
A walk that is not closed is called an open walk.
In other words, an open walk is a walk that begins and ends at two different vertices.
For example, in the graph shown in Figure 34.
v1e9v7e8v2e1v1 is a closed walk and v5e7v5e6v6e5v4 is an open walk.
1.13.2. Path
In a walk, a vertex can appear more than once. An open walk in which no vertex appears more
than once is called a simple path or a path.
For example, in the graph shown in Figure 34.
v6e5v4e3v3e2v2 is a path whereas v5e7v5e6v6 is an open walk but not a path.
1.13.3. Circuit
A closed walk with atleast one edge in which no vertex except the terminal vertices appears more
than once is called a circuit or a cycle.
For example, in the graph shown in Figure 34,
v1e1v2e8v7e9v1 and v2e4v6e5v4e3v3e2v2 are circuits.
But v1e9v7e8v2e4v6e5v4e3v3e2v2e1v1 is a closed walk but not a circuit.
Note : (i) In walks, path and circuit, no edge can appears more than once.
(ii) A vertex can appear more than once in a walk but not in a path.
(iii) A path is an open walk, but an open walk need not be a path.
(iv) A circuit is a closed walk, but a closed walk need not be a circuit.
58 GRAPH THEORY WITH APPLICATIONS
1.13.4. Length
The number of edges in a walk is called its length. Since paths and circuits are walks, it follows
that the length of a path is the number of edges in the path and the length of a circuit is the number of
edges in the circuit.
A circuit or cycle of length k, (with k edges) is called a k-circuit or a k-cycle. A k-circuit is called
odd or even according as k is odd or even. A 3-cycle is called a triangle.
For example, in the graph shown in Figure 34,
The length of the open walk v6e6v5e7v5 is 2
The length of the closed walk v1e9v7e8v2e1v1 is 3
The length of the circuit v2e4v6e5v4e3v3e2v2 is 4
The length of the path v6e5v4e3v3e2v2e1v1 is 4
The circuit v1e1v2e8v7e10v1 is a triangle.
Note : (i) A self-loop is a 1-cycle.
(ii) A pair of parallel edges form a cycle of length 2.
(iii) The edges in a 2-cycle are parallel edges.
Problem 1.76. Write down all possible
(i) paths from v1 to v8 (ii) Circuits of G and (iii) trails of length three.
in G from v3 to v5 of the graph shown in Figure (35).
Fig. 35.
INTRODUCTION TO GRAPH THEORY 59
Solution.
(i) P1 : v1e12v8, l(P1) = 1
P2 : v1e1v2e7v5e8v6e9v7e11v8, l(P2) = 5
P3 : v1e1v2e2v3e4v4e6v5e8v6e9v7e11v8, l(P3) = 7
These are the only possible paths from v1 to v8 in G.
(ii) C1 : v1e1v2e7v5e8v6e9v7e11v8e12v1, l(C1) = 6
C2 : v1e1v2e2v3e4v4e6v5e8v6e9v7e11v8e12v1, l(C2) = 8
C3 : v2e2v3e4v4e6v5e7v2, l(C3) = 4
C4 : v3e3v3, l(C4) = 1
C5 : v4e5v4, l(C5) = 1
C6 : v7e7v10, l(C6) = 1
These are the only possible circuits of G.
W1 : v3e3v3e2v2e7v5, l(W1) = 3
W2 : v3e3v3e4v4e6v5, l(W2) = 3
W3 : v3e4v4e5v4e6v5, l(W3) = 3.
These are the only possible trails of length three from v3 to v5.
Problem 1.77. In the graph below, determine whether the following are paths, simple paths,
trails, circuits or simple circuits,
(i) v0e1v1e10v5e9v2e2v1 (ii) v4e7v2e9v5e10v1e3v2e9v5
(iii) v2 (iv) v5v2v3v4v4v4v5.
Solution. (i) The sequence has a repeated vertex v1 but does not have a repeated edge so it is a
trail. It is not cycle or circuit.
(ii) The sequence has a repeated vertex v2 and repeated edge e9. Hence it is a path. It is not
cycle or circuit.
(iii) It has no repeated edge, no repeated vertex, starts and ends at same vertex. Hence it is a
simple circuit.
(iv) It is a circuit since it has no repeated edge, starts and ends at same vertex. It is not a simple
circuit since vertex v4 is repeated.
Theorem 1.14. In a graph (directed or undirected) with n vertices, if there is a path from
vertex u to vertex v then the path cannot be of length greater than (n – 1).
Proof. Let π : u, v1, v2, v3, ..... vk , v be the sequence of vertices in a path u and v.
If there are m edges in the path then there are (m + 1) vertices in the sequence.
60 GRAPH THEORY WITH APPLICATIONS
If m < n, then the theorem is proved by default. Otherwise, if m ≥ n then there exists a vertex vj in
the path such that it appears more than once in the sequence
(u, v1, ......., vj ......, vj , ...... vk , v).
Deleting the sequence of vertices that leads back to the node vj, all the cycles in the path can be
removed.
The process when completed yields a path with all distinct nodes. Since there are n nodes in the
graph, there cannot be more than n distinct nodes and hence n – 1 edges.
Problem 1.78. For the graph shown in Figure, indicate the nature of the following sequences
of vertices
(a) v1v2v3v2 (b) v4v1v2v3v4v 5 (c) v1v2v3v4v5
(d) v1v2v3v4v1 (e) v6v5v4v3v2v1v4v6
(iii) The sum of entries in row i is equal to the number of arcs directed away from vertex vi (out
degree of vertex vi)
(iv) The (i, j) entry of Am is equal to the number of path of length m from vertex vi to vertex vj
entries of AT. A shows the in degree of the vertices.
The adjacency matrices can also be used to represent directed multigraphs. Again such
matrices are not zero-one matrices when there are multiple edges in the same direction
connecting two vertices.
In the adjacency matrix for a directed multigraph aij equals the number of edges that are
associated to (vi, vj).
Problem 1.110. Use adjacency matrix to represent the graphs shown in Figure below
Solution. We order the vertices in Figure (1)(a) as v1, v2, v3 and v4.
Since there are four vertices, the adjacency matrix representing the graph will be a square matrix
of order four. The required adjacency matrix A is
0 1 1 1
1 0 1 1
A=
1 1 0 1
1 0 1 0
We order the vertices in Figure (1)(b) as v1, v2 and v3. The adjacency matrix representing the
graph is given by
0 1 0
A = 1 1 2
0 2 0
Taking the order of the vertices in Figure(1)(c) as v1, v2, v3 and v4. The adjacency matrix repre-
senting the graph is given by
0 1 1 0
0 0 1 0
A=
0 0 0 1
1 0 0 0
Problem 1.111. Draw the undirected graph represented by adjacency matrix A given by
0 1 1 00
1 0 1 00
A = 1 1 0 10
0 0 1 0 1
0 0 0 1 1
Solution. Since the given matrix is a square of order 5, the graph G has five vertices v1, v2, v3, v4
and v5.
94 GRAPH THEORY WITH APPLICATIONS
0 0 1 1
0 0 1 0
A=
1 1 0 1
1 1 1 0
Solution. Since the given matrix is square matrix of order four, the graph G has 4 vertices v1, v2,
v3 and v4. Draw an edge from vi to vj where aij = 1.
The required graph is shown in Figure below.
1 2 0 0
3 0 1 1
A =
0 1 2 2
0 1 2 0
Solution. Since the given adjacency matrix is square matrix of order 4, G has four vertices v1, v2,
v3 and v4. Draw n edges from vi to vj where aij = n.
Also draw n loop at vi where aij = n.
The required graph is shown in Figure below.
INTRODUCTION TO GRAPH THEORY 95
Solution. Consider the map f : G → G′ define as f (a) = d ′, f (b) = a′, f (c) = b′, f (d) = c′ and f (e) = e′.
The adjacency matrix of G for the ordering a, b, c, d and e is
a b c d e
a 0 1 0 1 0
b 1 0 1 0 1
A(G) = c 0 1 0 1 1
d 1 0 1 0 1
e 0 1 1 1 0
The adjacency matrix of G′ for the ordering d′, a′, b′, c′ and e′ is
d′ a′ b′ c′ e ′
d′ 0 1 0 1 0
a′ 1 0 1 0 1
A(G′) = b′ 0 1 0 1 1
c′ 1 0 1 0 1
e′ 0 1 1 1 0
i.e., A(G) = A(G′)
∴ G and G′ are isomorphic.
Problem 1.115. Find the incidence matrix to represent the graph shown in Figure below :
96 GRAPH THEORY WITH APPLICATIONS
Solution. The incidence matrix of Figure (a) is obtained by entering for row v and column e is 1
if e is incident on v and 0 otherwise. The incidence matrix is
e1 e2 e3 e4 e5
v1 1 0 0 1 1
v2 1 1 0 0 0
v3 0 1 1 0 1
v4 0 0 1 1 0
The incidence matrix of the graph of Figure (b) is
1 0 0 −1 1
− 1 1 0 0 0
0 −1 1 0 − 1
0 0 −1 1 0
Problem 1.116. Use an adjacency matrix to represent the graph shown in Figure below :
0 1 1 1
1 0 1 0
1 1 0 0
1 0 0 0
0 1 1 0
1 0 0 1
1 0 0 1
0 1 1 0
with respect to the ordering of vertices a, b, c, d.
INTRODUCTION TO GRAPH THEORY 97
Problem 1.118. Use an adjacency matrix to represent the pseudograph shown in Figure
below :
0 3 0 2
3 0 1 1
0 1 1 2
2 1 2 0
Problem 1.119. Represent the graph shown in Figure below, with an incidence matrix.
e1 e2 e3 e4 e5 e6
v1 1 1 0 0 0 0
v2 0 0 1 1 0 1
v3 0 0 0 0 1 1
v4 1 0 1 0 0 0
v5 0 1 0 1 1 0
Problem 1.120. Represent the Pseudograph shown in Figure below, using an incidence matrix.
Problem 1.121. Write adjacency structure for the graphs shown in Figure (1)
Solution. The adjacency structure representation is given in the table for Figure (a).
Here the symbol φ is used to denote the empty list.
INTRODUCTION TO GRAPH THEORY 99
a b, c
b a, c
c a, b, d
d e
e φ
The adjacency structure representation is given in the table for the directed graph shown in
Figure (b).
Vertex Adjacency list
a b, c
b c
c d
d a, e
e c
(i)
(ii)
100 GRAPH THEORY WITH APPLICATIONS
(i)
(ii)
(i)
INTRODUCTION TO GRAPH THEORY 101
(ii)
7. Write down the number of vertices, the number of edges, and the degree of each vertex, in
(i) the graph in Fig. (a) (ii) the tree in Fig. (b).
8. Figure below represents the chemical molecules of methane (CH4) and propane (C3H8).
(i) Regarding these diagrams as graphs, what can you say about the vertices representing car-
bon atoms (C) and hydrogen atoms (H) ?
(ii) There are two different chemical molecules with formula C4H10. Draw the graphs corre-
sponding to these molecules.
9. Write down the vertex set and edge set of each graph in Figure below :
102 GRAPH THEORY WITH APPLICATIONS
Fig. (a)
Fig. (b)
13. For the graphs shown below, indicate the number of vertices, the number of edges and the
degrees of vertices.
18. Three graphs G1, G2, G3 are shown in Figure (a), (b), (c) respectively. Is G1 a supergraph of G2
and G3 ?
19. Let G be the graph shown in Figure below. Verify whether H = (V′, E′) is a subgraph of G in the
following cases :
(i) V′ = {P, Q, S}, E′ = {(P, Q), (P, S)}
(ii) V′ = {Q}, E′ = φ, the null set
(iii) V′ = {P, Q, R}, E′ = {(P, Q), (Q, R), (Q, S)}
104 GRAPH THEORY WITH APPLICATIONS
20. For the graph shown in the following Figure, find the nature of the following sequence :
(i) BAPCB (ii) PABQ (iii) CBAPBQ.
21. Prove that the edge set of every closed walk can be partitioned into pairwise edge-disjoint
circuits.
22. Show that in a graph with n vertices, the length of a path cannot exceed n – 1 and the length of
a circuit cannot exceed n.
23. Prove that if u is an odd vertex in a graph G then there must be a path in G from u to another odd
vertex v in G.
24. In a graph G, let P1 and P2 be two different paths between two given vertices. Prove that G has
a circuit in it.
25. Suppose G1 and G2 are isomorphic. Prove that if G1 is connected then G2 is also connected.
26. Prove that any two simple connected graphs with n vertices, all of degree two, are isomorphic.
27. Show that if G is a connected graph in which every vertex has degree either 1 or 0 then G is
either a path or a cycle.
28. Let G be a graph with 15 vertices and 4 components. Prove that atleast one component of G has
atleast 4 vertices.
29. If G is a simple graph with n vertices and k components, prove that G has atleast n – k number
of edges.
30. Prove that a connected graph of order n contains exactly one circuit if and only if its size is also n.
31. Let G be a simple graph. Show that if G is not connected then its complement G is connected.
32. Prove that if a connected graph G is decomposed into two subgraphs H1 and H2, there must be
atleast one vertex common to H1 and H2.
INTRODUCTION TO GRAPH THEORY 105
33. Prove that a connected graph is semi-Eulerian if and only if it has exactly zero or two vertices of
odd degree.
34. Prove that the Petersen graph is neither Eulerian nor semi-Eulerian.
35. Show that the following graph is not Eulerian :
1
37. Show that the complete graph Kn contains (n – 1) ! different Hamiltonian circuits.
2
38. Prove that, if G is a bipartite graph with an odd number of vertices then G is non-Hamiltonian.
( n − 1)
39. If the degree of each vertex of a simple graph is atleast , where n is the number of
2
vertices, show that the graph has a Hamiltonian path.
40. Show that the following graphs are Hamiltonian but not Eulerian.
42. Solve the travelling salesman problem for the weighted graph shown below :
Answers 1.1
1. (i) 16 (ii) 13 2. 8 3. (i) Not isomorphic (ii) Not isomorphic
7. (i) There are 5 vertices and 8 edges ; vertices P and T have degree 3, vertices Q and S have
degree 4, and vertex R has degree 2.
(ii)There are 6 vertices and 5 edges ; vertices A, B, E and F have degree 1 and vertices C and D
have degree 3.
8. (i) Each carbon atom vertex has degree 4 and each hydrogen atom vertex has degree 1.
(ii) The graphs are as follows :
9. V(G) = {u, v, w, x, y, z}, E(G) = {ux, uy, uz, vx, vy, vz, wx, wy, wz} ;
V(G) = {l, m, n, p, q, r}, E(G) = {lp, lq, lr, mp, mq, mr, np, nq, nr}.
12. (i) We can label the vertices as follows :
(ii) In the first graph, no vertices of degree 2 are adjacent, in the second graph they are adjacent
in pairs, since isomorphism preserves adjacency of vertices, the graphs are not isomorphic.
INTRODUCTION TO GRAPH THEORY 107
13. (i) There are 6 vertices and 5 edges ; vertices A, B, Q, R are pendant vertices and vertices C and
P have degree 3.
(ii) There are 5 vertices and 7 edges ; vertices P and Q have degree 2, S and T have degree 3 and
Q has degree 4.
14. (i) This is a simple graph with four vertices and five edges. Vertices A and B are of degree 3
and vertices P, Q are of degree 2.
(ii) This is a general graph with four vertices and six edges, of which two are self-loops. The
vertices A and Q are of degree 2, and B and P are of degree 4.
(iii) This is a multigraph with four vertices and five edges. There are parallel edges joining A
and P. The degree of A is 4, degree of P is 3, degree of B is 2 and Q is a pendant vertex.
18. Yes 19. (i) No (ii) Yes (iii) No.
20. (i) Circuit (ii) Path (iii) Open walk which is not a path.
35. Starting with any vertex, it is not possible to return to that vertex without traversing the edge
RA twice.
36. The graph contains an Euler line : PAQBRQP.
42. Circuit of least weight : ADBCA ; least total weight 23.
CHAPTER
Planar Graphs
INTRODUCTION
In this section we will study the question of whether a graph can be drawn in the plane without
edges crossing. In particular, we will answer the houses-and-utilities problem. There are always many
ways to represent a graph. When is it possible to find atleast one way to represent this graph in a plane
without any edges crossing. Consider the problem of joining three houses to each of three separate
utilities, as shown in figure below. Is it possible to join these houses and utilities so that none of the
connections cross ? This problem can be modeled using the complete bipartite graph K3, 3. The original
question can be rephrased as : can K3, 3 be drawn in the plane so that no two of its edges cross ?
108
PLANAR GRAPHS 109
It can be represented by means of geometric figure as shown below. It is true that graph can be
represented by means of such configuration.
Fig. 2.3.
A drawing of a geometric representation of a graph on any surface such that no edges intersect is
called embedding.
Note that if a graph G has been drawn with crossing edges, this does not mean that G is non
planar, there may be another way to draw the graph without crossovers. Thus to declare that a graph G
is non planar. We have to show that all possible geometric representations of G none can be embedded
in a plane.
Equivalently, a graph G is planar is there if there exists a graph isomorphic to G that is embedded
in a plane, otherwise G is non planar.
For example, the graph in Figure 2.4(a) is apparently non planar. However, the graph can be
redrawn as shown in Figure (2.4)(b) so that edges don’t cross, it is a planar graph, though its appearance
is non coplanar.
110 GRAPH THEORY WITH APPLICATIONS
Fig. 2.4.
Fig. 2.5.
Observations
(i) Both are regular graphs
(ii) Both are non-planar graphs
(iii) Removal of one vertex or one edge makes the graph planar
(iv) (Kuratowski’s) first graph is non-planar graph with smallest number of vertices and
(Kuratowski’s) second graph is non-planar graph with smallest number of edges. Thus
both are simplest non-planar graphs.
The first and second graphs of Kuratowski are represented as K5 and K3, 3. The letter K
being for Kuratowski (a polish mathematician).
Fig. 2.6. Two homeomorphic graphs obtained from G by adding vertices to edges.
In Figure 2.7, we show two homeomorphic graphs, each obtained from K5 by adding vertices to
edges of K5 (In each case, the vertices of K5 are shown with solid dots).
2.5 REGION
A plane representation of a graph divides the plane into regions (also called windows, faces, or
meshes) as shown in figure below. A region is characterized by the set of edges (or the set of vertices)
forming its boundary.
Note that a region is not defined in a non-planar graph or even in a planar graph not embedded in
a plane.
For example, the geometric graph in figure below does not have regions.
112 GRAPH THEORY WITH APPLICATIONS
Fig. 2.9.
Fig. 2.10.
Fig. 2.11.
For any cycle Cp, i(Cp) = 0.
PLANAR GRAPHS 113
Fig. 2.13. K5 and K3, 3 are non planar graphs with one crossing.
Fig. 2.16.
Problem 2.2. Prove that a graph which contains a triangle cannot be bipartite.
Solution. At least two of three vertices must lie in one of the bipartite sets, since these two are
joined by two are joined by edge, the graph can not be bipartite.
Problem 2.3. Determine whether or not each of the graphs is bipartite. In each case, give the
bipartition sets or explain why the graph is not bipartite.
116 GRAPH THEORY WITH APPLICATIONS
Solution. (i) The graph is not bipartite because it contains triangles (in fact two triangles).
(ii) This is bipartite and the bipartite sets are {1, 3, 7, 9} and {2, 4, 5, 6, 8}
(iii) This is bipartite and the bipartite sets are {1, 3, 5, 7} and {2, 4, 6, 8}.
Induction step :
We add one new edge K to G to form a connected supergraph of G which is denoted by G + K.
There are following three possibilities.
(i) K is a loop, in which case a new region bounded by the loop is created but the number of
vertices remains unchanged.
(ii) K joins two distinct vertices of G, in which case one of the region of G is split into two, so
that number of regions is increased by 1, but the number of vertices remains unchanged.
(iii) K is incident with only one vertex of G on which case another vertex must be added,
increasing the number of vertices by one, but leaving the number of regions unchanged.
If let n′, e′ and r′ denote the number of vertices, edges and regions in G and n, e and r denote the
same in G + K. Then
In case (i) n – e + r = n′ – (e′ + 1) + (r′ + 1) = n′ – e′ + r′.
In case (ii) n – e + r = n′ – (e′ + 1) + (r′ + 1) = n′ – e′ + r′
In case (iii) n – e + r = (n′ + 1) – (e′ + 1) + r′ = n′ – e′ + r′.
But by our induction hypothesis, n′ – e′ + r′ = 2.
Thus in each case n – e + r = 2.
Now any plane connected graph with e edges is of the form G + K, for some connected graph G
with e – 1 edges and a new edge K.
Hence by mathematical induction the formula is true for all plane graphs.
Corollary (1)
If a plane graph has K components then n – e + r = K + 1.
The result follows on applying Euler’s formula to each component separately, remembering not
to count the infinite region more than once.
Corollary (2)
If G is connected simple planar graph with n (≥ 3) vertices and e edges, then e ≤ 3n – 6.
Proof. Each region is bounded by atleast three edges (since the graphs discussed here are
simple graphs, no multiple edges that could produce regions of degree 2 or loops that could produce
regions of degree 1, are permitted) and edges belong to exactly two regions.
2e ≥ 3r
If we combine this with Euler’s formula, n – e + r = 2, we get 3r = 6 – 3n + 3e ≤ 2e which is
equivalent to e ≤ 3n – 6.
Corollary (3)
If G is connected simple planar graph with n (≥ 3) vertices and e edges and no circuits of length
3, then e ≤ 2n – 4.
Proof. If the graph is planar, then the degree of each region is atleast 4.
Hence the total number of edges around all the regions is atleast 4r.
Since every edge borders two regions, the total number of edges around all the regions is 2e, so
we established that 2e ≥ 4r, which is equivalent to 2r ≤ e.
If we combine this with Euler’s formula n – e + r = 2, we get
2r = 4 – 2n + 2e ≤ e
which is equivalent to e ≤ 2n – 4.
118 GRAPH THEORY WITH APPLICATIONS
It is not possible to draw this graph on a 2-dimentional plane without false crossing of edges.
Whatever way we adopt, at least one of the edges, say e, must cross the other for graph to be completed.
Hence K5 is not a planar graph.
For any n > 5, Kn must contain a subgraph isomorphic to K5.
Since K5 is not planar, any graph containing K5 as its one of the subgraph cannot be planar.
Problem 2.8. Show that K3, 3 is a non-planar graph.
Solution. Graph K3, 3 is shown in the Figure (2.20) below.
Fig. 2.20.
It is not possible to draw this graph such that there is no false crossing of edges. This is classic
problem of designing direct lanes without intersection between any two houses, for three houses on
each side of a road.
In this graph there exists an edge, say e, that cannot be drawn without crossing another edge.
Hence K3, 3 is a non-planar graph.
It is easy to determine that the chromatic number of this graph is 2.
Theorem 2.2. Sum of the degrees of all regions in a map is equal to twice the number of edges
in the corresponding graph.
Proof. As discussed earlier, a map can be drawn as a graph, where regions of the map is
denoted by vertices in the graph and adjoining regions are connected by edges.
Degree of a region in a map is defined as the number of adjoining region.
Thus, degree of a region in a map is equal to the degree of the corresponding vertices in the graph.
We know that the sum of the degrees of all vertices in a graph is equal to the twice the number of
edges in the graph.
Therefore, we have 2e = Σdeg(Ri).
Problem 2.9. Prove that K4 and K2, 2 are planar.
Solution. In K4, we have v = 4 and e = 6
Obviously, 6 ≤ 3 * 4 – 6 = 6
Thus this relation is satisfied for K4.
For K2, 2, we have v = 4 and e = 4.
Again in this case, the relation e ≤ 3v – 6
i.e., 4 ≤ 3 * 4 – 6 = 6 is satisfied.
Hence both K4 and K2, 2 are planar.
120 GRAPH THEORY WITH APPLICATIONS
Problem 2.10. Determine the number of vertices, the number of edges, and the number of
region in the graphs shown below. Then show that your answer satisfy Euler’s theorem for connected
planar graphs.
Fig. 2.21.
Problem 2.12. Determine whether the graph G shown in Figure (2.22), is planar.
Solution. G has a subgraph H homeomorphic to K5, H is obtained by deleting h, j and K and all
edges incident with these vertices. H is homeomorphic to K5 since it can be obtained from K5 (with
vertices a, b, c, g and i) by a sequence of elementary subdivisions, adding the vertices d, e and f.
Hence G is non planar.
Theorem 2.3. KURATOWSKI’S
K3, 3 and K5 are non-planar.
Proof. Suppose first that K3, 3 is planar.
Since K3, 3 has a cycle u → v → w → x → y → z → u of length 6, any plane drawing must contain
this cycle drawn in the form of hexagon, as in Figure (2.23).
Now the edge wz must lie either wholly inside the hexagon or wholly outside it. We deal with the
case in which wz lies inside the hexagon, the other case is similar.
Since the edge ux must not cross the edge wz, it must lie outside the hexagon ; the situation is now
as in Figure (2.24).
It is then impossible to draw the edge vy, as it would cross either ux or wz.
This gives the required contradiction.
Now suppose that K5 is planar.
Since K5 has a cycle v → w → x → y → z → v of length 5, any plane drawing must contain this
cycle drawn in the form of a pentagon as in Figure (2.25).
122 GRAPH THEORY WITH APPLICATIONS
Now the edge wz must lie either wholly inside the pentagon or wholly outside it.
We deal with the case in which wz lies inside the pentagon, the other case is similar.
Since the edges vx and vy do not cross the edge wz, they must both lie outside the pentagon, the
situation is now as in Figure (2.26)
But the edge xz cannot cross the edge vy and so must lie inside the pentagon.
Similarly the edge wy must lie inside the pentagon, and the edges wy and xz must then cross.
This gives the required contradiction.
Theorem 2.4. Let G be a simple connected planar (p, q)-graph having at least K edges in a
boundary of each region. Then (k – 2)q ≤ k(p – 2).
Proof : Every edge on the boundary of G, lies in the boundaries of exactly two regions of G.
Further G may have some pendent edges which do not lie in a boundary of any region of G.
Thus, sum of lengths of all boundaries of G is less than twice the number of edges of G.
i.e., kr ≤ 2q ...(1)
But, G is a connected graph, therefore by Euler’s formula
We have r=2+q–p ...(2)
Substituting (2) in (1), we get
k(2 + q – p) ≤ 2q
⇒ (k – 2)q ≤ k(p – 2).
Problem 2.13. Suppose G is a graph with 1000 vertices and 3000 edges. Is G planar ?
Solution. A graph G is said to be planar if it satisfies the inequality. i.e., q ≤ 3p – 6
Here P = 1000, q = 3000 then
3000 ≤ 3p – 6
i.e., 3000 ≤ 3000 – 6
or 3000 ≤ 2994 which is impossible.
Hence the given graph is not a planar.
Problem 2.14. A connected graph has nine vertices having degrees 2, 2, 2, 3, 3, 3, 4, 4 and 5.
How many edges are there ? How many faces are there ?
PLANAR GRAPHS 123
i.e., 2q = 2 + 2 + 2 + 3 + 3 + 3 + 4 + 4 + 5 = 28
⇒ q = 24
Now by Euler’s formula p – q + r = 2 or 9 – 14 + r = 2 ⇒ r=7
Hence there are 14 edges and 7 regions in the graph.
Problem 2.15. Find a graph G with degree sequence (4, 4, 3, 3, 3, 3) such that (i) G is planar
(ii) G is non planar.
Solution. For (i) we have drawn a planar graph with six vertices with degree sequence 4, 4, 3, 3,
3, 3 as shown below.
i.e., 2q = 4 + 4 + 3 + 3 + 3 + 3
2q = 20
⇒ q = 10
Hence the graph with P = 6, is said to be planar if it satisfies the inequality.
i.e., q = 3p – 6
i.e., 10 ≤ 3 × 6 – 6
or 10 ≤ 18 – 6
10 ≤ 12
Hence it is not possible to draw a non planar graph with given degree sequence 4, 4, 3, 3, 3, 3.
Problem 2.16. Determine the number of regions defined by a connected planar graph with 6
vertices and 10 edges. Draw a simple and a non-simple graph.
Solution. Given p = 6, q = 10
Hence by Euler’s formula for a planar graph
p–q+r=2
6 – 10 + r = 2 ⇒ r=6
124 GRAPH THEORY WITH APPLICATIONS
Fig. 2.27.
Problem 2.17. Draw all planar graphs with five vertices, which are not isomorphic to each
other.
Solution. We have drawn all planar graphs with 5 vertices as shown below.
Problem 2.18. How many edges must a planar graph have if it has 7 regions and 5 vertices.
Draw one such graph.
Solution. According to Euler’s formula, in a planar graph G.
p–q+r=2
Here p = 5, r = 7, q = ?
Since the graph is planar, therefore 5 – q + 7 = 2 ⇒ q = 10.
Hence the given graph must have 10-edges.
Here we have drawn more than one graph as shown below.
PLANAR GRAPHS 125
Problem 2.19. By drawing the graph, show that the following graphs are planar graphs.
Fig. 2.28.
Solution. The graphs shown in Figure (2.28)(a, b) can be redrawn as planar graphs as follows
see Figure (2.29) (a, b).
Fig. 2.29.
Fig. 2.30.
Fig. 2.31.
Solution.
The problem can be represented by a graph shown in Figure the conduits are shown as edges
while the houses and utility supply centers are vertices.
The above graph is a complete bipartite graph K3, 3 which is a non planar graph. Hence it is not
possible to draw without crossover. Therefore it is not possible to make the connection without any
crossover of the conduits.
Problem 2.23. Is the Petersen graph, shown in Figure below, planar ?
Solution. The subgraph H of the Petersen graph obtained by deleting b and the three edges that
have b as an end point, shown in Figure (2.33) below, is homeomorphic to K3, 3 with vertex sets {f, d, j}
Fig. 2.33.
and {e, i, h}, since it can be obtained by a sequence of elementary subdivisions, deleting {d, h} and
adding {c, h} and {c, d}, deleting {e, f} and adding {a, e} and {a, f} and deleting {i, j} and adding {g, i}
and {g, j}.
Hence the Petersen graph is not planar.