WOLFRAM NOTEBOOK

In[]:=
CirculantSexticToHexagonalToroidal[{a_,b_,mod_}]:=Module[{triangles,graph},triangles=Union[Sort/@Flatten[Table[Mod[{{0,b,a+b},{a,0,a+b}}+n,mod,1],{n,1,mod}],1]];If[Length[triangles]2mod,graph=Graph[UndirectedEdge@@@Select[Subsets[triangles,{2}],Length[Intersection@@#]2&]],Return["not valid"]];If[ConnectedGraphQ[graph]&&Length[FindCycle[graph,{3},All]]<4mod,CanonicalGraph[graph],"not valid"]];
In[]:=
CirculantSexticToHexagonalToroidal[{20,37,300}]
Out[]=
In[]:=
Graph3D[%]
Out[]=
In[]:=
CirculantSexticToHexagonalToroidal[{17,11,300}]
Out[]=
In[]:=
Graph3D[%]
Out[]=
In[]:=
Graph3D[TorusGraph[{30,30}]]
Out[]=
In[]:=
Graph3D[TorusGraph[{10,10,10}]]
Out[]=
Wolfram Cloud

You are using a browser not supported by the Wolfram Cloud

Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.


I understand and wish to continue anyway »

You are using a browser not supported by the Wolfram Cloud. Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.