Wolfram Research

Function Repository Resource:

CyclicTagSystem

Source Notebook

Compute the evolution of a cyclic tag system

Contributed by: Stephen Wolfram

ResourceFunction["CyclicTagSystem"][rule, init, t]

generates a list representing the evolution of the cyclic tag system with the specified rule, starting from initial condition init for t steps.

Details and Options

There are two cases in the rule, used on alternate steps. A single element is removed from the beginning of the sequence and then a new block is added at the end whenever the element removed at that step is black.
The rules for a tag system are given as a list of elements of the form {rhs1,rhs2,} where the rhsn are the added binary digits.

Examples

Basic Examples

Eight steps in the evolution of a tag system:

In[1]:=
ResourceFunction["CyclicTagSystem"][{{1, 0}, {1, 1}}, {1}, 8]
Out[1]=

Plot the evolution of a tag system from NKS, p .95:

In[2]:=
ArrayPlot[
 ResourceFunction["CyclicTagSystem"][{{1, 1}, {1, 0}}, {1}, 25], ColorRules -> {0 -> Gray, 1 -> Black}, Mesh -> False]
Out[2]=

Rules from NKS, p .96:

In[3]:=
ctrules = {{{1, 1}, {1, 0}}, {{1}, {1, 1}}, {{1, 0}, {1, 1}}, {{1}, {1, 0, 1}}, {{1, 1, 1}, {0}}};
In[4]:=
ArrayPlot[#, ColorRules -> {0 -> Gray, 1 -> Black}, Mesh -> False] & /@ (ResourceFunction["CyclicTagSystem"][#1, {1}, 100] & /@ ctrules)
Out[4]=

Fluctuations with respect to growth at an average rate of half an element per step:

In[5]:=
ListLinePlot[(# - 1/2 Range[Length[#]]) &[
    Length /@ ResourceFunction["CyclicTagSystem"][#, {1}, 1000]], AspectRatio -> 1/8, ImageSize -> 500] & /@ Take[ctrules, -2]
Out[5]=

Requirements

Wolfram Language 11.3 (March 2018) or above

Resource History

Source Metadata

License Information