0% found this document useful (0 votes)
1K views

What Is Graph Isomorphism?: Necessary Conditions For Two Graphs To Be Isomorphic

The document defines and provides examples of graph isomorphism, necessary and sufficient conditions for graph isomorphism, and Hamiltonian and Euler graphs. Graph isomorphism is when two graphs have the same structure but may differ in labeling of vertices. For graph isomorphism, the necessary conditions are the graphs must have the same number of vertices and edges, the same degree sequence, and contain the same cycles. The sufficient conditions are if the complement graphs are isomorphic or the adjacency matrices are the same. Hamiltonian graphs contain a Hamiltonian circuit that visits each vertex once, while Euler graphs are connected graphs where all vertices have even degree.

Uploaded by

Anil Kumar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1K views

What Is Graph Isomorphism?: Necessary Conditions For Two Graphs To Be Isomorphic

The document defines and provides examples of graph isomorphism, necessary and sufficient conditions for graph isomorphism, and Hamiltonian and Euler graphs. Graph isomorphism is when two graphs have the same structure but may differ in labeling of vertices. For graph isomorphism, the necessary conditions are the graphs must have the same number of vertices and edges, the same degree sequence, and contain the same cycles. The sufficient conditions are if the complement graphs are isomorphic or the adjacency matrices are the same. Hamiltonian graphs contain a Hamiltonian circuit that visits each vertex once, while Euler graphs are connected graphs where all vertices have even degree.

Uploaded by

Anil Kumar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

What is graph Isomorphism?

Graph Isomorphism is a phenomenon of existing the same graph in more than one forms. Such graphs
are called as isomorphic graphs.

Examples of Isomorphic graphs-

Necessary conditions for two graphs to be Isomorphic-


The following 4 conditions are the necessary conditions which must be satisfied for two graphs to be
isomorphic-

Condition-01: Number of vertices in both the graphs must be same.


Condition-02: Number of edges in both the graphs must be same.
Condition-03: Degree sequence of both the graphs must be same.

What is a degree sequence of a graph?


Degree sequence of a graph is defined as a sequence of the degrees of all the vertices
in ascending order.

Condition-04: If a cycle of length k is formed by the vertices { v1 , v2 , ….. , vk } in one graph, then a
cycle of same length k must be formed by the vertices { f(v1) , f(v2) , ….. , f(vk) } in the other graph as well.

NOTE-
• It is important to note that the above four conditions are just the necessary conditions for two graphs to
be isomorphic. They are not sufficient to prove that the two graphs are isomorphic.
• Even if all the above four conditions are satisfied by the two graphs, then also we can’t say that the two
graphs will surely be isomorphic.
• However, if any of the above four conditions violate, then we can surely say that the two graphs will
never be isomorphic.
Sufficient conditions for two graphs to be Isomorphic-
The following conditions are the sufficient conditions for two graphs to be isomorphic. If any of these
conditions satisfy, then we can surely say that the two graphs are isomorphic.

Condition-01: Two graphs are isomorphic if and only if their complement graphs are isomorphic.
Condition-02: Two graphs are isomorphic if their adjacency matrices are same.
Condition-03: Two graphs are isomorphic if their corresponding sub graphs obtained by the deletion
of some vertices of one graph and their corresponding images in the other graph are isomorphic.

PRACTICE PROBLEMS BASED ON CHECKING WHETHER GIVEN GRAPHS ARE


ISOMORPHIC OR NOT-

Problem-01:
Are the following two graphs isomorphic?

Solution-
Check necessary conditions-
Condition-01:
• Number of vertices in graph G1 = 4
• Number of vertices in graph G2 = 4
Condition-01 satisfies here because both the graphs G1 and G2 have same number of vertices. So, they
may be isomorphic.
Condition-02:
• Number of edges in graph G1 = 5
• Number of edges in graph G2 = 6
Condition-02 violates here because both the graphs G1 and G2 have different number of edges. So, they
can not be isomorphic.
Therefore,
G1 and G2 are not isomorphic graphs.

