Periodicity in Cellular Automata
The new function FindTransientRepeat identifies the transient and repeated parts of a list. It can be used to investigate cellular automata.
Look at the rule 30 cellular automaton (CA). The Version 11 function RulePlot is a useful tool to find the associated transformation rules.
In[1]:=
![Click for copyable input](assets.en/periodicity-in-cellular-automata/In_47.png)
RulePlot[CellularAutomaton[30]]
Out[1]=
![](assets.en/periodicity-in-cellular-automata/O_53.png)
Define the initial conditions of the CA by using the new function CenterArray.
In[2]:=
![Click for copyable input](assets.en/periodicity-in-cellular-automata/In_48.png)
initc = CenterArray[7]
Out[2]=
![](assets.en/periodicity-in-cellular-automata/O_54.png)
Compute the rule 30 CA with the above initial conditions and plot it in a discrete array of squares.
In[3]:=
![Click for copyable input](assets.en/periodicity-in-cellular-automata/In_49.png)
ca30 = CellularAutomaton[30, initc, 20];
ArrayPlot[ca30, Mesh -> True]
Out[3]=
![](assets.en/periodicity-in-cellular-automata/O_55.png)
FindTransientRepeat gives the repeated part of this CA.
In[4]:=
![Click for copyable input](assets.en/periodicity-in-cellular-automata/In_50.png)
tr30 = FindTransientRepeat[ca30, 2];
ArrayPlot[Last[tr30], Mesh -> True]
Out[4]=
![](assets.en/periodicity-in-cellular-automata/O_56.png)
Repeat the same steps for the rule 90 cellular automaton.
In[5]:=
![Click for copyable input](assets.en/periodicity-in-cellular-automata/In_51.png)
RulePlot[CellularAutomaton[90]]
Out[5]=
![](assets.en/periodicity-in-cellular-automata/O_57.png)
In[6]:=
![Click for copyable input](assets.en/periodicity-in-cellular-automata/In_52.png)
ca90 = CellularAutomaton[90, initc, 20];
ArrayPlot[ca90, Mesh -> True]
Out[6]=
![](assets.en/periodicity-in-cellular-automata/O_58.png)
In[7]:=
![Click for copyable input](assets.en/periodicity-in-cellular-automata/In_53.png)
tr90 = FindTransientRepeat[ca90, 2];
ArrayPlot[Last[tr90], Mesh -> True]
Out[7]=
![](assets.en/periodicity-in-cellular-automata/O_59.png)