Search NKS | Online
121 - 130 of 310 for Nest
![](/common/images/search/spacer.gif)
As an example, one can take n to be represented just by Nest[s, k, n] . … To go the other way, one uses the result that for all Church numerals x and y , Nest[s, k, n][x][y] is also a Church numeral—as can be seen recursively by noting its equality to Nest[s, k, n - 1][y][x[y]] , where as above x[y] is power[y][x] . … With n represented by Nest[k, s[k][k], n] , however, s[s[s[s]][k]][k] serves as a decrement function, and with n represented by Nest[s[s],s[k], n] , s[s[s][k]][k[k[s[s]]]] serves as a doubling function.
With maps based on piecewise linear functions the regions of parameters in which chaotic behavior occurs typically have simple shapes; with maps based, say, on quadratic functions, however, elaborate nested shapes can occur.
The output f[x] in such cases is always 2 u - 1 where
u = Nest[(13 + (6# + 8)(5/2)^ IntegerExponent[6# + 8, 2])/6 &, 1, s + 1]
One then finds that 6u + 8 has the form Nest[If[EvenQ[#], 5#/2, # + 21]&, 14, m] for some m , suggesting a connection with the number theory systems of page 122 . The corresponding halting time t[x] is Last[Nest[h, {8, 4s + 24 }, s]] - 1 with
h[{i_, j_}] := With[{e = IntegerExponent[3i + 4, 2]}, {13/6 + (i + 4/3)(5/2) e + 1 , ((154 + 75(i + 4/3)(5/2) e ) 2 - 16321 - 7860i - 900i 2 + 3360e)/3780 + j}]
For s > 3 it then turns out that f[x] is extremely close to 3560523 (5/2) r , and t[x] to 18865098979373 (5/2) 2r , for some integer r .
… It is certainly possible that they could increase like NestList[# 2 &, 2, n] , or 2 2 n , although for x = (20 4 s - 2)/3 a better fit for n ≤ 200 is just 2 2.6 n , with outputs increasing like 2 2 1.3 n .
With d arguments Multinomial yields a nested pattern in d dimensions.
And after n steps the positions of all tips generated are given simply by
Nest[Flatten[Outer[Times, 1 + #, b]] &, {0}, n]
Based on this
LE[list_] := Module[{n = Length[list], i = Max[MapIndexed[ #1 - #2 &, PrimePi[list]]] + 1}, CRT[PadRight[ list, n + i], Join[Array[Prime[i + #] &, n], Array[Prime, i]]]]
will yield a number x that can be decoded into a list of length n using essentially the so-called Gödel β function
Mod[x, Prime[Rest[NestList[NestWhile[# + 1 &, # + 1, Mod[x, Prime[#]] 0 &] &, 0, n]]]]
A definite nested structure similar to picture (c) on page 130 is evident.
Implementation [of finite automata for nested patterns]
Given the rules for a substitution system in the form used on page 931 a finite automaton (as on page 957 ) which yields the color of each cell from the digit sequences of its position is
Map[Flatten[MapIndexed[#2 - 1 Position[rules, #1 _] 〚 1, 1 〛 &, Last[#], {-1}]] &, rules]
This works in any number of dimensions so long as each replacement yields a block of the same cuboidal form.
Rule 225 [with simple initial conditions]
With initial conditions consisting of a single black cell, this class 3 rule yields a regular nested pattern, as shown on page 58 .
Representing the strings by lists, one can write rules in the form
{{1, 1, s___} {s, 1, 0}, {1, s___} {s, 1, 0, 1}}
so that the evolution is given by
MWTSEvolve[rule_, list_, t_] := Nest[Flatten[Map[ReplaceList[#, rule] &, #], 1] &, list, t]
![](/common/images/search/spacer.gif)