Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Determine whether two orderless (undirected) hypergraphs are isomorphic
Determine that two hypergraphs are isomorphic:
| In[1]:= | ![ResourceFunction[
 "IsomorphicHypergraphQ"][{{a, e, d}, {d, c}, {c, b}, {b, a}}, {{2, 4}, {4, 5, 1}, {1, 3}, {3, 2}}]](https://www.wolframcloud.com/obj/resourcesystem/images/e81/e815d0fe-37b3-44a0-9395-b9568cd3efb0/6178fb2352819a64.png) | 
| Out[1]= |  | 
Determine that two hypergraphs are not isomorphic:
| In[2]:= | ![ResourceFunction[
 "IsomorphicHypergraphQ"][{{a, e, d}, {d, c}, {c, b}, {b, a}}, {{2, 4}, {4, 3, 1}, {1, 3}, {5, 2}}]](https://www.wolframcloud.com/obj/resourcesystem/images/e81/e815d0fe-37b3-44a0-9395-b9568cd3efb0/74800b8cd76efdaa.png) | 
| Out[2]= |  | 
Lists of hyperedges that are isomorphic as orderless hypergraphs may not be isomorphic as ordered hypergraphs:
| In[3]:= | ![ResourceFunction[
 "IsomorphicHypergraphQ"][{{1, 2}, {2, 3}, {3, 4}, {4, 5}}, {{1, 2}, {2, 3}, {3, 4}, {1, 5}}]](https://www.wolframcloud.com/obj/resourcesystem/images/e81/e815d0fe-37b3-44a0-9395-b9568cd3efb0/4152f66bcb89979b.png) | 
| Out[3]= |  | 
IsomorphicHypergraphQ also works for standard undirected graphs:
| In[4]:= | ![ResourceFunction[
 "IsomorphicHypergraphQ"][{{a, d}, {d, c}, {c, b}, {b, a}}, {{2, 4}, {4, 1}, {1, 3}, {3, 2}}]](https://www.wolframcloud.com/obj/resourcesystem/images/e81/e815d0fe-37b3-44a0-9395-b9568cd3efb0/0ac087f0ea75bbb3.png) | 
| Out[4]= |  | 
In this case, it is functionally equivalent to IsomorphicGraphQ:
| In[5]:= | ![IsomorphicGraphQ[Graph[{a <-> d, d <-> c, c <-> b, b <-> a}], Graph[{2 <-> 4, 4 <-> 1, 1 <-> 3, 3 <-> 2}]]](https://www.wolframcloud.com/obj/resourcesystem/images/e81/e815d0fe-37b3-44a0-9395-b9568cd3efb0/457291c5dacdff4a.png) | 
| Out[5]= |  | 
Furthermore, IsomorphicHypergraphQ supports isomorphism testing on multihypergraphs (i.e. hypergraphs with multihyperedges):
| In[6]:= | ![ResourceFunction[
 "IsomorphicHypergraphQ"][{{1, 2}, {1, 2}, {1, 3}, {1, 3}, {2, 4}, {3,
    4}, {4, 1}}, {{1, 2}, {1, 2}, {1, 3}, {2, 3}, {3, 4}, {3, 4}, {4, 1}}]](https://www.wolframcloud.com/obj/resourcesystem/images/e81/e815d0fe-37b3-44a0-9395-b9568cd3efb0/7c9d4fab59a8448d.png) | 
| Out[6]= |  | 
This work is licensed under a Creative Commons Attribution 4.0 International License