In[]:=
MultiwayGrowthListHashSet[rule_,init_List,t_]:=Last/@NestList[Function[s, {Join[First[s],#],#}&[Module[{list,hashSet}, Normal[CreateDataStructure["HashSet"]["Union",Flatten[StringReplaceList[Last[s],rule]]]["Complement",First[s]]]]]],{{},init},t]
growth[rule_,init_List,steps_]:=Length/@MultiwayGrowthListHashSet[rule,init,steps]
In[]:=
growth[{"AA""A","AB""ABA"},{"ABABBA"},5]
Out[]=
{1,2,5,7,11,16}
In[]:=
ResourceFunction["MultiwaySystem"][{"AA""A","AB""ABA"},ResourceFunction["StringTuples"]["AB",3],5,"StatesGraphStructure"]
Out[]=
In[]:=
ResourceFunction["MultiwaySystem"][{"AA""A","AB""ABA"},ResourceFunction["StringTuples"]["AB",3],5,"StatesGraph"]
Out[]=
The dimension/growth is determined by the number of Bs
Can it sometimes be exponential and sometimes be polynomial?
In[]:=
ResourceFunction["EnumerateSubstitutionSystemRules"][{21,23},2]
Out[]=
{{AAA,AAAAA},{AAA,AAAAB},{AAA,AAABA},{AAA,AAABB},{AAA,AABAB},{AAA,AABBB},{AAA,ABAAA},{AAA,ABAAB},{AAA,ABABA},{AAA,ABABB},{AAA,ABBAA},{AAA,ABBAB},{AAA,ABBBA},{AAA,ABBBB},{AAA,BBAAA},{AAA,BBAAB},{AAA,BBABA},{AAA,BBABB},{AAA,BBBAB},{AAA,BBBBB},{AAB,AAAAA},{AAB,AAAAB},{AAB,AAABA},{AAB,AAABB},{AAB,AABAB},{AAB,AABBB},{AAB,ABAAA},{AAB,ABAAB},{AAB,ABABA},{AAB,ABABB},{AAB,ABBAA},{AAB,ABBAB},{AAB,ABBBA},{AAB,ABBBB},{AAB,BBAAA},{AAB,BBAAB},{AAB,BBABA},{AAB,BBABB},{AAB,BBBAB},{AAB,BBBBB},{ABA,AAAAA},{ABA,AAAAB},{ABA,AAABA},{ABA,AAABB},{ABA,AABAA},{ABA,AABAB},{ABA,AABBA},{ABA,AABBB},{ABA,ABAAA},{ABA,ABAAB},{ABA,ABABA},{ABA,ABABB},{ABA,ABBAA},{ABA,ABBAB},{ABA,ABBBA},{ABA,ABBBB},{ABA,BAAAA},{ABA,BAAAB},{ABA,BAABA},{ABA,BAABB},{ABA,BABAA},{ABA,BABAB},{ABA,BABBA},{ABA,BABBB},{ABA,BBAAA},{ABA,BBAAB},{ABA,BBABA},{ABA,BBABB},{ABA,BBBAA},{ABA,BBBAB},{ABA,BBBBA},{ABA,BBBBB}}
In[]:=
ResourceFunction["ParallelMapMonitored"][TimeConstrained[growth[#,ResourceFunction["StringTuples"]["AB",3],20],5]&,ResourceFunction["EnumerateSubstitutionSystemRules"][{21,23},2]]
Out[]=
In[]:=
FindLinearRecurrence[Drop[#,4]]&/@%10
Out[]=
{{1},{2,-1},{1},{1},{1},{1},{1},{1},{2,-1},{1},FindLinearRecurrence[{1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}],{2,-1},{1},{1},{1},{1},{1},{2,-1},{1},{1},{1,0,1},{2,-1},{1},{1},{1},{1},{1},{1,0,1},{1,0,1},{1},FindLinearRecurrence[{4,5,4,3,3,4,3,3,4,3,3,4,3,3,4,3,3}],{2,-1},FindLinearRecurrence[{1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}],{1},{1},{1},{1},{1,0,1},{1},{1},{1},{2,-1},{1},{1},{2,-1},{1},{1},{1},{1},{1},{2,-1},{1},{1},{2,-1},{1},{1},{1},{1},{2,-1},FindLinearRecurrence[{1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}],{1},{2,-1},{1},{1},{1},{1},{1},{2,-1},{1},{1},{2,-1},{1}}
What is the spectrum of growths for a given rule, and different initial conditions?
What is the spectrum of growths for a given rule, and different initial conditions?
growthClassification[growth[{"AA""B","AB""BAA"},{"AABBBB"},15],0.1,1]{5,E^Log[x]^2.13713}
In[]:=
g20=growth[{"AA""B","AB""BAA"},{"AABBBB"},20]
Out[]=
{1,2,3,7,15,31,63,123,228,401,684,1140,1854,2945,4594,7071,10738,16106,23924,35296,51838}
In[]:=
ListLinePlot[Log[%]]
Out[]=
In[]:=
Ratios[g20]//N
Out[]=
{2.,1.5,2.33333,2.14286,2.06667,2.03226,1.95238,1.85366,1.75877,1.70574,1.66667,1.62632,1.58846,1.55993,1.53918,1.5186,1.49991,1.48541,1.47534,1.46867}
In[]:=
ListLinePlot[%]
Out[]=
In[]:=
ParallelMap[Labeled[ListLinePlot[Quiet@Ratios[growth[{"AA""B","AB""BAA"},{#},20]],ImageSizeTiny],#]&,ResourceFunction["StringTuples"]["AB",3]]
Cf renormalization group mapping
Cf renormalization group mapping