Problem-02:
Which of the following graphs are isomorphic?
Solution-
Check necessary conditions-
Condition-01:
• Number of vertices in graph G1 = 4
• Number of vertices in graph G2 = 4
• Number of vertices in graph G3 = 4
Condition-01 satisfies here because all the graphs G1, G2 and G3 have same number of vertices.
Condition-02:
• Number of edges in graph G1 = 5
• Number of edges in graph G2 = 5
• Number of edges in graph G3 = 4
Condition-02 satisfies here for the graphs G1 and G2 because they have same number of edges. So,
they may be isomorphic. However, condition-02 violates here for the graphs (G1,G2) and G3 because
they have different number of edges.
Therefore,
G3 can neither be isomorphic to G1 nor isomorphic to G2.
Now, let us continue to check for the graphs G1 and G2.
Condition-03:
• Degree Sequence of graph G1 = { 2 , 2 , 3 , 3 }
• Degree Sequence of graph G2 = { 2 , 2 , 3 , 3 }
Condition-03 satisfies here because both the graphs G1 and G2 have same degree sequence. So, they
may be isomorphic.
Condition-04:
• Both the graphs contain two cycles each of length 3 formed by the vertices having degrees { 2 , 3 , 3 }
Condition-04 satisfies here because both the graphs G1 and G2 have same cycles in them. So, they may
be isomorphic.
Since, all the necessary conditions are satisfied, therefore the graphs G1 and G2 may be isomorphic.
Now, let us check the sufficient condition.
Check sufficient condition-
By sufficient conditions, we know that the two graphs are isomorphic if and only if their complement
graphs are isomorphic. So, let us draw their complement graphs-
Clearly, Complement graphs of G1 and G2 are isomorphic.
Therefore,
Graphs G1 and G2 are isomorphic graphs.

Problem-03:
Are the following two graphs isomorphic?

Solution-
Check necessary conditions-
Condition-01:
• Number of vertices in graph G1 = 8
• Number of vertices in graph G2 = 8
Condition-01 satisfies here because both the graphs G1 and G2 have same number of vertices. So, they
may be isomorphic.
Condition-02:
• Number of edges in graph G1 = 10
• Number of edges in graph G2 = 10
Condition-02 satisfies here because both the graphs G1 and G2 have same number of edges. So, they
may be isomorphic.
Condition-03:
• Degree Sequence of graph G1 = { 2 , 2 , 2 , 2 , 3 , 3 , 3 , 3 }
• Degree Sequence of graph G2 = { 2 , 2 , 2 , 2 , 3 , 3 , 3 , 3 }
Condition-03 satisfies here because both the graphs G1 and G2 have same degree sequence. So, they
may be isomorphic.
Condition-04:
In graph G2, the degree-3 vertices form a cycle of length 4 but in graph G2, the degree-3 vertices do not
form a 4-cycle as the vertices are not adjacent.
Condition-04 violates here because both the graphs G1 and G2 do not contain same cycles in them. So,
they can not be isomorphic.
Therefore,
G1 and G2 are not isomorphic graphs.

Hamiltonian Graph-
If there exists a closed walk in the connected graph that visits every vertex of the graph exactly once
(except starting vertex) without repeating the edges, then such a graph is called as a Hamiltonian graph.
OR
Any connected graph that contains a Hamiltonian circuit is called as Hamiltonian Graph.

Example-

Hamiltonian Path-
• If there exists a walk in the connected graph that visits every vertex of the graph exactly once without
repeating the edges, then such a walk is called as Hamiltonian path.
OR
• If there exists a path in a connected graph that contains all the vertices of the graph, then such a path is
called as Hamiltonian path.
Note- In Hamiltonian path, all the edges may or may not be covered but edges must not repeat.
Examples-
Hamiltonian Circuit-
• If there exists a walk in the connected graph that visits every vertex of the graph exactly once (except
starting vertex) without repeating the edges and returns to the starting vertex, then such a walk is called
as Hamiltonian circuit.
OR
• If there exists a cycle in a connected graph that contains all the vertices of the graph, then that cycle is
called as Hamiltonian circuit.
OR
• A Hamiltonian path which starts and ends at the same vertex is called as Hamiltonian circuit.
OR
• A closed Hamiltonian path is called as Hamiltonian circuit.

