Search NKS | Online
81 - 90 of 210 for Listable
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"} .
Rule 110 Turing machines
Given an initial condition for rule 110, the initial condition for the Turing machine shown here is obtained as Prepend[4 list, 0] with 1 's on the left and 0 's on the right. The Turing machine
{{1, 2} {2, 2, -1}, {1, 1} {1, 1, -1}, {1, 0} {3, 1, 1}, {2, 2} {4, 0, -1}, {2, 1} {1, 2, -1}, {2, 0} {2, 1, -1}, {3, 2} {3, 2, 1}, {3, 1} {3, 1, 1}, {3, 0} {1, 0, -1}, {4, 2} {2, 2, 1}, {4, 1} {4, 1, 1}, {4, 0} {2, 2, -1}}
with s = 4 states and k = 3 possible colors also emulates rule 110 when started from Prepend[list + 1, 1] surrounded by 0 's. The s = 3 , k = 4 Turing machine
{{1 , 0} {1, 2, 1}, {1, 1} {2, 3, 1}, {1, 2} {1, 0, -1}, {1, 3} {1, 1, -1}, {2, 0} {1, 3, 1}, {2, 1} {3, 3, 1}, {3, 0} {1, 3, 1}, {3, 1} {3, 2, 1}}
started from Append[list, 0] with 0 's on the left and 2 's on the right generates a shifted version of rule 110.
In cases where all strings that appear both in rules and initial conditions are sorted—so that for example A 's appear before B 's—any string generated will also be sorted, so it can be specified just by giving a list of how many A 's and how many B 's appear in it. … Given a list of string specifications, a step in the evolution of the multiway system corresponds to
Select[Union[Flatten[Outer[Plus, diff, list, 1], 1]], Abs[#] # &]
Fractal dimensions [of additive cellular automata]
The total number of nonzero cells in the first t rows of the pattern generated by the evolution of an additive cellular automaton with k colors and weights w (see page 952 ) from a single initial 1 can be found using
g[w_, k_, t_] := Apply[Plus, Sign[NestList[Mod[ ListCorrelate[w, #, {-1, 1}, 0], k] &, {1}, t - 1]], {0, 1}]
The fractal dimension of this pattern is then given by the large m limit of
Log[k,g[w, k,k m + 1 ]/g[w, k, k m ]]
When k is prime it turns out that this can be computed as
d[w_, k_:2] := Log[k,Max[Abs[Eigenvalues[With[ {s = Length[w] - 1}, Map[Function[u, Map[Count[u, #] &, #1]], Map[Flatten[Map[Partition[Take[#, k + s - 1], s, 1] &, NestList[Mod[ListConvolve[w, #], k] &, #, k - 1]], 1] &, Map[Flatten[Map[{Table[0, {k - 1}], #} &, Append[#, 0]]] &, #]]] &[Array[IntegerDigits[#, k, s] &, k s - 1]]]]]]]
For rule 90 one gets d[{1, 0, 1}] = Log[2, 3] ≃ 1.58 .
Implementation [of texture perception model]
The exact matches for a template σ in data containing elements 0 and 1 can be obtained from
Sign[ListCorrelate[2 σ - 1, data] - Count[ σ , 1, 2]] + 1
Given a list of all steps in the evolution of the tag system, Cases[list, {__s}] picks out successive steps in the cellular automaton evolution.
In such a rule, given a list of how many neighbors around a given cell (out of s possible) make the cell turn black the outer totalistic code for the rule can be obtained from
Apply[Plus, 2^Join[2 list, 2 Range[s + 1] - 1]]
Note that each step in the evolution of any additive cellular automaton can be computed as
Mod[ListCorrelate[w, list, Ceiling[Length[w]/2]], k]
(See page 1087 for a discussion of partial additivity.)
To emulate cellular automaton evolution one starts by encoding a list of cell values by the single combinator
p[num[Length[list]]][ Fold[p[Nest[s, k, #2]][#1] &, p[k][k], list]] //. crules
where
num[n_] := Nest[inc, s[k], n]
inc = s[s[k[s]][k]]
One can recover the original list by using
Extract[expr, Map[Reverse[IntegerDigits[#, 2]] &, 3 + 59(16^Range[Depth[expr[s[k]][s][k] //. crules] - 1, 1, -1] - 1)/ 15)]]/.
For each person in the index I list the country or countries where that person predominantly worked. … I usually list countries in the order that a person has worked in them, ignoring repeats. Note that while many of the people listed are well known, extensive research (often through personal contacts, as well as institutional and government records) was required to track down quite a few of them.