Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Simulate the evolution of C. Moore's generalized shift
ResourceFunction["GeneralizedShift"][{n,shift,rewrite}, init, t] generates a list of states of the generalized shift, defined by shift and rewrite rules on a window of length n, over t steps starting from the initial condition init. | |
ResourceFunction["GeneralizedShift"][tm] gives a representation of a Turing machine tm as a generalized shift on a window of length 3. |
| shift | {{p1,…,pn}⧴int,…} |
| rewrite | {{p1,…,pn}⧴{r1,…,rn},…} |
| {{},0} | infinite tape filled with 0s |
| {{a1,a2,…},0} | bounded region of values aion an infinite tape |
| {x,{a1,a2,…},0} | bounded region with the window initially at position x |
| {a1,…,ak} | cyclic tape of values ai with the window initially at position 1 |
| {x,{a1,…,ak}} | cyclic tape with the window intially at position x |
Generalized shift operating on a window of length 1 on a cyclic tape of length 5, evolving over 4 steps:
| In[1]:= |
| Out[1]= |
Its plot starting from a given initial state on an infinite tape:
| In[2]:= | ![]() |
| Out[2]= | ![]() |
Compile a 2-state 2-color Turing machine into a generalized mobile automaton:
| In[3]:= |
| Out[3]= | ![]() |
Plot it on an infinite tape:
| In[4]:= |
| Out[4]= | ![]() |
Generalized shift defined by pattern matching, starting at position 2 on a cyclic tape:
| In[5]:= |
| Out[5]= |
Wolfram Language 13.0 (December 2021) or above
This work is licensed under a Creative Commons Attribution 4.0 International License