Examples-

NOTES-
• Any Hamiltonian circuit can be converted to a Hamiltonian path by removing one of its edges.
• Every graph that has a Hamiltonian circuit also has a Hamiltonian path but vice versa is not true.
• There may exist more than one Hamiltonian paths and Hamiltonian circuits in a graph.
• Hamiltonian circuit is also sometimes called as Hamiltonian cycle.

PRACTICE PROBLEM BASED ON HAMILTONIAN GRAPHS-


Problem-
Which of the following is / are Hamiltonian graphs?

Solution-
A)
The graph neither contains a Hamiltonian path nor it contains a Hamiltonian circuit.
Since, graph does not contain a Hamiltonian circuit, therefore graph is not a Hamiltonian Graph.

B)
The graph neither contains a Hamiltonian path nor it contains a Hamiltonian circuit.
Since, graph does not contain a Hamiltonian circuit, therefore graph is not a Hamiltonian Graph.

C)
The graph contains both a Hamiltonian path (ABCDHGFE) and a Hamiltonian circuit (ABCDHGFEA).
Since, graph contains a Hamiltonian circuit, therefore graph is a Hamiltonian Graph.
D)
The graph contains both a Hamiltonian path (ABCDEFG) and a Hamiltonian circuit (ABCDEFGA).
Since, graph contains a Hamiltonian circuit, therefore graph is a Hamiltonian Graph.

E)
The graph neither contains a Hamiltonian path nor it contains a Hamiltonian circuit.
Since, graph does not contain a Hamiltonian circuit, therefore graph is not a Hamiltonian Graph.

F)
The graph contains both a Hamiltonian path (ABCDEFGHI) and a Hamiltonian circuit (ABCDEFGHIA)
Since, graph contains a Hamiltonian circuit, therefore graph is a Hamiltonian Graph.

Euler Graph-
Definition-01:
Any connected graph is called an Euler Graph if and only if all its vertices are of even degree.
Thus, for any graph to be an Euler graph, following two conditions must be satisfied-
1. Graph must be connected.
2. All the vertices must be of even degree.

Example-

As per the definition, this graph is an Euler Graph because the graph is connected and all its vertices are
of even degree.

Definition-02:
An Euler Graph is a connected graph that contains an Euler Circuit.

Example-
As per the definition, this graph is an Euler Graph because it contains an Euler Circuit BACEDCB.

Euler Trail / Euler Path / Euler Walk-


• If there exists a trail in a connected graph that contains all the edges of the graph, then that trail is
called an Euler trail.
OR
• If there exists a walk in the connected graph which visits every edge of the graph exactly once with or
without repeating vertices, then such a walk is called an Euler trail.
Condition-
A graph will contain an Euler trail if and only if it contains at most two vertices of odd degree.

Examples-

Euler Circuit / Euler Cycle / Euler Tour-


• If there exists a circuit in a connected graph that contains all the edges of the graph, then that circuit is
called an Euler circuit.
OR
• If there exists a walk in the connected graph that starts and ends at the same vertex and visits every
edge of the graph exactly once with or without repeating vertices, then such a walk is called an Euler
circuit.
OR
• An Euler trail which starts and ends at the same vertex is called an Euler circuit.
OR
• A closed Euler trail is called an Euler circuit.
Condition-
• A graph will contain an Euler circuit if and only if all its vertices are of even degree.
Examples-

Semi-Euler Graph-
If a connected graph contains an Euler trail but does not contain an Euler circuit, then such a graph is
called as semi-Euler graph.
Thus, for a graph to be a semi-Euler graph, following two conditions must be satisfied-
1. Graph must be connected.
2. Graph must contain an Euler trail.
Example-

This graph contains an Euler trail BCDBAD but does not contain an Euler circuit. Therefore, this graph is a
semi-Euler graph.

Thumb Rules to remember-


