Search NKS | Online
121 - 130 of 230 for Position
![](/common/images/search/spacer.gif)
The list representing the complete history of the resulting cyclic tag system can then be interpreted using
Map[Map[Position[#, 1] 〚 1, 1 〛 - 1 &, Partition[#, k]] &, Take[history, {1, -1, n k}]]
This construction is relevant to the proof of the universality of rule 110 starting on page 678 .
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[rules 〚 Mod[Flatten[Position[list, 1]], Length[rules], 1] 〛 ]}
Non-periodic pattern [forced by 2D constraint]
The color at position x, y in the pattern is given by
a[x_, y_] := Mod[y + 1, 2] /; x + y > 0
a[x_, y_] := 0 /; Mod[x + y, 2] 1
a[x_, y_] := Mod[Floor[(x - y) 2 (x + y - 6)/4 ], 2] /; Mod[x + y, 4] 2
a[x_, y_] := 1 - Sign[Mod[x - y + 2, 2 (-x - y + 8)/4 ]]
The origin of the x, y coordinates is the only freedom in this pattern.
Substitution systems in which all replacements are done that are found to fit in a left-to-right scan can be implemented as follows
GSSEvolveList[rule_, s_, n_] := NestList[GSSStep[rule, #] &, s, n]
GSSStep[rule_, s_] := g[rule, s, f[StringPosition[s, Map[First, rule]]]]
f[{ }] = { }; f[s_] := Fold[If[Last[Last[#1]] ≥ First[#2], #1, Append[#1, #2]]&, {First[s]}, Rest[s]]
g[rule_, s_, { }] := s; g[rule_, s_, pos_] := StringReplacePart[ s, Map[StringTake[s, #] &, pos] /. rule, pos]
with rules given as {"ABA" "BAAB", "BBBB" "AA"} .
(i) Like (e), except that colors at neighboring positions alternate.
A total of 40 disks were started with positions and velocities determined by a middle-square random number generator (see page 975 ), and their motion was followed for about 10 collision times—after which roundoff errors in the 64-bit numbers used had grown too big.
Rule 170 is the classic shift map which shifts all cell values one position to the left without changing them.
The cell at position n on row t turns out to be given by Mod[GegenbauerC[n, -t, -1/2], 2] , as discussed on page 612 .
Active cell motion [in mobile automata]
The pictures below show the positions of the active cell for 20,000 steps of evolution in various mobile automata.
The vertical distance moved at the n th horizontal position is Floor[n h] - Floor[(n - 1) h] , and the sequence obtained from this (which contains only terms Floor[h] and Floor[h] + 1 ) provides a unique representation for h .
![](/common/images/search/spacer.gif)