Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You can test if $G_1\cong G_2$ using the following function f.

sage: f = lambda g,h: g.is_isomorphic(h)
sage: G = graphs.CubeGraph(3)
sage: H = graphs.HexahedralGraph()
sage: f(G,H)

If you really want to use the canonical label then, given a Graph g, you can obtain it by using g.canonical_label() and then just compare the adjacency matrices.