Search NKS | Online

For a = 68 , the only solution is x = 1874 ; for a = 1090 , it is x = 149651610621 . … There are always only a finite number of solutions (for 0 < a ≤ 10000 the maximum is 12, achieved for a = 8900 )… For the homogenous case a = 0 the complete solution was found by Leonhard Euler in 1756. • x 3 + y 3  z 3 + a .
[PDEs in] higher dimensions The pictures below show as examples the solution to the wave equation in 1D, 2D and 3D starting from a stationary square pulse. … In 1D and 3D, the value at the origin quickly becomes exactly 0; in 2D it is given by 1-t/Sqrt[t 2 -1] , which tends to zero only like -1/(2t 2 ) (which means that a sound pulse cannot propagate in a normal way in 2D).
Implementation [of 2D substitution systems] With the rule on page 187 given for example by {1  {{1, 0}, {1, 1}}, 0  {{0, 0}, {0, 0}}} the result of t steps in the evolution of a 2D substitution system from a initial condition such as {{1}} is given by SS2DEvolve[rule_, init_, t_] := Nest[Flatten2D[# /. rule] &, init, t] Flatten2D[list_] := Apply[Join, Map[MapThread[Join, #] &, list]]
[Converting from CAs with] more colors Given a rule that involves three colors and nearest neighbors, the following converts each case of the rule to a collection of cases for a rule with two colors: CA3ToCA2[{a_, b_, c_}  d_] := Union[Flatten[Table[Thread[ Partition[Flatten[{l, a, b, c, r} /. coding], 11, 1] 〚 {2, 3, 4} 〛  (d /. coding)], {l, 0, 2}, {r, 0, 2}], 2]] coding = {0  {0, 0, 0}, 1  {0, 0, 1}, 2  {0, 1, 1}} The problem of encoding cells with several colors by blocks of black and white cells is related to standard problems in coding theory (see page 560 ). … Note that the original rule with k colors and r neighbors involves Log[2, k k 2 r + 1 ] bits of information; the two-color rule that emulates it involves Log[2, 2 2 2 s + 1 ] bits. As a result, the minimum possible s for k = 3 , r = 1 is about 2.2; in the specific example shown in the main text it is 5.
Universal cellular automaton The rules for the universal cellular automaton are {{_, 3, 7, 18, _}  12, {_, 5, 7 | 8, 0, _}  12, {_, 3, 10, 18, _}  16, {_, 5, 10 | 11, 0, _}  16, {_, 5, 8, 18, _}  7, {_, 5, 14, 0 | 18, _}  12, {_, _, 8, 5, _}  7, {_, _, 14, 5, _}  12, {_, 5, 11, 18, _}  10, {_, 5, 17, 0 | 18, _}  16, {_, _, x : (11 | 17), 5, _}  x - 1, {_, 0 | 9 | 18, x : (7 | 10 | 16), 3, _}  x + 1, {_, 0 | 9 | 18, 12, 3, _}  14, {_, _, 0 | 9 | 18, 7 | 10 | 12 | 16, x : (3 | 5)}  8 - x, {_, _, _, 8 | 11 | 14 | 17, x : (3 | 5)}  8 - x, {_, 13, 4, _, x : (0 | 18)}  x, {18, _, 4, _, _}  18, {_, _, 18, _, 4}  18, {0, _,4, _, _}  0, {_, _, 0, _, 4}  0, {4, _, 0 | 18, 1, _}  3, {4, _, _, _, _}  4, {_, _, 4, _, _}  9, {_, 4, 12, _, _}  7, {_, 4, 16, _, _}  10, {x : (0 | 18), _, 6, _, _}  x, {_, 2, 6, 15, x : (0 | 18)}  x, {_, 12 | 16, 6, 7, _}  0, {_, 12 | 16, 6, 10, _}  18, {_, 9, 10, 6, _}  16, {_, 9, 7, 6, _}  12, {9, 15, 6, 7, 9}  0, {9, 15, 6, 10, 9}  18, {9, _, 6, _, _}  9, {_, 6, 7, 9, 12 | 16}  12, {_, 6, 10, 9, 12 | 16}  16, {12 | 16, 6, 7, 9, _}  12, {12 | 16, 6, 10, 9, _}  16, {6, 13, _, _, _}  9, {6, _, _, _, _}  6, {_, _, 9, 13, 3}  9, {_, 9, 13, 3, _}  15, {_, _, _, 15, 3}  3, {_, 3, 15, 0 | 18, _}  13, {_, 13, 3, _, 0 | 18}  6, {x : (0 | 18), 15, 9, _, _}  x, {_, 6, 13, _, _}  15, {_, 4, 15, _, _}  13, {_, _, _, 15, 6}  6, {_, _, 2, 6, 15}  1, {_, _, 1, 6, _}  2, {_, 1, 6, _, _}  9, {_, 3, 2, _, _}  1, {3, 2, _, _, _}  3, {_, _, 3, 2, _}  3, {_, 1, 9, 1, 6}  6, {_, _, 9, 1, 6}  4, {_, 4, 2, _, _}  1, {_, _, _, _, x : (3 | 5)}  x, {_, _, 3 | 5, _, x : (0 | 18)}  x, {_, _, x : (1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17), _, _}  x, {_, _, 18, 7 | 10, 18}  18, {_, _, 0, 7 | 10, 0}  0, {_, _, 0 | 18, _, _}  9, {_, _, x_, _, _}  x} where the numbers correspond to the icons shown in the main text according to The block in the initial conditions for the universal cellular automaton corresponding to a cell with color a is given by Flatten[{Transpose[{Join[{4, 18(1 - a), 6}, Table[9, {2 2 r + 1 - 3}]], 10 - 3 rtab}], Table[{9, 1}, {r}], 9, 13}] where r is the range of the rule to be emulated ( r = 1 for elementary rules) and rtab is the list of outcomes for that rule (starting with the outcome for {1, 1, (1) ...} ). In general, there are 2 2 r + 1 cases in the rule to be emulated; each block in the universal cellular automaton is 2 (2 2 r + 1 + r + 1) cells wide, and each step in the rule to be emulated corresponds to (3 r + 2) 2 2 r + 1 + 3 r 2 + 7 r + 3 steps in the evolution of the universal cellular automaton.
[Rules for the] squaring cellular automaton The rules are {{0, _, 3}  0, {_, 2, 3}  3, {1, 1, 3}  4, {_, 1, 4}  4, {1 | 2, 3, _}  5,{p : (0 | 1), 4, _}  7 - p, {7, 2, 6}  3, {7, _, _}  7, {_, 7, p : (1 | 2)}  p, {_, p : (5 | 6), _}  7 - p, {5 | 6, p : (1 | 2), _}  7 - p, {5 | 6, 0, 0}  1, {_, p : (1 | 2), _}  p, {_, _, _}  0} and the initial conditions consist of Append[Table[1, {n}], 3] surrounded by 0 's.
Sierpiński pattern Other ways to generate step n of the pattern shown here in various orientations include: • Mod[Array[Binomial, {2, 2} n , 0], 2] (see pages 611 and 870 ) • 1 - Sign[Array[BitAnd, {2, 2} n , 0]] (see pages 608 and 871 ) • NestList[Mod[RotateLeft[#] + #, 2] &, PadLeft[{1}, 2 n ], 2 n - 1] (see page 870 ) • NestList[Mod[ListConvolve[{1, 1}, #, -1], 2] &, PadLeft[{1}, 2 n ], 2 n - 1] (see page 870 ) • IntegerDigits[NestList[BitXor[2#, #] &, 1, 2 n - 1], 2, 2 n ] (see page 906 ) • NestList[Mod[Rest[FoldList[Plus, 0, #]], 2] &, Table[1, {2 n }], 2 n - 1] (see page 1034 ) • Table[PadRight[ Mod[CoefficientList[(1 + x) t - 1 , x], 2], 2 n - 1], {t, 2 n }] (see pages 870 and 951 ) • Reverse[Mod[CoefficientList[Series[1/(1 - (1 + x)y), {x, 0, 2 n - 1}, {y, 0, 2 n - 1}], {x, y}], 2]] (see page 1091 ) • Nest[Apply[Join, MapThread[ Join, {{#, #}, {0 #, #}}, 2]] &, {{1}}, n] (compare page 1073 ) The positions of black squares can be found from: • Nest[Flatten[2# /. {x_, y_}  {{x, y}, {x + 1, y}, {x, y + 1}}, 1] &, {{0, 0}}, n] • Transpose[{Re[#], Im[#]}] &[ Flatten[Nest[{2 #, 2 # + 1, 2 # +  } &, {0}, n]]] (compare page 1005 ) • Position[Map[Split, NestList[Sort[Flatten[{#, # + 1}]] &, {0}, 2 n - 1]], _?(OddQ[Length[#]] &), {2}] (see page 358 ) • Flatten[Table[Map[{t, #} &, Fold[Flatten[{#1, #1 + #2}] &, 0, Flatten[2^(Position[ Reverse[IntegerDigits[t, 2]], 1] - 1)]]], {t, 2 n - 1}], 1] (see page 870 ) • Map[Map[FromDigits[#, 2] &, Transpose[Partition[#, 2]]] &, Position[Nest[{{#, #}, {#}} &, 1, n], 1] - 1] (see page 509 ) A formatting hack giving the same visual pattern is DisplayForm[Nest[SubsuperscriptBox[#, #, #] &, "1", n]]
Periods in rule 37R With a system of size n , the maximum possible repetition period is 2 2n . … With all cells 0 on one step, and a block of nonzero cells on the next step, the periods are for example: {1} : 21 ; {1, 1} : 3n - 8 ; {1, 0, 1} : 666 ; {1, 1, 1} : 3n - 8 ; {1, 0, 0, 1} : irregular ( < 24n ; peaks at 6j + 1 ); {1, 0, 0, 1, 0, 1} : irregular ( ≲ 2 n ; 857727 for n= 2 6 ; 13705406 for n = 100 ). With completely random initial conditions, there are great fluctuations, but a typical period is around 2 n/3 .
Multiway systems based on numbers One can consider for example the rule n  {n + 1, 2 n} implemented by NestList[Union[Flatten[{# + 1, 2 #}]] &, {0}, t] In this case there are Fibonacci[t + 2] distinct numbers obtained at step t . In general, rules based on simple arithmetic operations yield only simple nested structures.
s=2 , k=2 Turing machines As illustrated on page 761 , even extremely simple Turing machines can have behavior that depends in a somewhat complicated way on initial conditions. Thus, for example, with the rule {{1, 0}  {1, 1, -1}, {1, 1}  {2, 1, 1}, {2, 0}  {1, 0, -1}, {2, 1}  {1,0,1}} the head moves to the right whenever the initial condition consists of odd-length blocks of 1's separated by single 0's; otherwise it stays in a fixed region.
1 ... 6789 ...