A very efficient method for determing whether two graphs (of the same format) are isomorphic.
i1 : G = graph {{1,2},{2,3},{3,4},{4,5},{1,5}}; |
i2 : H = graph {{1,3},{3,5},{5,2},{2,4},{4,1}}; |
i3 : I = graph {{1,2},{1,3},{1,4},{1,5},{2,3},{2,4},{2,5},{3,4},{3,5},{4,5}}; |
i4 : areIsomorphic(G, H) o4 = true |
i5 : G == H o5 = true |
i6 : areIsomorphic(G, I) o6 = false |
i7 : G == "Dhc" o7 = true |
i8 : I == "Dhc" o8 = false |
The object areIsomorphic is a method function.