![]() |
VOOZH | about |
Graph isomorphism and automorphism are important concepts in graph theory. Graph isomorphism checks the equivalence of two graphs, while graph automorphism deals with the symmetry within a single graph. Using Python NetworkX, we can easily explore and visualize these concepts, making it a valuable tool for studying complex networks.
Characteristics | Graph Isomorphism | Graph Automorphism |
|---|---|---|
Definition | A bijective mapping between the vertices of two graphs preserving the adjacency. | A re-labeling of the graph's vertices that maps the graph onto itself. |
Relationship | Between the two different graphs. | Within the same graph. |
Purpose | To check if two graphs are structurally identical. | To find symmetries within the graph. |
Example Code Usage | nx.is_isomorphic(G1, G2) | nx.algorithms.isomorphism.GraphMatcher(graph, graph).isomorphisms_iter() |
Real-world Example | Checking if two social networks are identical. | Finding symmetrical properties in the molecular structures. |
Graph isomorphism is a concept where two graphs and are considered isomorphic if there is a bijection (one-to-one correspondence) between their vertex sets that preserves adjacency. In simpler terms, if you can relabel the vertices of to make it identical to , the two graphs are isomorphic.
Graph isomorphism is important in various fields, including chemistry (for comparing molecular structures), network theory, and computer science (for pattern recognition and data structure analysis).
Two graphs are isomorphic if there exists a bijection such that any two vertices are adjacent in if and only if are adjacent in .
Example:
Output:
Are G1 and G2 isomorphic? TrueGraph automorphism is a special case of graph isomorphism where a graph GGG is mapped onto itself in a way that preserves its structure. An automorphism of a graph is a permutation of the vertices that preserves adjacency.
Graph automorphisms are significant in studying the symmetries of graphs, which has applications in chemistry (studying molecular symmetries), network theory (analyzing symmetrical structures in networks), and combinatorial design.
A graph has an automorphism if there exists a bijection such that any two vertices are adjacent if and only if are adjacent.
Example:
Output:
Automorphisms of G: [{0: 0, 1: 1, 2: 2}, {0: 0, 2: 1, 1: 2}, {1: 0, 0: 1, 2: 2}, {1: 0, 2: 1, 0: 2}, {2: 0, 0: 1, 1: 2}, {2: 0, 1: 1, 0: 2}]