ccg=ResourceFunction["SubstitutionSystemCausalGraph"][{"AB""BAAB","A""BA"},"AB",5]
In[]:=
Out[]=
LayeredGraphPlot[ResourceFunction["SubstitutionSystemCausalGraph"][{"AB""BAAB","A""BA"},"AB",5],AspectRatio1/2,VertexLabels->Automatic]
In[]:=
Out[]=
VertexOutDegree[ccg]
In[]:=
{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}
Out[]=
Position[%,0]//Flatten
In[]:=
{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}
Out[]=
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"],VertexLabelsAutomatic]
In[]:=
Out[]=
ConnectedComponents[%116]
In[]:=
{{6},{2,4,7},{8},{5,9},{1,3}}
Out[]=
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}],VertexLabelsAutomatic]
In[]:=
Out[]=
l={1,2};​​g=CycleGraph[5,VertexLabelsAutomatic];​​VertexReplace[VertexContract[g,{1,2}],First[l]l]
CausalConnectionGraph[ResourceFunction["SubstitutionSystemCausalGraph"][{"AB""BAAB","A""BA"},"AB",#]&,2,3]
In[]:=
Out[]=
CausalConnectionGraph[ResourceFunction["SubstitutionSystemCausalGraph"][{"AB""BAAB","A""BA"},"AB",#]&,2,2]
In[]:=
Out[]=
CausalConnectionGraph[ResourceFunction["SubstitutionSystemCausalGraph"][{"AB""BAAB","A""BA"},"AB",#]&,2,4,"Full"]
In[]:=
Out[]=
allrules32=
;
In[]:=
gres={#[[1]],CanonicalGraph[#[[2]]]}&/@ResourceFunction["ParallelMapMonitored"][Function[ru,TimeConstrained[With[{gs=CausalConnectionGraph[ResourceFunction["WolframModel"][ru,Automatic,#,"LayeredCausalGraph"]&,5,10]},{ru,IndexGraph[gs]}],5]],allrules32];
In[]:=
CountsFramedGraphLast[#],ImageSize{80,80},EdgeStyleDirective
,Thickness[Large],VertexStyle
,VertexSize.15,FrameStyleLightGray&/@gres
In[]:=

2239,
1788,
299,
153,
129,
71,
9,
5,
4,
2,
2,
1
Out[]=
Graph[ResourceFunction["WolframModel"][{{1,1},{1,1}}{{1,1},{1,1},{1,1}},Automatic,10,"LayeredCausalGraph"],VertexLabelsAutomatic]
In[]:=
Out[]=

BH rule

{{x,y},{z,y}}{{w,w},{w,x},{w,z}}
CausalConnectionGraph[ResourceFunction["WolframModel"][ru,Automatic,#,"LayeredCausalGraph"]&,5,10]
cglayers[ResourceFunction["WolframModel"][{{x,y},{z,y}}{{w,w},{w,x},{w,z}},Automatic,#,"LayeredCausalGraph"]&,{5,5}]
In[]:=
{6,7}
Out[]=
cglayers[ResourceFunction["WolframModel"][{{x,y},{z,y}}{{w,w},{w,x},{w,z}},Automatic,#,"LayeredCausalGraph"]&,{6,6}]
In[]:=
{8,9,10}
Out[]=
CausalConnectionGraph[ResourceFunction["WolframModel"][{{x,y},{z,y}}{{w,w},{w,x},{w,z}},Automatic,#,"LayeredCausalGraph"]&,5,10]
In[]:=
Out[]=
CausalConnectionGraph[ResourceFunction["WolframModel"][{{x,y},{z,y}}{{w,w},{w,x},{w,z}},Automatic,#,"LayeredCausalGraph"]&,5,11]
In[]:=
Out[]=
CausalConnectionGraph[ResourceFunction["WolframModel"][{{x,y},{z,y}}{{w,w},{w,x},{w,z}},Automatic,#,"LayeredCausalGraph"]&,5,12]
In[]:=
Out[]=
With[{g=ResourceFunction["WolframModel"][{{x,y},{z,y}}{{w,w},{w,x},{w,z}},Automatic,10,"LayeredCausalGraph"]},HighlightGraph[g,VertexOutComponent[g,6,10]]]
In[]:=
Out[]=
With[{g=ResourceFunction["WolframModel"][{{x,y},{z,y}}{{w,w},{w,x},{w,z}},Automatic,10,"LayeredCausalGraph"]},HighlightGraph[g,VertexOutComponent[g,7,10]]]
In[]:=
Out[]=
gres={#[[1]],CanonicalGraph[#[[2]]]}&/@ResourceFunction["ParallelMapMonitored"][Function[ru,TimeConstrained[With[{gs=CausalConnectionGraph[ResourceFunction["WolframModel"][ru,Automatic,#,"LayeredCausalGraph"]&,7,13]},{ru,IndexGraph[gs]}],5]],allrules32];
In[]:=
Part
:Part specification $Aborted〚1〛 is longer than depth of object.
Part
:Part specification $Aborted〚2〛 is longer than depth of object.
CanonicalGraph
:A graph object is expected at position 1 in CanonicalGraph[$Aborted〚2〛].
Part
:Part specification $Aborted〚1〛 is longer than depth of object.
General
:Further output of Part::partd will be suppressed during this calculation.
CanonicalGraph
:A graph object is expected at position 1 in CanonicalGraph[$Aborted〚2〛].
CanonicalGraph
:A graph object is expected at position 1 in CanonicalGraph[$Aborted〚2〛].
General
:Further output of CanonicalGraph::graph will be suppressed during this calculation.
CountsFramedGraphLast[#],ImageSize{80,80},EdgeStyleDirective
,Thickness[Large],VertexStyle
,VertexSize.15,FrameStyleLightGray&/@gres
In[]:=

1947,
1788,
189,
50,
149,
152,
GraphCanonicalGraph[$Aborted〚2〛],ImageSize{80,80},EdgeStyleDirective
,Thickness[Large],VertexStyle
,VertexSize0.15
251,
68,
5,
2,
29,
6,
5,
33,
7,
1,
11,
3,
1,
1,
1,
1,
1,
1
Out[]=
First/@GatherBy[gres,Last][[3]];
In[]:=
ResourceFunction["InteractiveListSelector"][ResourceFunction["WolframModel"][#,Automatic,10,"LayeredCausalGraph"]#&/@%]
In[]:=

Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add
,
Add

Clear
Copy
Out[]=
ResourceFunction["InteractiveListSelector"][ResourceFunction["ParallelMapMonitored"][ResourceFunction["WolframModel"][#,Automatic,10,{"LayeredCausalGraph","FinalStatePlot"}]#&,First/@GatherBy[gres,Last][[3]]]]
In[]:=
Out[]=
ResourceFunction["InteractiveListSelector"][ResourceFunction["ParallelMapMonitored"][ResourceFunction["WolframModel"][#,Automatic,10,{"LayeredCausalGraph","FinalStatePlot"}]#&,First/@GatherBy[gres,Last][[-2]]]]
In[]:=


,

Add

Clear
Copy
Out[]=
ResourceFunction["InteractiveListSelector"][ResourceFunction["ParallelMapMonitored"][ResourceFunction["WolframModel"][#,Automatic,10,{"LayeredCausalGraph","FinalStatePlot"}]#&,First/@GatherBy[gres,Last][[4]]]]
In[]:=
ResourceFunction["WolframModel"][{{1,1},{1,2}}{{2,2},{2,1},{1,3}},Automatic,10,{"LayeredCausalGraph","FinalStatePlot"}]
In[]:=

,

Out[]=
ResourceFunction["WolframModel"][{{1,2},{2,3}}{{2,3},{3,1},{4,1}},Automatic,10,{"LayeredCausalGraph","FinalStatePlot"}]
In[]:=

,

Out[]=
ResourceFunction["WolframModel"][{{1,2},{2,3}}{{2,3},{3,1},{4,1}},Automatic,11,"LayeredCausalGraph"]
In[]:=
Out[]=
(#[[1,2]]->ResourceFunction["InteractiveListSelector"][ResourceFunction["ParallelMapMonitored"][ResourceFunction["WolframModel"][#,Automatic,10,{"LayeredCausalGraph","FinalStatePlot"}]#&,First/@#]])&/@Select[GatherBy[gres,Last],Length[#]<200&]
In[]:=
Out[]=