Module-4, Graph Theory1
Module-4, Graph Theory1
GRAPH THEORY
CONTENT
Prerequisite (undirected graphs)
Definitions and Examples,
Graph Isomorphism
Sub graphs
Complements
Vertex degree: Trails and Circuits
Euler Trails and Circuits
Paths and cycle
Hamilton Paths and Cycles
Planar Graphs
Graph Colouring
Chromatic Polynomials
Directed Graphs
The diagram (Fig 1.1) consists of four vertices A, B, C,
B D and three edges AB, CD, CA with directions attached to
A
them, the directions being indicated by arrows.
Similarly, the edge CD is from C to D cannot be written as DC, and the edge CA
from C to A cannot be written as AC. Thus, here, the edges AB, CD, CA are directed
edges
DISCRETE MATHEMATICS & GRAPH THEORY 3/29/2023
Prerequisite
CONTD…
The directed edges AB , CD and CA may be represented by the ordered pair (A, B), (C, D) and
(C,A) respectively.
The diagram in Fig 1.1 consists of a nonempty set of vertices, namely 𝐴, 𝐵, 𝐶, 𝐷 , and set
of directed pairs of vertices taken from this set, namely
(𝐴, 𝐵), (𝐶, 𝐷), (𝐶, 𝐴) . Such a diagram is called diagram of a directed graph (or a diagraph).
Definition: A directed graph (or diagraph) is a pair (V, E), where V is a nonempty set
and E is a set of ordered pairs of elements taken from the setV.
CONTD…
For directed graph (V, E), the elements of V are called vertices (points or nodes) and the
elements od E are called directed edges.
The setV is called the vertex set and the set E is called the directed edge set.
CONTD…
A B
Whether Fig 1.1 and Fig 1.2 are same?
Fig 1.1 and Fig 1.2 are not same, although both of these
two directed graph have the same vertex set, their
C D
Fig 1.1 directed edges sets are different.
A B
CONTD…
A B Every directed edge of a diagraph is determined by two
vertices --- a vertex from which it begins and a vertex at which it
ends.
If AB is a directed edge of a diagraph D. A- Initial vertex and B-
C D
Fig 1.1 terminal vertex of [Link] is incident out of A and incident into B.
The directed edge shown in Fig 1.4 is directed loop which
begins and ends at the vertex A.
A BA B Two directed edges having the same initial vertex and the
A same terminal vertex are called parallel directed edges fig
1.5 (a).
(a) (b)
Fig 1.4 Two or more directed edges having the same initial vertex
and the same terminal vertex are called multiple directed
Fig 1.5 edges fig 1.5 (a).
DISCRETE MATHEMATICS & GRAPH THEORY 3/29/2023
Prerequisite
CONTD…
Isolated Vertex: (𝒗𝟒 ): A vertex of diagraph which is neither an initial
vertex nor a terminal vertex of any directed edge.
A non-isolated vertex which is not a terminal vertex for any directed edge is called source.
A non-isolated vertex which is not a initial vertex for any directed edge is called sink.
𝒗𝟏 𝒂𝒏𝒅𝒗𝟑 are sources. 𝒗𝟐 𝑖𝑠 𝑎 𝑠𝑖𝑛𝑘.
Examples
1. Find out the in degrees and out degrees of the vertices of the
diagraph shown in fig 1.8.
Graphs
A B Fig 1.1 is a directed graph and Fig 2.1 is a undirected Graph
(Graph).
Graph
According to the definition of a graph/diagraph, the vertex set in a graph/diagraph
has to be nonempty set but the edge set can be empty.
A
A
B C
(a) (b)
Fig 2.2
A graph containing no edges is called a null graph (Fig 2.2 (a)). A null graph with only
one vertex is called a trivial graph (Fig 2.2 (b)).
Graphs
Draw the graphs with four vertices A, B, C, D with AB, AC, AD, BC and CD.
B
A
A C
B C D
D
(a) (b)
Fig 2.3
The way one draws a diagram of a graph is basically immaterial. There can be more than one diagram for
the same [Link] they represent the same graph since each convey the same information.
A graph with a finite number of vertices and finite number of edges is called finite graph otherwise is
called infinite graph.
The both edges 𝑒5 , 𝑒6 have same end vertices 𝑣1 , 𝑣4 such edges are called parallel edges. 𝑒5 =
𝑣1 , 𝑣4 , 𝑒6 = 𝑣1 , 𝑣4 .
If in a graph there are two or more edges with the same end vertices, the edges are called
multiple edges.
DISCRETE MATHEMATICS & GRAPH THEORY 3/29/2023
Definition & Examples
Multigraph: A graph which contains multiple edges but no loops is called multigraphs.
General Graph: A graph which contains multiple edges or loops (or both) is called general graphs.
Fig 2.1 is a simple graph, Fig 2.4 is a general graph, Fig 2.5 is Multigraph graph
A B
A and C are not adjacent vertices and 𝑒1 and 𝑒3 are not adjacent
edges.
Fig 2.6
Complete Graph
Def: A simple graph of order ≥ 2 in which there is an edge between every pair of vertices is
called a complete graph. OR
A complete graph is a simple graph in which every pair of distinct vertices are adjacent.
A complete graph with 𝒏 ≥ 𝟐 vertices is denoted by 𝒌𝒏 .
Following are the complete graph with 2, 3,, 4 and 5 vertices are shown below
𝑲𝟓 is called the
Kuratowski’s first
graph
Bipartite graph
Def: Suppose a simple graph G is such that its vertex set V is the union of two mutually disjoint
nonempty sets 𝑉1 𝑎𝑛𝑑 𝑉2 which are such that each edges in G joins a vertex in 𝑉1 and a vertex 𝑉2 .
Then G is called a bipartite graph.
If E is the edge set of this graph, the graph is denoted by 𝐺 = (𝑉1 , 𝑉2 ; 𝐸), or 𝐺 = 𝐺(𝑉1 , 𝑉2 ; 𝐸).
The sets 𝑉1 𝑎𝑛𝑑 𝑉2 are called bipartites of the vertex setV.
𝑽 = 𝑨, 𝑩, 𝑪, 𝑷, 𝑸, 𝑹, 𝑺 , 𝑽𝟏 = 𝑨, 𝑩, 𝑪 , 𝑽𝟐 = 𝑷, 𝑸, 𝑹, 𝑺
𝑬 = 𝑨𝑷, 𝑨𝑸, 𝑨𝑹, 𝑩𝑹, 𝑪𝑸, 𝑪𝑺 .
(i) 𝑉1 𝑎𝑛𝑑 𝑉2 are disjoint.
(ii) Every edge in G is a join of a vertex in 𝑉1 and a vertex in 𝑉2 .
(iii) G contains no edge that joins two vertices both of which are in
𝑉1 𝑎𝑛𝑑 𝑉2 .
A complete bipartite graph 𝐺 = (𝑉1 , 𝑉2 ; 𝐸) in which the bipartites 𝑉1 𝑎𝑛𝑑 𝑉2 contain 𝑟 and 𝑠
vertices respectively, with 𝑟 ≤ 𝑠, is denoted by 𝐾𝑟,𝑠 .
𝐾𝑟,𝑠 has 𝑟 + 𝑠 vertices and 𝑟𝑠 edges; that is 𝐾𝑟,𝑠 is of order 𝑟 + 𝑠 and size 𝑟𝑠; it is therefore a
𝑟 + 𝑠, 𝑟𝑠 graph.
Example
1. Draw a diagram of the graph 𝑮 = 𝑮(𝑽, 𝑬) in each of the following cases.
(i) 𝑽 = 𝑨, 𝑩, 𝑪, 𝑫 , 𝑬 = 𝑨, 𝑩 , 𝑨, 𝑪 , 𝑨, 𝑫 , (𝑪, 𝑫)
(ii) 𝑽 = 𝒗𝟏 , 𝒗𝟐 , 𝒗𝟑 , 𝒗𝟒 , 𝒗𝟓 , 𝑬 = 𝒗𝟏 , 𝒗𝟐 , 𝒗𝟏 , 𝒗𝟑 , 𝒗𝟐 , 𝒗𝟑 , (𝒗𝟒 , 𝒗𝟓 )
(iii) 𝑽 = 𝑷, 𝑸, 𝑹, 𝑺, 𝑻 , 𝑬 = 𝑷, 𝑺 , 𝑸, 𝑹 , 𝑸, 𝑺
(iv) 𝑽 = 𝒗𝟏 , 𝒗𝟐 , 𝒗𝟑 , 𝒗𝟒 , 𝒗𝟓 , 𝒗𝟔 , 𝑬 =
𝒗𝟏 , 𝒗𝟒 , 𝒗𝟏 , 𝒗𝟔 , 𝒗𝟑 , 𝒗𝟐 , 𝒗𝟒 , 𝒗𝟔 , 𝒗𝟑 , 𝒗𝟓 , (𝒗𝟐 , 𝒗𝟓 )
Example
2. Let P, Q, R, S, T represent five cricket teams. Suppose that the teams P, Q, R have played one game with
each other, and the teams P, S,T have played one game with each other. Represent this in a graph.
Hence determine (i) the teams that have not played with each other (ii) the number of games played by
each team.
Solution: Let the team represents vertices and edge represents the playing. Then the graph represents the given situation is as
shown below.
There is no edge between Q and S, Q andT, R and S, R andT.
Therefore the teams Q and S, Q andT, R and S, R andT have not played together.
Example
3. Which of the following is a complete graph?
Solution: (a) is not complete graph- it is not a simple graph, no edge between A and C
(b) Is complete graph- there is an edge between every pair of vertices
Solution:
Each edge of a graph is determined by pair of vertices.
In simple graph there are no multiple edges
The number of edges cannot exceed the number of vertices.
𝑛 1
The number of pairs of vertices that can be choosen from 𝑛 vertices is 𝐶2 = 𝑛(𝑛 − 1)
2
1
Thus, for a simple graph with 𝑛 (≥ 2) vertices, the number of edges cannot exceed 𝑛(𝑛 − 1).
2
Accordingly if the simple graph G has 𝑛 vertices and 𝑚 edges, then 𝑚 ≤ 1/2𝑛(𝑛 − 1)
Therefore 2𝑚 ≤ 𝑛2 − 𝑛 , that is 𝟐 𝑬 = 𝑽 𝟐 − 𝑽 .
Solution:
In a complete graph, there exist one edge between every pair of vertices.
Therefore
Number of of edges = Number of pair of vertices
𝟏
If 𝑛 is number of vertices, then number of pair of vertices is 𝒏(𝒏 − 𝟏)
𝟐
Thus the number of edges is a complete graph is with 𝒏 vertices is
𝟏
𝒏(𝒏 − 𝟏)
𝟐
Solution:
𝟏
For 𝑛 = 4, m= 𝒏 𝒏−𝟏 =𝟔.
𝟐
Since 𝒎 = 𝟕 exceeds this number, a simple graph of order 4 and size 7 do not exist.
𝟏
Similarly, since 𝒎 = 𝟓 is not equal to 𝒏 𝒏 − 𝟏 = 𝟔, a complete graph od
𝟐
order 4 and size m=5 does not exist.
S B (b) C
Solution: R (a)
8. How many vertices and how many edges are there in the complete
bipartite graph 𝑲𝟒,𝟕 and 𝑲𝟕,𝟏𝟏 .?
Solution:
11 vertices and 28 edges
18 vertices and 77 edges.
Solution:
A simple graph to be bipartite graph 4𝑚 ≤ 𝑛2
4𝑚 = 20 and 𝑛2 = 16.
So that 4𝑚 > 𝑛2 , therefore the given simple graph cannot be bipartite graph.
𝑑 𝑣1 = 3, 𝑑 𝑣2 = 4, 𝑑 𝑣3 = 4, 𝑑 𝑣4 = 3
Fig 4.1
Fig 4.2
DISCRETE MATHEMATICS & GRAPH THEORY 3/29/2023
Definition & Examples
Regular Graph
A graph in which all the vertices are of the same degree 𝑘 is called a regular graph of
degree 𝑘. Or 𝑘 − 𝑟𝑒𝑔𝑢𝑙𝑎𝑟 𝑔𝑟𝑎𝑝ℎ.
Draw 2-regular, and 4-regular graph.
2-regular 3-regular 4-regular
Fig 4.3
This 3-regular graph is called Petersen graph. Which has 10 vertices and 15 edges.
3/29/2023
DISCRETE MATHEMATICS & GRAPH THEORY
Definition & Examples
Theorem: Prove that the sum of the degrees of all the vertices in a graph is an even number
and this number is equal to twice the number of edges in the graph.
𝒅𝒆𝒈 𝒗 = 𝟐 𝑬
𝒗∈𝑽
Proof: Since the degree of a vertex is the number of edges incident with that vertex,
the sum of 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 counted twice, once at each end.
Therefore, the sum of the degrees is equal twice the number of edges.
𝒅𝒆𝒈 𝒗 = 𝟐 𝑬
𝒗∈𝑽
Note: this proof applies if multiple edges and loops are present.
1. For a graph shown below indicate the degree of each vertex and verify
handshaking property.
Thus, 16 = 2 × 8
deg(𝑣𝑖 ) = 2𝑒
𝑖=1
Given that, In this graph e = 𝐸 = 19. and degree of all vertices are greater than or equal to 4.
Let 4 + 4 + ⋯ … . ≤ 2𝑒
4 𝑉 ≤ 2 × 19
𝑉 ≤ 38/4
𝑉 ≤ 9.5
Thus, the largest possible value of 𝑉 is 9
4. Draw the diagram of a graph where the degrees of the vertices are 1, 1, 1, 2, 3, 5, 5, 7
5. For a graph 𝑮 = 𝑮(𝑽, 𝑬), what is the largest possible value for 𝑽 if 𝑬 = 𝟑𝟓 and 𝐝𝐞𝐠(𝒗) ≥ 𝟑 for all 𝒗 ∈ 𝑽?
Isomorphism
Consider a graph 𝐺 = (𝑉, 𝐸) and 𝐺 ′ = 𝑉 ′ , 𝐸 ′ . Suppose there exists a function 𝑓: 𝑉 → 𝑉 ′ such that
(i) 𝑓 is one-to-one correspondence
(ii) For all vertices A, B of G, 𝐴, 𝐵 is an edge of G if and only if 𝑓 𝐴 , 𝑓(𝐵) is an edge of 𝐺 ′ .
Then 𝑓 is called an isomorphism between 𝐺 𝑎𝑛𝑑 𝐺 ′ . And we say that 𝐺 𝑎𝑛𝑑 𝐺 ′ are isomorphic graphs.
In other words, two graphs 𝐺 𝑎𝑛𝑑 𝐺 ′ are said to be isomorphic (to each other) if there is one-to-one
correspondence between their vertices and between their edges such that adjacency of vertices is preserved.
Such graph will have same structure; they differ only in the way their vertices and edges are labelled or only in
the way they represented geometrically.
Fig. 5.1
Fig. 5.2
We observe that both of these two graphs have same number of vertices but different number of edges. Therefore, although there can exist one-
to-one correspondence between vertices, there cannot be one-to-one correspondence between [Link] graphs are not isomorphic.
From the definition of isomorphism of graphs, it follows that if two graphs are isomorphic then they must have:
1. The same number of vertices
2. The same number of edges
3. An equal number of vertices with a given degree
These conditions are necessary but not sufficient.
In particular, two graphs of the same order and the same size need not be isomorphic. Consider the two graphs shown below fig5.3
Both of these graphs are order 4 and size 3. But the two graphs are not
isomorphic.
Fig. 5.3
DISCRETE MATHEMATICS & GRAPH THEORY 3/29/2023
Graph Isomorphism
Note:
1. Every two complete graphs, with the same number of vertices are isomorphic.
2. Any two complete bipartite graphs with bipartite containing 𝑟 𝑎𝑛𝑑 𝑠 vertices
are isomorphic.
2
5
Subgraphs
Given two graphs 𝐺 𝑎𝑛𝑑 𝐺1 , we say that 𝐺1 is a subgraph of G if the following condition
holds.
1. All the vertices and all the edges of 𝐺1 are in G.
2. Each edge of 𝐺1 has the same end vertices in G as in 𝐺1 .
Spanning subgraphs
Given a graph 𝐺 = (𝑉, 𝐸), if there is a subgraph 𝐺1 = (𝑉1 , 𝐸1 ) of G such that 𝑉1 = 𝑉,
then 𝐺1 is called a spanning subgraph of G.
Fig 6.2
(b) Is spanning subgraph of (a)
(c) Is not spanning subgraph of (a)
Fig.6.2
DISCRETE MATHEMATICS & GRAPH THEORY 3/29/2023
Subgraphs
Induced subgraphs
Given a graph 𝐺 = (𝑉, 𝐸), suppose there is a subgraph 𝐺1 = (𝑉1 , 𝐸1 ) of 𝐺 such that every edge
of 𝐴, 𝐵 of 𝐺, where 𝐴, 𝐵 ∈ 𝑉1 is an edge of 𝐺1 also. Then 𝐺1 is called an induced subgraph
of 𝐺 (induced by 𝑉1 ) and is denoted by < 𝐴 >.
Fig 6.3
(b) Is induced subgraph of (a)
(c) Is not induced subgraph of (a)
Fig.6.3
DISCRETE MATHEMATICS & GRAPH THEORY 3/29/2023
Subgraphs
Fig 6.4. (b) and (c) are edge disjoint but not
vertex disjoint subgraphs.
Fig.6.4
DISCRETE MATHEMATICS & GRAPH THEORY 3/29/2023
Subgraphs
Complement of a subgraph
Given a graph G and a subgraph 𝐺1 of G, the subgraph of G obtained by deleting from G all the
edges that belong to 𝐺1 is called the complement of 𝑮𝟏 in G; it is denoted by 𝐺 − 𝐺1 , or 𝐺1 .
Thus, the complement 𝐺 of a simple graph G with 𝑛 vertices is that graph which is obtained by deleting
those in 𝐾𝑛 which belong to [Link] 𝐺 = 𝐾𝑛 − 𝐺.
Evidently 𝐾𝑛 , G and 𝐺 have the same vertex set, and two vertices are adjacent in G if and only if they are
not adjacent in 𝐺 . Obviously, 𝐺 is also a simple graph and the complement of 𝐺 is G;
Fig &8.2
DISCRETE MATHEMATICS GRAPH THEORY 3/29/2023
Complements
Fig 8.3 (a), a graph of order 6 is shown as a subgraph of 𝐾6 , the edges of G is being shown
in thick lines. Its complement 𝐺ҧ is shown in Fig 8.3 (b). This graph is known as David
graph.
Fig 8.3
1. Show that the complement of a bipartite graph need not to be a bipartite graph.
Solution: Fig 8.4 (a) shows a bipartite graph which is of order 5. The complement of
this shown in Fig 8.4 (b), this is not bipartite.
Fig 8.4
ഥ is 80,
2. Let G be a simple graph of order 𝒏. If the size of G is 56 and the size of 𝑮
what is 𝒏.
Solution: we know that 𝐺 = 𝐾𝑛 − 𝐺.
1
Size of 𝐾𝑛 (number of edges is 𝐾𝑛 ) is 𝑛(𝑛 − 1)
2
1
80 = 𝑛(𝑛 − 1)-56
2
𝑛 = 17
Problems
1
3
4
Walk
Let G be a graph having at least one edge. In G, consider a finite, alternating sequence of the vertices and edges of the form
Which begins and ends with vertices and which is such that each edge in the sequence is incident in the vertices preceding
and following it in the sequence. Such a sequence is called a walk in G.
In a walk, a vertex or an edge (or both) can appear more than once.
Fig 8.4
In this graph:
1. The sequence 𝝂𝟏 𝒆𝟏 𝝂𝟐 𝒆𝟐 𝝂𝟑 𝒆𝟖 𝝂𝟔 is a walk of length 3 (because, this walk contains 3 edges: 𝒆𝟏 𝒆𝟐 𝒆𝟖 ). In this walk, no vertex
and no edge is repeated.
2. The sequence 𝝂𝟏 𝒆𝟒 𝝂𝟓 𝒆𝟑 𝝂𝟐 𝒆𝟐 𝝂𝟑 𝒆𝟓 𝝂𝟓 𝒆𝟔 𝝂𝟒 is a walk of length 5. In this walk the vertex 𝝂𝟓 is repeated, but no edge is
repeated
3. The sequence 𝝂𝟏 𝒆𝟏 𝝂𝟐 𝒆𝟑 𝝂𝟓 𝒆𝟑 𝝂𝟐 𝒆𝟐 𝝂𝟑 is a walk of length 4. In this walk the edge 𝒆𝟑 is repeated and the vertex 𝝂𝟐 is
repeated.
DISCRETE MATHEMATICS & GRAPH THEORY 3/29/2023
Vertex degree:Trails and Circuits
The vertex with which a walk begins is called the initial vertex (or the origin) of the walk
and the vertex with which a walk ends is called the final vertex (or the terminus) of the walk.
The initial vertex and the final vertex of a walk are together called its terminal vertices.
The terminal vertices of a walk need not be distinct. Nonterminal vertices of a walk are called its internal vertices.
A walk having u as the initial vertex and 𝜈 as the final vertex is called a walk from u to 𝜈, or briefly a u- 𝜈 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 which 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 Fig 8.4 , 𝜈1 𝑒1 𝜈2 𝑒3 𝜈5 𝑒4 𝜈1 is closed walk 𝜈1 𝑒1 𝜈2 𝑒2 𝜈3 𝑒5 𝜈5 is an open walk.
d
DISCRETE MATHEMATICS & GRAPH THEORY 3/29/2023
Vertex degree: Path and Cycle
A circuit in which the terminal vertex does not appear as an internal vertex and no internal vertex is repeated is called a
cycle.
(a)) (b))
1. A walk can be open or closed. In a walk (closed or open), a vertex and/or an edge can appear more than once.
2. A trail is an open walk in which a vertex can appear more than once but an edge cannot appear more than once.
3. A circuit is closed walk in which a vertex can appear more than once but an edge cannot appear more than once.
4. A path is an open walk in which neither a vertex nor an edge can appear more than once. Every path is a trail, but a trail need not
be a path.
5. A cycle is closed walk in which neither a vertex nor an edge can appear more than once. Every cycle is circuit; but, a circuit need
not be a cycle.
In a simple graph, a cycle must have at least three edges. (A cycle formed by three edges
is called a triangle)
2. Consider the graph shown below. Find all paths from vertex A to vertex R. also,
indicate their lengths.
3. Determine the number of different paths of length 2 in the graph shown below.
2.
3
4
We say that a graph G is a connected graph if every pair if every pair of distinct vertices in G are connected.
Otherwise, G is called a disconnected graph.
In other words, a graph G is said to be (i) connected if there is a at least one path between every two distinct
vertices in G, and (ii) disconnected if G has at least one pair of distinct vertices between which there is no path.
A graph G is connected if we can reach any vertex of G from any other vertex of G by travelling along the edges,
and disconnected otherwise.
DISCRETE MATHEMATICS & GRAPH THEORY 3/29/2023
Connected and Disconnected Graphs
Example: Graph shown in Fig 9.1 (a) is connected whereas the graph shown in fig 9.1 (b) is
disconnected.
Fig. 9.1
NOTE:
1. It is obvious that in a graph G all walks and, therefore, all trails, all circuits, all paths and all cycles ( when they exist) are
connected subgraphs of G.
2. It is evident that every (nontrivial) graph G consists of one or more connected graphs. Each connected graph is a subgraph of G
and is called a component of G.
3. Obviously, a connected graph has only one component and a disconnected graph has two or more [Link] number of
components of a graph G is denoted by 𝑘 𝐺 .
If there is a trail in G that contains all the edges of G, then that trail is called an Euler trail
in G.
A connected graph that contains an Euler circuit is called an Euler Graph (or Euclearian
graph).
A connected graph that contains an Euler trail is called an semi-Euler Graph (or Euclearian
graph).
Example:
Proof:
Suppose that G has an Euler circuit. While tracing this circuit we observe that every time the
circuit meets a vertex 𝑣 it goes through two edges incident on 𝑣.
This is true for all vertices that belong to the circuit,
Since the circuit contains all edges,
It meets all the vertices at least once.
A Hamilton cycle (when it exists) in a graph of n vertices consists of exactly n edges. Because, a cycle
By definition, a Hamilton cycle (when it exists) in a graph G must include all vertices is G. This does not
A graph that contains a Hamilton cycle is called Hamilton graph (or Hamiltonian graph).
For example, in the graph shown in figure 10.1 the cycle shows in thick lines is a Hamilton
cycle. (Observe that this cycle does not include the edge BD). The graph is therefore a
Hamilton graph.
A path (if any) in a connected graph which includes every vertex (but not necessarily every edge) of the
graph is called a Hamilton Path (Hamiltonian path) in the graph. For example, in the graph shown in
figure 10.2, the path shown in thick lines is a Hamilton path.
1. Show that the graph shown below is an Euler graph 2. Find an Euler circuit in the graph shown below
3. Show that the following graph does not contain an Euler circuit. 4. Show that the following graph contains an Euler trail
Note:
Complete graph 𝐾𝑛 , where 𝑛 ≥ 3, is a Hamiltonian graph.
Every simple k-regular graph with 2𝑘 − 1 vertices is a Hamiltonian graph
A graph can be represented by more than one geometrical drawing. In some drawings representing graphs, the
edges intersect (cross over) at points which are not vertices of the graph and in some others the edges meet only
at the vertices.
A graph which can be represented by at least one plane drawing (drawing done on a plane surface) in which the
edges meet only at the vertices is called a planar graph.
On the other hand, a graph which cannot be represented by a plane drawing in which the edges meet only at the
In other words, a non-planar graph whose every possible plane drawing contains at least two edges which intersect
Euler’s formula
If G is a planar graph, then G can be represented by a diagram in a plane in which the edges meet only at the vertices.
Such a diagram divides the plane into a number of parts, called regions (or faces), of which exactly one part is
unbounded. The number of edges that form the boundary of a region is called the degree of that region.
For example in the diagram of a planar graph shown in below Figure, the diagram divides the plane into 6 regions R1,
R2, R3, R4, R5, R6. We observe that each of the regions R1 to R5 is bounded and the region R6 is unbounded. We say
that the regions R1 to R5 are in the interior of the graph and the region R6 is in the exterior.
𝑑 𝑅1 = 2
𝑑 𝑅2 = 3
𝑑 𝑅3 = 5
𝑑 𝑅4 = 3
𝑑 𝑅5 = 1
𝑑 𝑅6 = 6 and
𝑑 𝑅1 + 𝑑 𝑅2 + 𝑑 𝑅3 + 𝑑 𝑅4 + 𝑑 𝑅5 + 𝑑 𝑅6 = 20
The twice the number of edges in the graph. This property is analogous to the handshaking property and true for all
planar graphs.
Theorem: A connected planar graph G with 𝑛 vertices and 𝑚 edges has exactly 𝑚 − 𝑛 + 2 regions in all of its diagram.
That is 𝑟 = 𝑚 − 𝑛 + 2 or 𝑛 − 𝑚 + 𝑟 = 2
NOTE:
3
regions then, 𝑖. 𝑚 ≥ 𝑟, 𝑖𝑖. 𝑚 ≤ 3𝑛 − 6
2
4. Every connected simple planar graph G contains a vertex of degree less than 6.
Detection of planarity
Given a graph G, the determination of its planarity or otherwise is an important problem. This problem can be
tackled by employing what is known as Elementary Reduction. The steps involved in this reduction are as explained
below:
Elementary Reduction
𝐴 = 𝐺1 , 𝐺2 , … … … … . . 𝐺𝑘
Where 𝐺1 , 𝐺2 , … … … … . . 𝐺𝑘 are subgraphs of G every pair of which has exactly one vertex in common (-such subgraphs are
called blocks).
Step 3. Remove all but one edge between every pair of vertices joined by multiple edges (if any).
Step 4. Eliminate all vertices of degree 2 by merging the edges incident on these vertices.
Step 5. Repeat the steps 3 and 4 repeatedly until each block 𝐺𝑖 is reduced to a new graph 𝐻𝑖 which will be one of the following.
If 𝐻𝑖 is in the first or second of the above possible forms, we conclude that 𝐻𝑖 is a planar graph. Consequently, each 𝐺𝑖 with
Example 1: Carry out the elementary reduction process for the following graph shown in below Figure.
Step 1 : The given graph 𝐺 is a single block. Therefore, the set 𝐴 of step 1 contains only 𝐺.
Step 2 : we have to remove the loops. In the graph, there is one loop consisting of the edge 𝑒9 . Let us remove it.
Step 3: we have to remove one of the two parallel edges from each vertex pair having such edges. In the given graph,
𝑒1 , 𝑒8 are parallel edges. Let us remove 𝑒8 from the graph. The graph left-out after the first three steps is as shown
below:
Step 4: we have to eliminate the vertices of degree 2 by merging the edges incident on these vertices. Thus, we
merge (i) the edges, e1 and e2 into an edge, e10 (say) and (ii) the edges , e6 and e7 into an edge e11 (say). The
resulting graph will be shown below.
As per Step 3, let us remove one of the parallel edges 𝑒5 and 𝑒10 and one of the parallel edges 𝑒3 and 𝑒11 . The graph
got be removing 𝑒10 and 𝑒11 will be as shown below:
As per step 3, we remove one of the two parallel edges, say 𝑒12. Thus, we get the following graph.
This graph is final graph obtained by the process of elementary reduction applied to the given graph
Solution: The elementary reduction of the given graph 𝐺 consists of the following steps:
Step 1: splitting 𝐺 into blocks. This splitting is shown below:
Step 2: Removing loops and eliminating multiple edges. The resulting graph is as shown below:
Step 3: Merging the edges incident on vertices of degree 2. The resulting graph is as shown below:
The reduction is now complete. The final reduced graph (shown in figure) has three blocks, of which the first and the
third (which are single edges) are obviously planar. The second one is the complete graph, 𝐾5 , which is non-planar.
Thus, the given graph contains 𝐾5 as a subgraph and is therefore non-planar.
Consider a connected planar graph 𝐺 and a plane drawing thereof. Suppose 𝑅1 , 𝑅2 , 𝑅3 , 𝑒𝑡𝑐. , are the regions
(including the exterior region) in this drawing. Let us now construct a graph 𝐺 ∗ using the procedure given
below:
1. Choose one point inside each of the regions 𝑅1 , 𝑅2 , 𝑅3 ,…… Denote these points by 𝜐1∗ , 𝜐2∗ , 𝜐3∗ , … , respectively.
2. If two regions 𝑅𝑖 and 𝑅𝑗 are adjacent (i.e. have a common edge, say 𝑒𝑘 ), draw a line 𝑒𝑘∗ joining the points 𝜐𝑖∗
1. If there is more than one edge common to 𝑅𝑖 and 𝑅𝑗 , draw one line 𝑒𝑝∗ between the points 𝜐𝑖∗ and 𝜐𝑗∗ for each
2. For an edge 𝑒𝑖 , lying entirely in one region, say 𝑅𝑖 , draw a loop 𝑒𝑖∗ at the point 𝜐𝑖∗ intersecting 𝑒𝑖 exactly once.
The graph 𝐺 ∗ for which 𝜐𝑖∗ are vertices and 𝑒𝑖∗ are edges constructed as explained above is called the geometric
For example, consider the connected planar graph 𝐺 a plane drawing of which is shown in Figure 2.31. we observe
that the drawing divides the plane into regions 𝑅1 , 𝑅2 , 𝑎𝑛𝑑 𝑅3 , Of which 𝑅3 is unbounded. We construct the dual
𝐺 ∗ of 𝐺 by using the afore- stated procedure. The step-by-step description of the construction is given below.
We choose three points 𝜐1∗ , 𝜐2∗ , 𝜐3∗ inside the regions 𝑅1 , 𝑅2 , 𝑅3 , respectively.
The regions 𝑅1 , 𝑎𝑛𝑑 𝑅2 have a common edge 𝑒5 . We draw a line 𝑒5∗ joining 𝜐1∗ , 𝑎𝑛𝑑 𝜐2∗ that cross 𝑒5
exactly once.
The regions 𝑅1 𝑎𝑛𝑑 𝑅3 have two common edges 𝑒1 , 𝑒2 . We draw two lines 𝑒1∗ , 𝑒2∗ between 𝜐1∗ , 𝑎𝑛𝑑 𝜐3∗ ,
with 𝑒1∗ crossing only 𝑒1 and 𝑒2∗ crossing only 𝑒2 .
The regions 𝑅2 𝑎𝑛𝑑 𝑅3 have two common edges 𝑒3 , 𝑒4 . We draw two lines 𝑒3∗ , 𝑒4∗ between
𝜐2∗ , 𝑎𝑛𝑑 𝜐3∗ , with 𝑒3∗ crossing only 𝑒3 and 𝑒4∗ crossing only 𝑒4 .
The edge 𝑒6 is completely contained in 𝑅3 . We draw a loop 𝑒6∗ at 𝜐3∗ interesting 𝑒6 exactly once.
The construction of 𝐺 ∗ is now complete. For 𝐺 ∗ , the points 𝜐1∗ , 𝜐2∗ , 𝜐3∗ , are the vertices and
these lines 𝑒1∗ , 𝑒2∗ , 𝑒3∗ , 𝑒4∗ , 𝑒5∗ , 𝑎𝑛𝑑 𝑒6∗ are the edges.
DISCRETE MATHEMATICS & GRAPH THEORY 3/29/2023
Planar Graphs
Some results
The results listed below follow from the procedure used in the construction of 𝐺 ∗ :
2. There is a one-to-one correspondence between the edges of 𝐺 and the edges of 𝐺 ∗ . (if 𝑒 ∗ is the edge of 𝐺 ∗ that corresponds to the edge
7. The number of edges which form a boundary of a Region 𝑅𝑖 in G is equal to the degree of the corresponding vertex 𝜐𝑖∗ in 𝐺 ∗ , and vice-
versa.
2.
Graph Colouring
Example: Suppose we want to make an exam schedule for a university. We have list of different subjects and
students enrolled in every subject. Many subjects would have common students (of same batch, some backlog
students, etc). How do we schedule the exam so that no two exams with a common student are scheduled at
same time? How many minimum time slots are needed to schedule all exams? (vertex represents subject and
Graph Colouring
Given a planar or non-planar graph G, if we assign colours to its vertices in such a way that no two
adjacent vertices have the same colour, then we say that the graph G is properly coloured.
In other words, proper colouring of a graph means assigning colours to its vertices such that adjacent vertices
have different colours.
Note:
1. A graph can have more than one proper
colouring
2. Two non adjacent vertices in a properly coloured
graph can have the same colour.
Chromatic Number
A graph G is said to be 𝑘 − 𝑐𝑜𝑙𝑜𝑢𝑟𝑎𝑏𝑙𝑒 if we can properly colour it with 𝑘(number of) colours.
In other words, a 𝑘 − 𝑐ℎ𝑟𝑜𝑚𝑎𝑡𝑖𝑐 graph is a graph that can be properly coloured with 𝑘 colours
but not with less than k colours.
Some results:
1. The graph consists of only isolated vertex is 1-chromatic (Null graph)
Coloring a Wheel
A graph of this form is called a wheel.
In wheels with an even number of “spokes”, you can alternate colors on the outside,
then add an additional color for the center vertex. As is seen in this wheel with 6
spokes, a wheel with an even number of spokes can be 3-colored.
(G ) = 3
Chromatic Polynomial:
The number of different ways of properly colouring graph 𝐺 with 𝜆 number of colours is denoted
by 𝑃(𝐺, 𝜆). Then we have the following
𝑃 𝑁𝑛 , 𝜆 = 𝜆𝑛 where 𝑁𝑛 represents null graph with n vertices.
𝑃 𝐾𝑛 , 𝜆 = 0 𝑖𝑓 𝜆 < 𝑛,
𝑃 𝐾𝑛 , 𝜆 = 1 𝑖𝑓 𝜆 = 𝑛
𝑃 𝐾𝑛 , 𝜆 = 𝜆 𝜆 − 1 𝜆 − 2 ⋯ 𝜆 − 𝑛 + 1 𝑖𝑓 𝜆 > 𝑛 where 𝐾𝑛 Represents complete
graph.
𝑃 𝐿𝑛 , 𝜆 = 𝜆 𝜆 − 1 𝑛−1 𝑖𝑓 𝜆 ≥ 2
We observe that in each of above cases, 𝑃(𝐺, 𝜆) is a polynomial. This polynomial is called
Chromatics polynomial.
The chromatic polynomial 𝑃(𝐺, 𝜆) of a graph 𝐺 represents the number of ways of properly
colouring 𝐺 with 𝜆 number of colours.
If a graph 𝐺 is made up of 𝑛 parts 𝐺1 , 𝐺2 , … , 𝐺𝑛 then 𝑃(𝐺, 𝜆) is given by the following Product Rule
𝑷 𝑮, 𝝀 = 𝑷 𝑮𝟏 , 𝝀 ⋅ 𝑷 𝑮𝟐 , 𝝀 ⋯ 𝑷(𝑮𝒏 , 𝝀)
In particular, if 𝐺 is made up of two parts 𝐺1 and 𝐺2 , then we have
𝑷 𝑮, 𝝀 = 𝑷 𝑮𝟏 , 𝝀 ⋅ 𝑷 𝑮𝟐 , 𝝀
𝑷 𝑮, 𝝀
𝑷 𝑮𝟐 , 𝝀 =
𝑷 𝑮𝟏 , 𝝀
1. Mobile Radio Frequency Assignment: When frequencies are assigned to towers, frequencies assigned to all
towers at the same location must be different. How to assign frequencies with this constraint? What is the
minimum number of frequencies needed? This problem is also an instance of graph coloring problem where
every tower represents a vertex and an edge between two towers represents that they are in range of each other.
2. Sudoku: Sudoku is also a variation of Graph coloring problem where every cell represents a vertex. There is an
edge between two vertices if they are in same row or same column or same block.
3. Register Allocation: In compiler optimization, register allocation is the process of assigning a large number of
target program variables onto a small number of CPU registers. This problem is also a graph coloring problem.
4. Bipartite Graphs: We can check if a graph is Bipartite or not by coloring the graph using two colors. If a given
graph is 2-colorable, then it is Bipartite, otherwise not. See this for more details.
5. Map Coloring: Geographical maps of countries or states where no two adjacent cities cannot be assigned same
color. Four colors are sufficient to color any map (See Four Color Theorem)
DECOMPOSITION THEOREM:
Let 𝐺 be a graph and 𝑒 = {𝑎, 𝑏} be an edge of 𝐺. Let 𝐺𝑒 = 𝐺 – 𝑒 be that subgraph of 𝐺 which is obtained by deleting
𝑒 from 𝐺 without deleting vertices 𝑎 and 𝑏. Suppose we construct a new graph 𝐺𝑒‘ by coalescing (identifying /
merging) the vertices 𝑎 and 𝑏 in 𝐺𝑒 . Then 𝐺𝑒‘ is subgraph of 𝐺𝑒 as well as 𝐺.
The process of obtaining 𝐺𝑒 and 𝐺𝑒‘ from 𝐺. And is illustrated in Figure
MULTIPLICATION THEOREM
The following theorem gives an expression for 𝑃(𝐺, 𝜆) for a special class of
graphs.
Theorem 2: If a graph 𝐺 has sub graphs 𝐺1 and 𝐺2 such that 𝐺1 ∪ 𝐺2 =
𝐺 and 𝐺1 ∩ 𝐺2 = 𝐾𝑛 for some positive integer n, then
𝑃 𝐺1 , 𝜆 . 𝑃 𝐺2 , 𝜆
𝑃 𝐺, 𝜆 =
𝜆𝑛
Where 𝜆𝑛 = 𝜆 (𝜆 − 1)( 𝜆 − 2) … (𝜆 – 𝑛 + 1)
Problems
1. Consider the graph K2,3 shown in Figure .Let 𝜆 denote the number of colors
available to properly color the vertices of this graph. Find:
1. how many proper colorings of the graph have vertices 𝑎, 𝑏 colored the same.
2. how many proper colorings of the graph have vertices 𝑎, 𝑏 colored with different
colors.
3. The chromatic polynomial of the graph.
4. For the graph 𝐾2, 𝑛 what is the chromatic polynomial?
(iv) Let 𝑉1 = {𝑎, 𝑏} and 𝑉2 = {𝑥1, 𝑥2, 𝑥3, … … … 𝑥𝑛} be the two bipartite of 𝐾2 𝑛. Then, if 𝑎 and 𝑏 are to have
,
the same color, the number of proper colorings of 𝐾2, 𝑛 is 𝜆 (𝜆 − 1)𝒏 as in case (i) above, If 𝑎 and 𝑏 are to
have different colors, the number of proper colorings is
𝜆 𝜆 − 1 𝜆 − 2 𝒏,as in case (ii) above. Consequently, the chromatic polynomial for 𝐾2, 𝑛 is
Let us redesignate the graph 𝐺𝑒 as 𝐻 and denote the edge {𝑣1, 𝑣5} as 𝑓. Then the graph 𝐻𝑓 and 𝐻′𝑓 would
appear as shown below:
We observe that both of the graphs 𝐺𝑒‘ and 𝐻𝑓‘ are the graph 𝐾4 and the graph 𝐻𝑓 is a disconnected graph having
𝑁1 (- null graph of order 1 consisting of the single vertex 𝑣1) and 𝐾4 as components. Accordingly,
𝑃 𝐺𝑒‘, 𝜆 = 𝑃 𝐻′𝑓 𝜆 = 𝑃 𝐾4, 𝜆 = 𝜆 𝜆 − 1 𝜆 − 2 𝜆 − 3 .
𝑃(𝐻𝑓 , 𝜆) = 𝑃(𝑁1, 𝜆) . 𝑃(𝐾4, 𝜆) = 𝜆. 𝜆 (𝜆 − 1) (𝜆 − 2) (𝜆 − 3).
This is the chromatic polynomial for the given graph. For λ = 5, this polynomial gives
𝑃(𝐺, 𝜆) = 5 𝑥 4 𝑥 32 𝑥 2 = 360.
The graph G in figure can be regarded as the union of the graphs G1 and G2 shown in
figures below
We note that G1 is the same as K3,G2 is the same as K4 and G1∩G2 is the same as K2. Hence, using the
multiplication theorem (Theorem 2), we get
P (G, λ) = P (G1, λ) . P (G2, λ) / λ(2) = P (K3, λ) . P (K4, λ) / λ(2)