2
$\begingroup$

Version: Mathematica 13.0

IsomorphicSubgraphQ is used to determine whether a graph has a subgraph isomorphic to another graph. It was introduced by Mathematica 13. But it seems that there is a bug in IsomorphicSubgraphQ.

G1 = Graph[
  ImportString["W|tNHEpCKoh`@@Po_WHB@CKC?WGO{G?KKCB`?OMG?_y_?Sn", 
   "Graph6"], VertexLabels -> Automatic]; 

![enter image description here

The graph below is a subgraph of the graph above.

subG1 = 
 Graph[ImportString["SsCAJ?`K?O`?@@@??WG@B?M??K??EG??{", "Graph6"], 
  VertexLabels -> Automatic];

enter image description here

But here's the “surprise”:

IsomorphicSubgraphQ[subG1, G1]

False

IGSubisomorphicQ in IGraphM backpack gives the right answer: True.

<< IGraphM`
IGSubisomorphicQ[subG1, G1]

True

$\endgroup$
4
  • $\begingroup$ I have Mathematica 13.0 version too but it returned me True. Isn't it an error on your side? $\endgroup$ Aug 20, 2022 at 13:08
  • $\begingroup$ That's weird. Are you running on the Windows version? $\endgroup$
    – licheng
    Aug 20, 2022 at 13:17
  • $\begingroup$ Yes, Windows 10. Restart kernel and try again. $\endgroup$ Aug 20, 2022 at 13:19
  • $\begingroup$ @azerbajdzan Thanks. I tried your way and it didn't work. Maybe some of the files were corrupted. I don't know why, I updated it to 13.1, now it's OK $\endgroup$
    – licheng
    Aug 21, 2022 at 9:16

1 Answer 1

3
$\begingroup$

OK in version 13.1 on Windows 10:

G1 = Graph[ImportString["W|tNHEpCKoh`@@Po_WHB@CKC?WGO{G?KKCB`?OMG?_y_?Sn", 
"Graph6"], VertexLabels -> Automatic]
subG1 = Graph[ImportString["SsCAJ?`K?O`?@@@??WG@B?M??K??EG??{", "Graph6"], 
VertexLabels -> Automatic]
IsomorphicSubgraphQ[subG1, G1]

True

$\endgroup$
1
  • $\begingroup$ Thanks for telling, it seems to be fixed in the new version. I did not see any any record of it being fixed on the new 13.1 feature though. $\endgroup$
    – licheng
    Aug 20, 2022 at 12:40

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.