WOLFRAM NOTEBOOK

In[]:=
MultiwayGrowthList[{"""A","""B"},{""},10,10000]
In[]:=
RandomMWRule[sig_,k_Integer]:=With[{ab=ToUpperCase[FromLetterNumber[Range[k]]]},Map[StringJoin[RandomChoice[ab,#]]&,sig,{2}]]
In[]:=
RandomMWRule[{24},2]
Out[]=
{BBABBA}
In[]:=
RandomMWRule[{24,51,35},2]
Out[]=
{ABBABA,BABAAA,ABAAAAAA}
In[]:=
ParallelMapMonitored[#Length/@MultiwayGrowthList[#,{"ABAA"},50,10000]&,Table[RandomMWRule[{24,51,35},2],100]]
LinkObject
:Unable to communicate with closed link LinkObject['/Applications/Wolfram Research/Wolfram Desktop Development/Main Branch/12.1.0/6646702/Wolfram Desktop-6646702.app/Contents/MacOS/WolframKernel' -subkernel -noinit -nopaclet -wstp,12775,33].
KernelObject
:Subkernel connected through KernelObject
Name: local
KernelID: 89
appears dead.
Parallel`Developer`QueueRun
::req
:Requeueing evaluations {470} assigned to KernelObject
Name: local
.
LaunchKernels
:Kernel KernelObject
Name: local
resurrected as KernelObject
Name: local
KernelID: 137
.
Out[]=
In[]:=
FindLinearRecurrence[{1,2,3,6,10,15,23,32,44,58,74,93,116,140,168,199,232,268,307,348,392,439,488,540,595,652,712,775,840,908,979,1052,1128,1207,1288,1372,1459,1548,1640,1735,1832,1932,2035,2140,2248,2359,2472,2588,2707,2828,2952}]
In[]:=
FindSequenceFunction[{1,2,3,6,10,15,23,32,44,58,74,93,116,140,168,199,232,268,307,348,392,439,488,540,595,652,712,775,840,908,979,1052,1128,1207,1288,1372,1459,1548,1640,1735,1832,1932,2035,2140,2248,2359,2472,2588,2707,2828,2952},n]
Out[]=
$Aborted
In[]:=
Differences[{1,2,3,6,10,15,23,32,44,58,74,93,116,140,168,199,232,268,307,348,392,439,488,540,595,652,712,775,840,908,979,1052,1128,1207,1288,1372,1459,1548,1640,1735,1832,1932,2035,2140,2248,2359,2472,2588,2707,2828,2952},2]
Out[]=
{0,2,1,1,3,1,3,2,2,3,4,1,4,3,2,3,3,2,3,3,2,3,3,2,3,3,2,3,3,2,3,3,2,3,3,2,3,3,2,3,3,2,3,3,2,3,3,2,3}
In[]:=
ListLinePlot[%]
Out[]=
10
20
30
40
50
1
2
3
4
In[]:=
MWSequenceTest[list_]:=Catch[Do[If[Length[Union[Differences[list,n]]]<10,Throw["Differences"->n]],{n,0,4}];With[{r=FindLinearRecurrence[Drop[list,4]]},If[Head[r]===List,Throw["Recurrence"->r]]];With[{r=FindTransientRepeat[list,5]},If[Length[r[[1]]]<Length[list]/10,Throw["Repeat"r]];"Interesting"]]
In[]:=
MWSequenceTest[None]:=None
ParallelMapMonitored[#Length/@MultiwayGrowthList[#,{"ABAA"},50,10000]&,Table[RandomMWRule[{24,51,35},2],100]]
In[]:=
MWSequenceTest/@Last/@%231
Out[]=
In[]:=
Counts[%]
Out[]=
None35,(Differences0)56,(Differences2)3,(Differences1)6
ParallelMap
In[]:=
Length/@MultiwayGrowthList[{"ABA""BBAA","BAA""AAB"},{"BABBAAB"},300,10000]
Out[]=
In[]:=
Differences[%]
Out[]=
In[]:=
ListLinePlot[%]
Out[]=

Trials

Bigger cases

NOTE: REMOVE THE Catenate !!!
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.