In[]:=
ccg=ResourceFunction["SubstitutionSystemCausalGraph"][{"AB""BAAB","A""BA"},"AB",5]
Out[]=
In[]:=
LayeredGraphPlot[ResourceFunction["SubstitutionSystemCausalGraph"][{"AB""BAAB","A""BA"},"AB",5],AspectRatio1/2,VertexLabels->Automatic]
Out[]=
In[]:=
VertexOutDegree[ccg]
Out[]=
{3,1,2,3,3,1,2,1,2,3,3,3,3,1,2,1,2,1,2,1,2,3,3,3,3,3,3,3,3,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
In[]:=
Position[%,0]//Flatten
Out[]=
{62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93}
In[]:=
CausalConnectionGraph[ccg,{1,2,3},{62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93},"Full"]
In[]:=
Graph[CausalConnectionGraph[ccg,Range[9],{62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93},"Full"],VertexLabelsAutomatic]
Out[]=
In[]:=
ConnectedComponents[%116]
Out[]=
{{6},{2,4,7},{8},{5,9},{1,3}}
In[]:=
Graph[CausalConnectionGraph[ccg,Range[9],{62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93}],VertexLabelsAutomatic]
Out[]=
l={1,2};g=CycleGraph[5,VertexLabelsAutomatic];VertexReplace[VertexContract[g,{1,2}],First[l]l]
In[]:=
CausalConnectionGraph[ResourceFunction["SubstitutionSystemCausalGraph"][{"AB""BAAB","A""BA"},"AB",#]&,2,3]
Out[]=
In[]:=
CausalConnectionGraph[ResourceFunction["SubstitutionSystemCausalGraph"][{"AB""BAAB","A""BA"},"AB",#]&,2,2]
Out[]=
In[]:=
CausalConnectionGraph[ResourceFunction["SubstitutionSystemCausalGraph"][{"AB""BAAB","A""BA"},"AB",#]&,2,4,"Full"]
Out[]=
BH rule
BH rule