Search NKS | Online

One can scan a quadrant of an infinite grid using the σ function on page 1127 , or one can scan a whole grid by for example going in a square spiral that at step t reaches position (1/2(-1) # ({1, -1}(Abs[# 2 - t] - #) + # 2 - t- Mod[#, 2]) &)[ Round[ √ t ]]
The maximum number of terms needed to represent any of these functions in DNF is 2 n - 1 . The actual numbers of functions which require 0, 1, 2, ... terms is for n = 2 : {1, 9, 6} ; for n = 3 : {1, 27, 130, 88, 10} , and for n = 4 : {1, 81, 1804, 13472, 28904, 17032, 3704, 512, 26} .
The rule can be given by specifying a list of cases such as {0, 0, 0}  {1, {1, -1}} , where in each case the second sublist specifies the new relative positions of active cells. With this setup successive steps in the evolution of the system can be obtained from GMAStep[rules_, {list_, nlist_}] := Module[{a, na}, {a, na} = Transpose[Map[Replace[Take[list, {# - 1, # + 1}], rules]&, nlist]]; {Fold[ReplacePart[#, Last[#2], First[#2]]&, list, Transpose[{nlist, a}]], Union[Flatten[nlist + na]]}]
In the case of a surface defined by z  f[x, y] this is equivalent to solving x''[t]  -(f (1, 0) [x[t], y[t]](y'[t] 2 f (0, 2) [x[t],y[t]] + 2 x'[t]y' [t]f (1, 1) [x[t], y[t]] + x'[t] 2 f (2, 0) [x[t], y[t]]))/ (1 + f (0, 1) [x[t], y[t]] 2 + f (1, 0) [x[t], y[t]] 2 ) together with the corresponding equation for y'' , as already noted by Leonhard Euler in 1728 in connection with his development of the calculus of variations.
This can be done for blocks up to length n in a 1D cellular automaton with k colors using ReversibleQ[rule_, k_, n_] := Catch[Do[ If[Length[Union[Table[CAStep[rule, IntegerDigits[i, k, m]], {i, 0, k m - 1}]]] ≠ k m , Throw[False]], {m, n}]; True] For k = 2 , r = 1 it turns out that it suffices to test only up to n = 4 (128 out of the 256 rules fail at n = 1 , 64 at n = 2 , 44 at n = 3 and 14 at n = 4 ); for k = 2 , r = 2 it suffices to test up to n = 15 , and for k = 3 , r = 1 , up to n = 9 . But although these results suggest that in general it should suffice to test only up to n = k 2 r , all that has so far been rigorously proved is that n = k 2 r (k 2 r -1) + 2 r + 1 (or n = 15 for k = 2 , r = 1 ) is sufficient.
In the case of Cos[x] – Cos[α x] each step in the generalized substitution system has a rule determined as shown on the left from a term in the continued fraction representation of (α–1)/(α+1) .
With completely random input, the output will on average be longer by a factor Sum[2 -(n + 1) r[n], {n, 1, ∞ }] where r[n] is the length of the representation for n . For the Fibonacci encoding used in the main text, this factor is approximately 1.41028. (In base 2 this number has 1's essentially at positions Fibonacci[n] ; as discussed on page 914 , the number is transcendental.)
Implementation [of patterning model] Given a 2D array of values a and a list of weights w , each step in the evolution of the system corresponds to WeightedStep[w_List, a_] := Map[If[# > 0, 1, 0]&, Sum[w 〚 1 + i 〛 Apply[Plus, Map[RotateLeft[a, #]&, Layer[i]]], {i, 0, Length[w] - 1}], {2}] Layer[n_] := Layer[n] = Select[Flatten[Table[{i, j}, {i, -n, n}, {j, -n, n}],1], MemberQ[#, n| - n]&]
Cellular automaton [Nand] formulas For 1 step, the elementary cellular automaton rules are exactly the 256 n = 3 Boolean functions. … For rule 254 the result after t steps (which is always asymmetric, even though the rule is symmetric) is Nest[{{#, # 〚 2 〛 + 1}, # 〚 2 〛 + 1} &, {{1, 1}, {2, 2}}, t - 2] If explicit copy operations were allowed, then the number of Nand operations after t steps could not increase faster than t 2 for any rule.
Implementation of digit sequences A whole number n can be converted to a sequence of digits in base k using IntegerDigits[n,k] or (see also page 1094 ) Reverse[Mod[NestWhileList[Floor[#/k] &, n, # ≥ k &], k]] and from a sequence of digits using FromDigits[list,k] or Fold[k #1 + #2 &, 0, list] For a number x between 0 and 1, the first m digits in its digit sequence in base k are given by RealDigits[x, k, m] or Floor[k NestList[Mod[k #, 1]&, x, m - 1]] and from these digits one can reconstruct an approximation to the number using FromDigits[{list, 0}, k] or Fold[#1/k + #2 &, 0, Reverse[list]]/k
1 ... 17181920 ...