Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Finding the simple non-isomorphic graphs with n vertices in a graph
Two graphs are isomorphic if one can be transformed into the other by renaming its vertices. In other words, they have the same structure even if the vertices are labeled differently. Non-isomorphic graphs are graphs that have genuinely different structures − no renaming of vertices can make one look like the other.
When counting simple non-isomorphic graphs with n vertices, we look for all structurally distinct graphs possible, ignoring vertex labels.
Problem Statement
How many simple non-isomorphic graphs are possible with 3 vertices?
Solution
With 3 vertices, there are at most ⌈3C2⌉ = 3 possible edges. A simple graph can include any subset of these edges, giving 23 = 8 total labeled graphs. However, many of these are isomorphic to each other. After grouping by structure, there are 4 non-isomorphic graphs possible −
The four non-isomorphic graphs with 3 vertices are −
| Graph | Edges | Degree Sequence | Description |
|---|---|---|---|
| Graph 1 | 0 | (0, 0, 0) | No edges − all vertices isolated |
| Graph 2 | 1 | (0, 1, 1) | One edge connecting two vertices |
| Graph 3 | 2 | (1, 1, 2) | A path through all three vertices |
| Graph 4 | 3 | (2, 2, 2) | Complete graph K3 (triangle) |
Note that any graph with 1 edge is isomorphic to any other graph with 1 edge (just rename the vertices), and likewise for 2 edges. That is why there is exactly one non-isomorphic graph for each edge count.
Conclusion
There are 4 simple non-isomorphic graphs with 3 vertices, one for each possible edge count from 0 to 3. The degree sequence is a useful tool for distinguishing non-isomorphic graphs, since isomorphic graphs always share the same degree sequence.
