Search NKS | Online
171 - 180 of 310 for Nest
[Patterns from] bitwise functions
Bitwise functions typically yield nested patterns.
Replacing 2 by 3 yields a sequence which has a fairly simple nested form.
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.
But nested sequences I have found can quite often generate rather pleasing tunes.
The longest tautology at step t is
Nest[(# ⊼ #) ⊼ (# ⊼ p t ) & , p ⊼ (p ⊼ p), t - 1]
whose LeafCount grows like 3 t .
One possible such ordering for numbers with a total of m digits is
GrayCode[m_] := Nest[Join[#, Length[#] + Reverse[#]] &, {0}, m]
The succession of sizes and digit sequences of numbers ordered in this way are shown below.
In all cases the analogs of the picture below have a nested structure.
Second-order cellular automata
Second-order elementary rules can be implemented using
CA2EvolveList[rule_List, {a_List, b_List}, t_Integer] := Map[First, NestList[CA2Step[rule, #]&, {a, b}, t]]
CA2Step[rule_List, {a_, b_}] := {b, Mod[a + rule 〚 8 - (RotateLeft[b] + 2 (b + 2 RotateRight[b])) 〛 , 2]}
where rule is obtained from the rule number using IntegerDigits[n, 2, 8] .
And in this system, unlike all others before it, no repetitive pattern is possible; the only pattern that satisfies the constraint is the non-repetitive nested pattern shown in the picture.
The picture on the next page shows one approach based on the idea of breaking images up into collections of nested pieces, each with a uniform color.