WOLFRAM NOTEBOOK

In[]:=
allsigs={{11},{12},{13},{22},{11,11},{14},{23},{11,12},{12,11},{15},{24},{33},{11,13},{13,11},{11,22},{12,12},{12,21},{21,12},{22,11},{11,11,11},{16},{25},{34},{11,14},{14,11},{11,23},{12,13},{12,31},{13,12},{13,21},{21,13},{23,11},{31,12},{12,22},{22,12},{11,11,12},{11,12,11},{12,11,11}};
In[]:=
MultiwaySystem[{"A""AA","A""B"},"A",5]
Out[]=
{{A},{AA,B},{AAA,AB,BA},{AAAA,AAB,ABA,BAA,BB},{AAAAA,AAAB,AABA,ABAA,ABB,BAAA,BAB,BBA},{AAAAAA,AAAAB,AAABA,AABAA,AABB,ABAAA,ABAB,ABBA,BAAAA,BAAB,BABA,BBAA,BBB}}
In[]:=
gm=MultiwaySystem[{"A""AA","A""B"},"A",5,"StatesGraph"]
Out[]=
In[]:=
VertexList[gm]
Out[]=
{A,AA,B,AAA,AB,BA,AAAA,AAB,ABA,BAA,BB,AAAAA,AAAB,AABA,ABAA,ABB,BAAA,BAB,BBA,AAAAAA,AAAAB,AAABA,AABAA,AABB,ABAAA,ABAB,ABBA,BAAAA,BAAB,BABA,BBAA,BBB}
In[]:=
GraphNeighborhoodVolumes[gm,{"A"},Automatic]
Out[]=
A{1,3,6,11,19,32}
In[]:=
GraphNeighborhoodVolumes[MultiwaySystem[{"A""AA","A""B"},"A",10,"StatesGraph"],{"A"},Automatic]
Out[]=
A{1,3,6,11,19,32,53,87,142,231,375}

Basic function:

In[]:=
MWGrowth[rule_,inits_,t_Integer]:=GraphNeighborhoodVolumes[MultiwaySystem[rule,inits,t,"StatesGraph"],inits,Automatic]
In[]:=
EnumerateSubstitutionSystemRules[{11,12},2]
Out[]=
In[]:=
ParallelMapMonitored[MWGrowth[#,StringTuples["AB",3],15]&,EnumerateSubstitutionSystemRules[{11,12},2]]
(kernel 65)
BreadthFirstScan::inv:The argument BBB in
BreadthFirstScan[Graph[<20>, <25>], BBB, {DiscoverVertex -> ((If[Greater[<<2>>], Throw[<<2>>]]; If[Greater[<<2>>], CompoundExpression[<<2>>]]; FunctionRepository`$844172c161324b318cee0545f605f2b2`vertexCounter$68548++) & )}]
is not a valid vertex.
(kernel 68)
BreadthFirstScan::inv:The argument BBB in
BreadthFirstScan[Graph[<232>, <330>], BBB, {DiscoverVertex -> ((If[Greater[<<2>>], Throw[<<2>>]]; If[Greater[<<2>>], CompoundExpression[<<2>>]]; FunctionRepository`$844172c161324b318cee0545f605f2b2`vertexCounter$71005++) & )}]
is not a valid vertex.
(kernel 67)
BreadthFirstScan::inv:The argument BBB in
BreadthFirstScan[Graph[<1152>, <2595>], BBB, {DiscoverVertex -> ((If[Greater[<<2>>], Throw[<<2>>]]; If[Greater[<<2>>], CompoundExpression[<<2>>]]; FunctionRepository`$844172c161324b318cee0545f605f2b2`vertexCounter$68821++) & )}]
is not a valid vertex.
Out[]=
In[]:=
ParallelMapMonitored[#({#,Differences[#],Ratios[#]}&[MeanAround/@Transpose[Values[MWGrowth[#,StringTuples["AB",3],15]]]])&,EnumerateSubstitutionSystemRules[{11,12},2]]
(kernel 65)
BreadthFirstScan::inv:The argument BBB in
BreadthFirstScan[Graph[<20>, <25>], BBB, {DiscoverVertex -> ((If[Greater[<<2>>], Throw[<<2>>]]; If[Greater[<<2>>], CompoundExpression[<<2>>]]; FunctionRepository`$844172c161324b318cee0545f605f2b2`vertexCounter$68567++) & )}]
is not a valid vertex.
(kernel 68)
BreadthFirstScan::inv:The argument BBB in
BreadthFirstScan[Graph[<232>, <330>], BBB, {DiscoverVertex -> ((If[Greater[<<2>>], Throw[<<2>>]]; If[Greater[<<2>>], CompoundExpression[<<2>>]]; FunctionRepository`$844172c161324b318cee0545f605f2b2`vertexCounter$71024++) & )}]
is not a valid vertex.
(kernel 67)
BreadthFirstScan::inv:The argument BBB in
BreadthFirstScan[Graph[<1152>, <2595>], BBB, {DiscoverVertex -> ((If[Greater[<<2>>], Throw[<<2>>]]; If[Greater[<<2>>], CompoundExpression[<<2>>]]; FunctionRepository`$844172c161324b318cee0545f605f2b2`vertexCounter$68840++) & )}]
is not a valid vertex.
Out[]=
In[]:=
Last[%524]
Out[]=
In[]:=
If[Length[#[[2,1]]]<5,Nothing,First[#](ListPlot[#,PlotTheme"Minimal",PlotRange{0,Automatic},Ticks{None,Automatic}]&/@Last[#])]&/@%524
Out[]=
In[]:=
ParallelEvaluate[Off[BreadthFirstScan::inv]]
Out[]=
{Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null,Null}
In[]:=
Map[If[Length[#[[2,1]]]<5,Nothing,First[#](ListPlot[#,PlotTheme"Minimal",PlotRange{0,Automatic},Ticks{None,Automatic}]&/@Last[#])]&/@ParallelMapMonitored[TimeConstrained[#({#,Differences[#],Ratios[#]}&[MeanAround/@Transpose[Values[MWGrowth[#,StringTuples["AB",3],15]]]]),15]&,EnumerateSubstitutionSystemRules[#,2]]]&/@Take[allsigs,3]
(kernel 68)
BreadthFirstScan::inv:The argument BBB in
BreadthFirstScan[Graph[<7>, <0>], BBB, {DiscoverVertex -> ((If[Greater[<<2>>], Throw[<<2>>]]; If[Greater[<<2>>], CompoundExpression[<<2>>]]; FunctionRepository`$844172c161324b318cee0545f605f2b2`vertexCounter$71131++) & )}]
is not a valid vertex.
(kernel 68)
BreadthFirstScan::inv:The argument BBB in
BreadthFirstScan[Graph[<232>, <330>], BBB, {DiscoverVertex -> ((If[Greater[<<2>>], Throw[<<2>>]]; If[Greater[<<2>>], CompoundExpression[<<2>>]]; FunctionRepository`$844172c161324b318cee0545f605f2b2`vertexCounter$71149++) & )}]
is not a valid vertex.
(kernel 67)
BreadthFirstScan::inv:The argument BBB in
BreadthFirstScan[Graph[<1152>, <2595>], BBB, {DiscoverVertex -> ((If[Greater[<<2>>], Throw[<<2>>]]; If[Greater[<<2>>], CompoundExpression[<<2>>]]; FunctionRepository`$844172c161324b318cee0545f605f2b2`vertexCounter$68965++) & )}]
is not a valid vertex.
(kernel 65)
BreadthFirstScan::inv:The argument BBB in
BreadthFirstScan[Graph[<20>, <25>], BBB, {DiscoverVertex -> ((If[Greater[<<2>>], Throw[<<2>>]]; If[Greater[<<2>>], CompoundExpression[<<2>>]]; FunctionRepository`$844172c161324b318cee0545f605f2b2`vertexCounter$68675++) & )}]
is not a valid vertex.
(kernel 61)
BreadthFirstScan::inv:The argument BBB in
BreadthFirstScan[Graph[<20>, <25>], BBB, {DiscoverVertex -> ((If[Greater[<<2>>], Throw[<<2>>]]; If[Greater[<<2>>], CompoundExpression[<<2>>]]; FunctionRepository`$844172c161324b318cee0545f605f2b2`vertexCounter$54154++) & )}]
is not a valid vertex.
(kernel 68)
BreadthFirstScan::inv:The argument BBB in
BreadthFirstScan[Graph[<232>, <330>], BBB, {DiscoverVertex -> ((If[Greater[<<2>>], Throw[<<2>>]]; If[Greater[<<2>>], CompoundExpression[<<2>>]]; FunctionRepository`$844172c161324b318cee0545f605f2b2`vertexCounter$71167++) & )}]
is not a valid vertex.
(kernel 63)
BreadthFirstScan::inv:The argument BBB in
BreadthFirstScan[Graph[<1272>, <2805>], BBB, {DiscoverVertex -> ((If[Greater[<<2>>], Throw[<<2>>]]; If[Greater[<<2>>], CompoundExpression[<<2>>]]; FunctionRepository`$844172c161324b318cee0545f605f2b2`vertexCounter$60990++) & )}]
is not a valid vertex.
(kernel 62)
BreadthFirstScan::inv:The argument BBB in
BreadthFirstScan[Graph[<1152>, <2595>], BBB, {DiscoverVertex -> ((If[Greater[<<2>>], Throw[<<2>>]]; If[Greater[<<2>>], CompoundExpression[<<2>>]]; FunctionRepository`$844172c161324b318cee0545f605f2b2`vertexCounter$62910++) & )}]
is not a valid vertex.
(kernel 65)
BreadthFirstScan::inv:The argument BBB in
BreadthFirstScan[Graph[<1152>, <2580>], BBB, {DiscoverVertex -> ((If[Greater[<<2>>], Throw[<<2>>]]; If[Greater[<<2>>], CompoundExpression[<<2>>]]; FunctionRepository`$844172c161324b318cee0545f605f2b2`vertexCounter$68693++) & )}]
is not a valid vertex.
During evaluation of In[537]:=
Part
:Part specification $Aborted2,1 is longer than depth of object.

Basic function:

From NKS

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.