In[]:=
ResourceFunction["BlockCellularAutomaton"][{{2,2}{1,1},{1,1}{2,2},{1,2}{1,2},{2,1}{2,1},{2,0}{0,2},{1,0}{1,0},{0,2}{2,0},{0,1}{0,1},{0,0}{0,0}},{0,0,0,1,0,0,0,0,2,0,0,0,1,2,0,0,0,0,1,2,1,0,0,1,0,0,0,2,0,1,0,1,0,0,1,0,0,0,0,0,1,2,0,1,1,1,0,0,0,2,0,0,0,0,0,2,0,0,0,2,0,2,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,2,1},300]
Out[]=
In[]:=
Counts[{Count[#,1],Count[#,2]}&/@ResourceFunction["BlockCellularAutomaton"][{{2,2}{1,1},{1,1}{2,2},{1,2}{1,2},{2,1}{2,1},{2,0}{0,2},{1,0}{1,0},{0,2}{2,0},{0,1}{0,1},{0,0}{0,0}},{0,0,0,1,0,0,0,0,2,0,0,0,1,2,0,0,0,0,1,2,1,0,0,1,0,0,0,2,0,1,0,1,0,0,1,0,0,0,0,0,1,2,0,1,1,1,0,0,0,2,0,0,0,0,0,2,0,0,0,2,0,2,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,2,1},20000]]
Out[]=
{14,10}8840,{12,12}8391,{16,8}2572,{18,6}198
In[]:=
Counts[{Count[#,1],Count[#,2]}&/@ResourceFunction["BlockCellularAutomaton"][{{2,2}{1,1},{1,1}{2,2},{1,2}{1,2},{2,1}{2,1},{2,0}{0,2},{1,0}{1,0},{0,2}{2,0},{0,1}{0,1},{0,0}{0,0}},{0,0,0,1,0,0,0,0,2,0,0,0,1,2,0,0,0,0,1,2,1,0,0,1,0,0,0,2,0,1,0,1,0,0,1,0,0,0,0,0,1,2,0,1,1,1,0,0,0,2,0,0,0,0,0,2,0,0,0,2,0,2,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,2,1},100000]]
Out[]=
{14,10}44056,{12,12}43633,{16,8}11635,{18,6}677
In[]:=
ListPlot[%]
Out[]=
In[]:=
Reduce[{n1+n2==a,Mod[n1-n2,2]==b},{n1,n2}]
Out[]=
Reduce[{n1+n2a,Mod[n1-n2,2]b},{n1,n2}]
In[]:=
With[{tot=24,d=0},Select[Table[{i,tot-i},{i,0,tot}],Mod[First[#]-Last[#],2]==d&]]
Out[]=
{{0,24},{1,23},{2,22},{3,21},{4,20},{5,19},{6,18},{7,17},{8,16},{9,15},{10,14},{11,13},{12,12},{13,11},{14,10},{15,9},{16,8},{17,7},{18,6},{19,5},{20,4},{21,3},{22,2},{23,1},{24,0}}
In[]:=
ListPlot[%149]
Out[]=
In[]:=
ParallelTable[Counts[{Count[#,1],Count[#,2]}&/@ResourceFunction["BlockCellularAutomaton"][{{2,2}{1,1},{1,1}{2,2},{1,2}{1,2},{2,1}{2,1},{2,0}{0,2},{1,0}{1,0},{0,2}{2,0},{0,1}{0,1},{0,0}{0,0}},RandomInteger[2,100],1000]],100]
Out[]=
In[]:=
ListPlot[Keys[#],PlotTheme->"Minimal"]&/@%
Out[]=
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
Trapping
Trapping
Collisions
Collisions
Single Wall
Single Wall