Bug introduced in 9.0 or earlier and fixed in 10.4

How can two graphs with zero edges on four vertices, not be isomorphic? What am I missing?

one = Graph[Range[1, 4], {}]
two = EdgeDelete[Graph[Range[1, 4], {1 <-> 2}], {1 <-> 2}]
IsomorphicGraphQ[one, two]

This returns False under Mathematica 10.1.

  • 1
    $\begingroup$ It returns True in 11.0.1 $\endgroup$ Feb 18, 2017 at 5:59
  • 1
    $\begingroup$ Related: mathematica.stackexchange.com/q/88582/12 That other problem is also about the failure to consider empty graphs isomorphic, but that one is present in 10.4 as well. Yours is not present in 10.4. $\endgroup$
    – Szabolcs
    Feb 18, 2017 at 9:30

1 Answer 1


As Anjan Kumar says this works in 11.0.1, this is probably yet another stupid bug in Mathematica's graph handling. The following works correctly in 10.1:

IsomorphicGraphQ[one, AdjacencyGraph[AdjacencyMatrix[two]]]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.