Rule-01:
To check whether any graph is an Euler graph or not, you may use any one of the following two ways-
1. If the graph is connected and contains an Euler circuit, then it is an Euler graph.
2. If all the vertices of the graph are of even degree, then it is an Euler graph.
Rule-02:
• To check whether any graph contains an Euler circuit or not, just make sure that all its vertices are of
even degree.
• If all its vertices are of even degree, then graph contains an Euler circuit otherwise not.
Rule-03:
• To check whether any graph is a semi-Euler graph or not, just make sure that it is connected and
contains an Euler trail.
• If the graph is connected and contains an Euler trail, then graph is a semi-Euler graph otherwise not.
Rule-04:
• To check whether any graph contains an Euler trail or not, just make sure that the number of vertices in
the graph with odd degree are not more than 2.
• If the number of vertices with odd degree are at most 2, then graph contains an Euler trail otherwise not.
Rule-05:
• A graph will definitely contain an Euler trail if it contains an Euler circuit.
• A graph may or may not contain an Euler circuit if it contains an Euler trail.
Rule-06:
An Euler graph will definitely be a semi-Euler graph but a semi-Euler graph may or may not be an Euler
graph.

PRACTICE PROBLEM BASED ON EULER GRAPHS-


Problem-
Which of the following is / are Euler Graphs?
Solution-
To decide whether the given graphs are Euler Graphs or not, we will use the rule- “If all the vertices of a
graph are of even degree, then graph is an Euler Graph otherwise not.”
A) Euler Graph
B) Not an Euler Graph
C) Not an Euler Graph
D) Not an Euler Graph
E) Euler Graph
F) Not an Euler Graph

Graph Coloring-

• Graph coloring also called as Vertex coloring is a process of assigning colors to all the vertices of the
graph such that no two adjacent vertices of it are assigned the same color.
• In other words, there must not be any edge in the graph whose end vertices are colored with the same
color. Such a graph is called as properly colored graph.

Example-
In this graph, no two adjacent vertices have the same color and therefore this graph is a properly colored
graph.

Applications of Graph Coloring-


There are number of applications of graph coloring. Some of them are as follows-
• Map Coloring
• Scheduling the tasks
• Preparing Time Table
• Assignment
• Conflict Resolution
• Sudoku
Chromatic Number-
• Chromatic Number is the minimum number of colors required to properly color any graph.
OR
• Chromatic Number is the minimum number of colors required to color any graph such that no two
adjacent vertices of it are assigned the same color.
Example-

Consider the following graph-

In this graph, no two adjacent vertices have the same colors and the minimum number of colors = 3 have
been used to color the vertices.
Therefore,
Chromatic number of this graph = 3
We can not properly color this graph with less than 3 colors.

Common Types of Graphs and their Chromatic numbers-


1. Cycle Graphs-
A simple graph having ‘n’ vertices (n>=3) and n edges is called a cycle graph if all its edges form a cycle
of length ‘n’.
OR
A cycle graph is a graph where degree of each vertex is 2.

Chromatic Number
• If number of vertices in cycle graph is even, then its chromatic number = 2
• If number of vertices in cycle graph is odd, then its chromatic number = 3

Examples-

2. Planar Graphs-
A planar graph is a graph that can be drawn in a plane such that none of its edges cross each other.
Chromatic Number
Chromatic Number of Planar Graphs = Less than or equal to 4

Examples-
All the above cycle graphs are also planar graphs where chromatic number of each graph is less than or
equal to 4.

3. Complete Graphs-
• A complete graph is a graph in which every two distinct vertices are joined by exactly one edge.
• In a complete graph, because each vertex is connected with every other vertex, so we need as many
different colors as there are number of vertices in the given graph in order to properly color the graph.

Chromatic Number
Chromatic Number of Complete Graphs = Number of vertices in the Complete
Graph

Examples-

4. Bipartite Graphs-
A bipartite graph consists of two sets of vertices X and Y. The edges only join vertices in X to vertices in
Y, not vertices within a set.

Chromatic Number
Chromatic Number of Bipartite Graphs = 2

Example-
5. Trees-
• A tree is a special type of connected graph in which there are no circuits.
• Every tree is a bipartite graph, so chromatic number of tree with n vertices = 2.

Chromatic Number
Chromatic Number of any tree = 2

Examples-

You might also like