Mathematics | Graph Isomorphisms and Connectivity

Isomorphism :

Consider the following two graphs –

Are the graphs G and G^{\prime} the same?

If your answer is no, then you need to rethink. The graphical arrangement of the vertices and edges makes them look different but nevertheless they are the same graph. Also notice that the graph G^{\prime} is a cycle, specifically C_{5}. To know about cycle graphs read Graph Theory Basics.

“The simple graphs G_{1} = (V_{1}, E_{1}) and G_{2} = (V_{2}, E_{2}) are isomorphic if there is a bijective function f from V1 to V2 with the property that a and b are adjacent in G_{1} if and only if f(a) and f(b) are adjacent in G_{2}\:\forall a,b \in V_{1}.”

Example : Show that the graphs G and G^{\prime} mentioned above are isomorphic.

Solution : Let f be a bijective function from V to V^{\prime}.
Let the correspondence between the graphs be-
v1^{\prime} = f(v1)
v2^{\prime} = f(v5)
v3^{\prime} = f(v3)
v4^{\prime} = f(v4)
v5^{\prime} = f(v2)
The above correspondence preserves adjacency as-
v1 is adjacent to v2 and v3 in G, and
f(v1) = v1^{\prime} is adjacent to f(v2) = v5 and f(v3) = v3 in G^{\prime}
Similarly, it can be shown that the adjacency is preserved for all vertices.
Hence, G and G^{\prime} are isomorphic.

Proving that the above graphs are isomorphic was easy since the graphs were small, but it is often difficult to determine whether two simple graphs are isomorphic. This is because there are n! possible bijective functions between the vertex sets of two simple graphs with n vertices. Testing the correspondence for each of the functions is impractical for large values of n.
Although sometimes it is not that hard to tell if two graphs are not isomorphic. In order to prove that the given graphs are not isomorphic, we could find out some property which is characteristic of one graph and not the other. If they were isomorphic then the property would be preserved, but since it is not, the graphs are not isomorphic.
Such a property that is preserved by isomorphism is called graph-invariant.

Some graph-invariants include- the number of vertices, the number of edges, degrees of the vertices, and length of cycle etc.

Important Note : The complementary of a graph has the same vertices and has edges between any two vertices if and only if there was no edge between them in the original graph. Consequently, a graph G is said to be self-complementary if the graph and its complement are isomorphic.

Connectivity :

Most problems that can be solved by graphs, deal with finding optimal paths, distances or other similar information. Almost all of these problems involves finding paths between graph nodes.

Path – A path of length n from u to v is a sequence of n edges e_{1},...,e_{n} such that e_{1} is associated with \{x_{0}, x_{1}\}, and so on, with e_{n} associated with \{x_{n-1}, x_{n}\}, where x_{0} = u and x_{n} = v.

Note : A path is called a circuit if it begins and ends at the same vertex. It is also called a cycle.

Connectivity of a graph is an important aspect since it measures the resilience of the graph.
“A undirected graph is said to be connected if there is a path between every pair of distinct vertices of the graph.”

Connected Component – A connected component of a graph G is a connected subgraph of G that is not a proper subgraph of another connected subgraph of G.

For example, in the following diagram, graph G_{1} is connected and graph G_{2} is disconnected. Since G_{1} is connected there is only one connected component.
But in case of G_{2} there are three connected components.

In case the graph is directed, the notions of connectedness have to be changed a bit. This is because of the directions that the edges have.

“A directed graph is said to be strongly connected if there is a path from a to b and b to a where a and b are vertices in the graph. The graph is weakly connected if the underlying undirected graph is connected.”

Strongly Connected Component –
Analogous to connected components in undirected graphs, a strongly connected component is a subgraph of a directed graph that is not contained within another strongly connected component.

Articulation points –

The removal of a vertex and all the edges incident with it may result in a subgraph which has more connected components than in the original graphs. Such vertices are called articulation points or cut vertices.
Analogous to cut vertices are cut edge the removal of which results in a subgraph with more connected components. A cut-edge is also called a bridge.

Cut set – In a connected graph G, a cut-set is a set of edges which when removed from G leaves G disconnected, provided there is no proper subset of these edges disconnects G.

Paths and Isomorphisms –

Sometimes even though two graphs are not isomorphic, their graph invariants- number of vertices, number of edges, and degrees of vertices all match. In this case paths and circuits can help differentiate between the graphs.

  • Example – Are the two graphs shown below isomorphic?
  • Solution – Both the graphs have 6 vertices, 9 edges and the degree sequence is the same. However the second graph has a circuit of length 3 and the minimum length of any circuit in the first graph is 4. Hence the given graphs are not isomorphic.

GATE CS Corner Questions

Practicing the following questions will help you test your knowledge. All questions have been asked in GATE in previous years or in GATE Mock Tests. It is highly recommended that you practice them.

1. GATE CS 2013, Question 24
2. GATE CS 2012, Question 26
3. GATE CS 2012, Question 38
4. GATE CS 2014 Set-1, Question 13
5. GATE CS 2014 Set-2, Question 61
6. GATE CS 2015 Set-2, Question 38
7. GATE CS 2015 Set-2, Question 60


Graph Isomorphism – Wikipedia
Graph Connectivity – Wikipedia
Discrete Mathematics and its Applications, by Kenneth H Rosen

This article is contributed by Chirag Manwani. If you like GeeksforGeeks and would like to contribute, you can also write an article using or mail your article to See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.

My Personal Notes arrow_drop_up

Recommended Posts:

2 Average Difficulty : 2/5.0
Based on 1 vote(s)

User Actions