Search NKS | Online
71 - 80 of 681 for Novo Curso De Direito Civil - Vol. 1 - Parte Geral - 26ª EdGagliano, Pablo StolzeSaraiva Jur
These colors satisfy s[n_] := If[EvenQ[n], 1 - s[n/2], s[(n + 1)/2]] with s[1] = 1 . … The sequence on step t can be obtained from Nest[Join[#, 1 - #] &, {1}, t - 1] . … This sequence has length Fibonacci[t + 1] (or approximately 1.618 t + 1 ) (see note below ).
[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.
[Spectra of] random block sequences
Analytical forms for all but the last spectrum are: 1 , u 2 /(1 + 8u 2 ) , 1/(1 + 8 u 2 ) , u 2 , (1 - 4u 2 ) 2 /(1 - 5u 2 + 8u 4 ) , u 2 /(1 - 5u 2 + 8u 4 ) , u 2 + 1/36 DiracDelta[ ω - 1/3] , where u = Cos[ π ω ] , and ω runs from 0 to 1/2 in each plot. … If ξ [r] = λ r then the spectrum is (1 - λ 2 )/( λ 2 - 2 λ Cos[2 π ω ] + 1) - 1 . For a random walk (see page 977 ) in which ± 1 occur with equal probability the spectrum is Csc[ π ω ] 2 /2 , or roughly 1/ ω 2 .
Cellular automaton rules as formulas
The value a[t, i] for a cell on step t at position i in any of the cellular automata in this chapter can be obtained from the definition
a[t_, i_] := f[a[t - 1, i - 1], a[t - 1, i], a[t - 1, i + 1]]
Different rules correspond to different choices of the function f . For example, rule 90 on page 25 corresponds to
f[1, _, 1] = 0; f[0, _, 1] = 1; f[1, _, 0] =1; f[0, _, 0] = 0
One can specify initial conditions for example by
a[0, 0] = 1; a[0, _] = 0
(the cell on step 0 at position 0 has value 1, but all other cells on that step have value 0). … (For efficiency, the main definition should in practice be given as
a[t_, i_] := a[t, i] = f[a[t - 1, i - 1], a[t - 1, i], a[t - 1, i + 1]]
so that all intermediate values which are computed are automatically stored.)
The pattern obtained after t steps is then given by
NestList[f[RotateRight[#], #]&, init, t]
The pictures below show results with f being Times , and cells having values (a) {1, -1} , (b) the unit complex numbers {1, , -1, - } , (c) the unit quaternions.
… Pictures (a) and (b) below however correspond to the n = 3 multiplication tables {{1, 1, 3}, {3, 3, 2}, {2, 2, 1}} and {{3, 1, 3}, {1, 3, 1}, {3, 1, 2}} . … The group used is S 3 , which has six elements and multiplication table
{{1, 2, 3, 4, 5, 6}, {2, 1, 5, 6, 3, 4}, {3, 4, 1, 2, 6, 5}, {4, 3, 6, 5, 1, 2}, {5, 6, 2, 1, 4, 3}, {6, 5, 4, 3, 2, 1}}
The initial condition contains {5, 6} surrounded by 1 's.
Reconstructing initial conditions [in the 3n+1 problems]
Given a particular starting value of n , it is difficult to predict what precise sequence of even and odd values will be obtained in the system on page 123 . But given t steps in this sequence as a list of 0's and 1's, the following function will reconstruct the rightmost t digits in the starting value of n :
IntegerDigits[First[Fold[{Mod[If[OddQ[#2], 2 First[#1] - 1, 2 First[#1] PowerMod[5, -1, Last[#1]]], Last[#1]], 2 Last[#1]} &, {0, 2}, Reverse[list]]], 2, Length[list]]
Connection [of 2D substitution systems] with digit sequences
Just as in the 1D case discussed on page 891 , the color of a cell at position {i, j} in a 2D substitution system can be determined using a finite automaton from the digit sequences of the numbers i and j . At step n , the complete array of cells is
Table[If[FreeQ[Transpose[IntegerDigits[{i, j}, k, n]], form], 1, 0], {i, 0, k n - 1}, {j, 0, k n - 1}]
where for the pattern on page 187 , k = 2 and form = {0, 1} . For patterns (a) through (f) on page 188 , k = 3 and form is given respectively by (a) {1, 1} , (b) {0 | 2, 0 | 2} , (c) {0 | 2, 0 | 2} | {1, 1} , (d) {i_, j_} /; j > i , (e) {0, 2} | {1, 1} | {2, 0} , (f) {0, 2} | {1, 1} .
Having made the definition
Attributes[s] = Flat
the state of a sequential substitution system at a particular step can be represented by a symbolic expression such as s[1, 0, 1, 0] . The rule on page 82 can then be given simply as
s[1, 0] s[0, 1, 0]
while the rule on page 85 becomes
{s[0, 1, 0] s[0, 0, 1], s[0] s[0, 1, 0]}
The Flat attribute of s makes these rules apply not only for example to the whole sequence s[1, 0, 1, 0] but also to any subsequence such as s[1, 0] . (With s being Flat , s[s[1, 0], 1, s[0]] is equivalent to s[1, 0, 1, 0] and so on.
Iterated run-length encoding
Starting say with {1} consider repeatedly replacing list by (see page 1070 )
Flatten[Map[{Length[#], First[#]} &, Split[list]]]
The resulting sequences contain only the numbers 1, 2 and 3, but otherwise at first appear fairly random. However, as noticed by John Conway around 1986, the sequences can actually be obtained by a neighbor-independent substitution system, acting on 92 subsequences, with rules such as {3, 1, 1, 3, 3, 2, 2, 1, 1, 3} {{1, 3, 2}, {1, 2, 3, 2, 2, 2, 1, 1, 3}} . … The length of the sequence at the n th step grows like λ n , where λ ≃ 1.3 is the root of a degree 71 polynomial, corresponding to the largest eigenvalue of the transition matrix for the substitution system.
The representation is not unique; a[n] = 2 n , n (n + 1) and (n + 1)!/n all yield 1 . … : - 1 ; n!