Chapter 3: The World of Simple Programs

Section 8: Cyclic Tag Systems

Generalizations [of cyclic tag systems]

The implementation above immediately allows cyclic tag systems which cycle through a list of more than two blocks. (With just one block the behavior is always repetitive.) Cyclic tag systems which allow any value for each element can be obtained by adding the rule

CTStep[{{r_, s___}, {n_, a___}}] := {{s, r}, Flatten[{a, Table[r, {n}]}]}

The leading elements in this case can be obtained using

CTListStep[{rules_, list_}] := {RotateLeft[rules, Length[list]], With[{n = Length[rules]}, Flatten[Apply[Table[#1, {#2}] &, Map[Transpose[{rules, #}] &, Partition[list, n, n, 1, 0]], {2}]]]}

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