Search NKS | Online
131 - 140 of 310 for Nest
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]]
[Nesting in] random walks
It is a consequence of the Central Limit Theorem that the pattern of any random walk with steps of bounded length (see page 977 ) must have a certain nested or self-similar structure, in the sense that rescaled averages of different numbers of steps will always yield patterns that look qualitatively the same.
And at least in square roots, cube roots, and so on, it is known that no nested digit sequences
A procedure for generating the digit sequences of square roots.
The resulting networks have a regular nested form.
Algebraic generating functions can also lead to nested sequences. … For any sequence with an algebraic generating function and thus for any nested sequence the n th element can always be expressed in terms of hypergeometric functions.
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)]]/. … With this setup t steps of evolution are given simply by Nest[w, init, t] .
Affine transformations
Any set of so-called affine transformations that take the vector for each point, multiply it by a fixed matrix and then add a fixed vector, will yield nested patterns similar to those shown in the main text.
[Overall] structure of algorithms
The two most common overall frameworks that have traditionally been used in algorithms in computer science are iteration and recursion—and these correspond quite directly to having operations performed respectively in repetitive and nested ways.
In the second, there are many intricate details, but at an overall level there is still a very regular nested structure that emerges.
The pictures below show
The effect of including progressively smaller features in the representation of images by nested squares.