Notes

Chapter 3: The World of Simple Programs

Section 8: Cyclic Tag Systems


Implementation [of cyclic tag systems]

With the rules for the cyclic tag system on page 95 given as {{1, 1}, {1, 0}}, the evolution can be obtained from

CTEvolveList[rules_, init_, t_] := Map[Last, NestList[CTStep, {rules, init}, t]]

CTStep[{{r_, s___}, {0, a___}}] := {{s, r}, {a}}

CTStep[{{r_, s___}, {1, a___}}] := {{s, r}, Join[{a}, r]}

CTStep[{u_, {}}] := {u, {}}

The leading elements on many more than t successive steps can be obtained directly from

CTList[rules_, init_, t_] := Flatten[Map[Last, NestList[CTListStep, {rules, init}, t]]]

CTListStep[{rules_, list_}] := {RotateLeft[rules, Length[list]],Flatten[rulesMod[Flatten[Position[list, 1]], Length[rules], 1]]}



Image Source Notebooks:

From Stephen Wolfram: A New Kind of Science [citation]