4
$\begingroup$

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.

$\endgroup$
2
  • 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

3
$\begingroup$

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]]]
$\endgroup$

Your Answer

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

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