Lecture Notes 1 - 4
Lecture Notes 1 - 4
Lecture Notes 1 - 4
Introduction to Graphs
Graph Theory is a well-known area of discrete mathematics which deals with the study of
graphs. A graph may be considered as a mathematical structure that is used for modelling the
pairwise relations between objects.
Graph Theory has many theoretical developments and applications not only to different
branches of mathematics, but also to various other fields of basic sciences, technology, social
sciences, computer science etc. Graphs are widely used as efficient tools to model many
types of practical and real-world problems in physical, biological, social and information
systems. Graph-theoretical models and methods are based on mathematical combinatorics
and related fields.
Usually, the graph is denoted as G = (V, E). The vertex set and edge set of a graph G are
4 Chapter 1. Introduction to Graphs
v4 v3
e6
e3
e5 e4 e2
e1
e7
v1 v2
If two vertices u and v are the (two) end points of an edge e, then we represent this edge
by uv or vu. If e = uv is an edge of a graph G, then we say that u and v are adjacent vertices
in G and that e joins u and v. In such cases, we also say that u and v are adjacent to each
other.
Given an edge e = uv, the vertex u and the edge e are said to be incident with each other
and so are v and e. Two edges ei and e j are said to be adjacent edges if they are incident with
a common vertex.
Definition 1.1.2 — Order and Size of a Graph. The order of a graph G, denoted by
ν(G), is the number of its vertices and the size of G, denoted by ε(G), is the number of its
edges.
A graph with p-vertices and q-edges is called a (p, q)-graph. The (1, 0)-graph is called a
trivial graph. That is, a trivial graph is a graph with a single vertex. A graph without edges is
called an empty graph or a null graph. The following figure illustrates a null graph of order 5.
v5
v3
v4
v1 v2
Definition 1.1.3 — Finite and Infinite Graphs. A graph with a finite number of vertices
as well as a finite number of edges is called a finite graph. Otherwise, it is an infinite
graph.
Definition 1.1.4 — Self-loop. An edge of a graph that joins a node to itself is called loop
or a self-loop. That is, a loop is an edge uv, where u = v.
Lecture Notes on Graph Theory 5
Definition 1.1.5 — Parallel Edges. The edges connecting the same pair of vertices are
called multiple edges or parallel edges.
In Figure 1.2, the edges e6 and e7 are loops and the edges e4 and e5 are parallel edges.
Definition 1.1.6 — Simple Graphs and Multigraphs. A graph G which does not have
loops or parallel edges is called a simple graph. A graph which is not simple is generally
called a multigraph.
Definition 1.2.2 — Isolated vertex. A vertex having no incident edge is called an isolated
vertex. In other words, isolated vertices are those with zero degree.
Definition 1.2.4 — Internal vertex. A vertex, which is neither a pendent vertex nor an
isolated vertex, is called an internal vertex or an intermediate vertex.
Definition 1.2.5 — Minimum and Maximum Degree of a Graph. The maximum degree
of a graph G, denoted by ∆(G), is defined to be ∆(G) = maxd(v) : v ∈ V (G). Similarly,
the minimum degree of a graph G, denoted by δ (G), is defined to be δ (G) = mind(v) :
v ∈ V (G). Note that for any vertex v in G, we have δ (G) ≤ d(v) ≤ ∆(G).
The following theorem is a relation between the sum of degrees of vertices in a graph G
and the size of G.
6 Chapter 1. Introduction to Graphs
Theorem 1.2.1 In a graph G, the sum of the degrees of the vertices is equal to twice the
number of edges. That is, ∑ d(v) = 2ε.
v∈V (G)
Proof. Let S = ∑ d(v). Notice that in counting S, we count each edge exactly twice.
v∈V (G)
That is, every edge contributes degree 1 each to both of its end vertices and a loop provides
degree 2 to the vertex it incidents with. Hence 2 to the sum of degrees of vertices in G. Thus,
S = 2E = 2ε.
The above theorem is usually called the first theorem on graph theory. It is also known as
the hand shaking lemma. The following two theorems are immediate consequences of the
above theorem.
2E
Theorem 1.2.2 For any graph G, δ (G) ≤ V ≤ ∆(G).
2E ∑ d(v)
Proof. By Theorem-1, we have 2ε = ∑ d(v). Therefore, note that V = V , the
v∈V (G)
average degree of G. Therefore, δ (G) ≤ 2E
V ≤ ∆(G).
Theorem 1.2.3 For any graph G, the number of odd degree vertices is always even.
Proof. Let S = ∑ d(v). By Theorem 1.2.1, we have S = 2ε and hence S is always even.
v∈V (G)
Let V1 be the set of all odd degree vertices and V2 be the set of all even degree vertices in G.
Now, let S1 = ∑ d(v) and S2 = ∑ d(v). Note that S2 , being the sum of even integers, is
v∈V1 v∈V2
also an even integer.
We also note that S = S1 +S2 (since V1 and V2 are disjoint sets and V1 V2 = V ). Therefore,
S1 = S − S2 . Being the difference between two even integers, S1 is also an even integer. Since
V1 is a set of odd degree vertices, S1 is even only when the number of elements in V1 is even.
That is, the number of odd degree vertices in G is even, completing the proof.
Definition 1.2.6 — Degree Sequence. The degree sequence of a graph of order n is the
n-term sequence (usually written in descending order) of the vertex degrees. In Figure-1,
δ (G) = 2, ∆(G) = 5 and the degree sequence of G is (5, 4, 3, 2).
v10
v9
v11
v8 v12
v7 v1
v6 v2
v5 v3
v4
1.2.1 Neighbourhoods
Definition 1.2.8 — Neighbourhood of a Vertex. The neighbourhood (or open neigh-
bourhood) of a vertex v, denoted by N(v), is the set of vertices adjacent to v. That is,
N(v) = x ∈ V : vx ∈ E. The closed neighbourhood of a vertex v, denoted by N[v], is
simply the set N(v) v.
Then, for any vertex v in a graph G, we have dG (v) = N(v). A special case is a loop
that connects a vertex to itself; if such an edge exists, the vertex is said to belong to its own
neighbourhood.
Given a set S of vertices, we define the neighbourhood of S, denoted by N(S), to be the
union of the neighbourhoods of the vertices in S. Similarly, the closed neighbourhood of S,
denoted by N[S], is defined to be S N(S).
Neighbourhoods are widely used to represent graphs in computer algorithms, in terms
of the adjacency list and adjacency matrix representations. Neighbourhoods are also used
in the clustering coefficient of graphs, which is a measure of the average density of its
8 Chapter 1. Introduction to Graphs
In the above figure, the second graph is a spanning subgraph of the first graph, while the
third graph is a subgraph of the first graph.
Figure 1.6 depicts an induced subgraph and an edge induced subgraph of a given graph.
d d
d
c e c
e c
a a b
a b
(b) The induced subgraph (c) The induced subgraph
(a) The graph G G[a, c, d] G[ab, cd, ce, de]
on n vertices is denoted by Kn .
n(n−1)
Problem 1.4 Show that a complete graph Kn has edges.
2
Solution: Note that any two vertices in a complete graph are adjacent to each other. Hence,
the number of edges in a complete graph is equal to the number of distinct pairs of vertices in
it. Therefore, the number of such pairs of vertices in Kn is n2 = n(n−1)
2 . That is, the number
of edges in Kn is n(n−1)
2 .
We can write an alternate solution to this problem as follows:
Solution: Note that every vertex in a complete graph Kn is adjacent to all other n − 1
vertices in Kn . That is, d(v) = n − 1 for all vertices in Kn . Since Kn has n vertices, we
have ∑ lim d(v) = n(n − 1). Therefore, by the first theorem on graph theory, we have
v∈V (Kn )
2E(Kn ) = n(n − 1). That is, the number of edges in Kn is n(n−1)
2 .
n(n−1)
Problem 1.5 Show that the size of every graph of order n is at most 2 .
Solution: Note that every graph on n vertices is a spanning subgraph of the complete graph
Kn . Therefore, E(G) ⊆ E(Kn ). That is, E(G) ≤ E(Kn ) = n(n−1)2 . That is, any graph of
n(n−1)
order n can have at most 2 edges.
the same partition can be adjacent. Here, the pair (V1 ,V2 ) is called the bipartition of G.
Figure 1.8 gives some examples of bipartite graphs. In all these graphs, the white vertices
belong to the same partition, say V1 and the black vertices belong to the other partition, say
V2 .
The following graphs are also some examples of complete bipartite graphs. In these examples
also, the vertices in the same partition have the same colour.
Problem 1.6 Show that a complete bipartite graph Ka,b has ab vertices.
Solution: Let Ka,b be a complete bipartite graph with bipartition (X,Y ). Note that all
a vertices in X have the same degree b and all b vertices in Y have the same degree a.
Therefore, ∑ d(v) = ab + ba = 2ab. By the first theorem on graph theory, we have
v∈V (Ka,b )
2E(Ka,b ) = 2ab. That is, E(Ka,b ) = ab.
Theorem 1.4.1 The complete graph Kn can be expressed as the union of k bipartite graphs
if and only if n ≤ 2k .
Proof. First assume that Kn can be expressed as the union of k bipartite graphs. We use the
method of induction on k. First let k = 1. Note that Kn contains triangle K3 (and K3 is not
bipartite) except for n ≤ 2. Therefore, the result is true for k = 1.
Lecture Notes on Graph Theory 11
Now assume that k > 1 and the result holds for all complete graphs having fewer than
k complete bipartite components. Now assume that Kn = G1 G2 , Gk , where each
Gi is bipartite. Partition the vertex set V into two components such that the graph Gk has
no edge within X or within Y . The union of other k − 1 bipartite subgraphs must cover the
complete subgraphs induced by X and Y . Then, by Induction hypothesis, we have X ≤ 2k−1
and Y X ≤ 2k−1 . Therefore, n = X + Y ≤ 2k−1 + 2k−1 = 2k . Therefore, the necessary part
follows by induction.
The degree of all vertices in each partition of a complete bipartite graph is the same.
Hence, the complete bipartite graphs are also called biregular graphs. Note that, for the
complete bipartite graph KX,Y , we have dX (v) = Y and dY (v) = X.
u4
u5
v5 v4
u3
v3
u1
v1 v2 u2
(a) G1 . (b) G2 .
In the above graphs, we can define an isomorphism f from the first graph to the second
graph such that f (v1 ) = u1 , f (v2 ) = u3 , f (v3 ) = u5 , f (v4 ) = u2 and f (v5 ) = u4 . Hence, these
two graphs are isomorphic.
1.6 Exercises
1. Show that every loop-less graph G has a bipartite subgraph with at least ε2 edges.
2. Verify whether graph isomorphism is an equivalence relation?
3. For k > 0, show that a k-regular bipartite graph has the same number of vertices in
each of its partite sets.
4. Show that every simple graph on n vertices subgraph of Kn .
5. Show that every subgraph of a bipartite graph is bipartite.
6. Verify whether the integer sequences (7, 6, 5, 4, 3, 3, 2) and (6, 6, 5, 4, 3, 3, 1) are graph-
ical.
7. Show that if G is simple and connected but not complete, then G has three vertices u, v
and w such that uv, vw ∈ E(G), but uw ∈ E.
8. Show that every induced subgraph of a complete graph Kn is also a complete subgraph.
9. If G is an r-regular graph, then show that r divides the size of G.
10. Show that every subgraph of a bipartite graph is bipartite.
11. If G is an r-regular graph and r is odd, then show that εr is an even integer.
12. Let G be a graph in which there is no pair of adjacent edges. What can you say about
the degree of the vertices in G?
13. Check whether the following pairs of graphs are isomorphic? Justify your answer.
(a) G (b) H
Lecture Notes on Graph Theory 13
(a) G (b) H
(a) G (b) H
(a) G (b) H
(a) G (b) H
14. Let G be a graph with n vertices and e edges and let m be the smallest positive integer
such that m ≥ 2e n . Prove that G has a vertex of degree at least m.
15. Prove that it is impossible to have a group of nine people at a party such that each one
knows exactly five of the others in the group.
16. Let G be a graph with n vertices, t of which have degree k and the others have degree
k + 1. Prove that t = (k + 1)n − 2e, where e is the number of edges in G.
17. Let G be a k-regular graph, where k is an odd number. Prove that the number of edges
in G is a multiple of k.
18. Let G be a graph with n vertices and exactly n − 1 edges. Prove that G has either a
14 Chapter 1. Introduction to Graphs
We have already seen that the notion of subgraphs can be defined for any graphs as similar to
the definition of subsets to sets under consideration. Similar to the definitions of basic set
operations, we can define the corresponding basic operations for graphs also. In addition to
these fundamental graph operations, there are some other new and useful operations are also
defined on graphs. In this chapter, we discuss some basic graph operation.
Definition 2.1.3 — Ringsum of Graphs. The ringsum of two graphs G1 and G2 is another
graph G, written by G = G1 ⊕ G2 , with vertex set V (G1 ) V (G2 ) and the edge set
E(G1 ) ⊕ E(G2 ), where ⊕ is the symmetric difference (XOR Operation) of two sets.
Figure 2.1 illustrates the union, intersection and ringsum of two given graphs.
16 Chapter 2. Graphs and Their Operations
v1
e7 v1
e5 e1 v6
e10 e9 e1
v5 v2
e6 v5 v2
e6
e8
e4 e2
v4 v3
e3 v4
(a) G1 (b) G2
e7
v6 v1
e10 e9 e1
e5
v5 v2
e6 v1
e8
e4 e2
v4 v3
e3 v5 v2
(c) G1 G2 (d) G1 G2
e7
v6 v1
e10 e9
e5
v5 v2
e8
e4 e2
v4 v3
e3
(e) G1 ⊕ G2
R
1. The union, intersection and ringsum operations of graphs are commutative. That
is, G1 G2 = G2 G1 , G1 G2 = G2 G1 and G1 ⊕ G2 = G2 ⊕ G1 .
2. If G1 and G2 are edge-disjoint, then G1 G2 is a null graph, and G1 ⊕ G2 =
G1 G2 .
3. If G1 and G2 are vertex-disjoint, then G1 ⊕ G2 is empty.
4. For any graph G, G G = G G and G ⊕ G is a null graph.
v1 v1
v5 v2 v5 v2
v4 v3 v4 v3
(a) G (b) Ḡ
v3 v4 v3 v4
v2 v5 v2 v5
v1 v1
(a) Bull graph G. (b) Ḡ.
(a) G2 (b) G2 .
Problem 2.1 For any self-complementary graph G of order n, show that n ≡ 0, 1(mod 4).
Solution: For self-complementary graphs, we have
(i) V (G) = V (Ḡ);
(ii) E(G) + E(Ḡ) = n(n−1)
2 ;
(iii) E(G) = E(Ḡ).
Therefore, E(G) = E(Ḡ) = n(n−1)
4 . This implies, 4 divides either n or n − 1. That is, for
self-complementary graphs of order n, we have n ≡ 0, 1(mod 4).
(Note that we say a ≡ b(mod n), which is read as “a is congruent to b modulo n”, if a − b
is completely divisible by n).
In other words, the join of two graphs G and H is defined as the graph in which every
edge of the first graph is adjacent to all vertices of the second graph.
Figure 2.5 illustrates the join of two graphs P3 and P4 and Figure 2.6 illustrates the join of
two graphs C5 and P2 .
Figure 2.7 illustrates the edge deletion and the vertex deletion of a graph G.
e
v v
Definition 2.4.3 — Fusion of Vertices. A pair of vertices u and v are said to be fused (or
merged or identified) together if the two vertices are together replaced by a single vertex
w such that every edge incident with either u or v is incident with the new vertex w (see
Figure 2.8).
Note that the fusion of two vertices does not alter the number of edges, but reduces the
number of vertices by 1.
t z t z
w
u v
x y x y
(a) G (b) G − e
t z t z
w
u v
x y x y
(a) G (b) G ◦ uv
(a) G (b) G
In Figure 2.11, the second and third graphs are homeomorphic, as they are obtained by
subdividing the edges of the first graph in the figure.
u w v u v
(a) (b) G
2.6 Exercises
1. Show that the complement of a complete bipartite graph is the disjoint union of two
complete graphs.
2. The isomorphic image of a graph walk W is a walk of the same length.
3. For any graphs G and H, the ringsum G ⊕ H is empty if and only if E(G) = E(H).
4. Show that the ringsum of two edge-disjoint collections of circuits is a collection of
circuits.
5. For any graph G with six vertices, then G or its complement Ḡ contains a triangle.
22 Chapter 2. Graphs and Their Operations
6. Every graph G contains a bipartite spanning subgraph whose size is at least half the
size of G.
7. Any graph G has a regular supergraph H of degree ∆(G) such that G is an induced
subgraph of H.
8. how that if a self-complementary graph contains pendent vertex, then it must have at
least another pendent vertex.
9. Draw all the non-isomorphic self complementary graphs on four vertices.
2
10. Prove that a graph with n vertices (n > 2) cannot be bipartite if it has more than n4
edges.
11. Verify whether the join of two bipartite graphs is bipartite. Justify your answer.
12. What is the order and size of the join of two graphs?
13. Does the join of two graphs hold commutativity? Illustrate with examples.