This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

IndexGraph

IndexGraph[g]
replaces the vertices of the graph g by its vertex indexes.
IndexGraph
replaces the vertices with integers r, , ....
Replace the vertices of the graph with its vertex indexes:
Replace the vertices with indexes starting from 6:
Replace the vertices of the graph with its vertex indexes:
In[1]:=
Click for copyable input
Out[1]=
 
Replace the vertices with indexes starting from 6:
In[1]:=
Click for copyable input
Out[1]=
IndexGraph works with undirected graphs:
Directed graphs:
Replace the vertices with negative indexes:
Works with large graphs:
Create a graph that is isomorphic to the original graph:
Find an isomorphism that maps two graphs:
Highlight and label two graphs according to the mapping:
IndexGraph has the same number of vertices as the original graph:
IndexGraph has the same number of edges as the original graph:
IndexGraph is isomorphic to the original graph:
Use VertexReplace to replace the vertices of the graph:
IndexGraph has the same adjacency matrix as the original graph:
New in 8