Search NKS | Online
181 - 190 of 681 for Novo Curso De Direito Civil - Vol. 1 - Parte Geral - 26ª EdGagliano, Pablo StolzeSaraiva Jur
With a concentrations list c , the position p of a new element is given by Position[c, Max[c], 1, 1] 〚 1, 1 〛 , while the new list of concentrations is λ c + RotateRight[f, p] where f is a list of depletions associated with addition of a new element at position 1.
EvenQ] := Partition[ Fold[Insert[#1, #2, Random[Integer, Length[#1]] + 1] &, {}, Floor[Range[1, n + 2/3, 1/3]]], 2]
Networks obtained in this way are usually connected, but will almost always contain self-loops and multiple edges.
Iterated Maps and the Chaos Phenomenon
The basic idea of an iterated map is to take a number between 0 and 1, and then in a sequence of steps to update this number according to a fixed rule or "map". Many of the maps I will consider can be expressed in terms of standard mathematical functions, but in general all that is needed is that the map take any possible number between 0 and 1 and yield some definite number that is also between 0 and 1.
… On the first of the next two pages all the examples start with the number 1/2 —which has a simple digit sequence.
Density in rule 90
From the superposition principle above and the number of black cells at step t in a pattern starting from a single black cell (see page 870 ) one can compute the density after t steps in the evolution of rule 90 with initial conditions of density p to be (see also page 602 )
1/2 (1 - (1 - 2 p)^(2^DigitCount[t,2,1]))
The regularity of PN sequences is revealed by looking at the autocorrelation RotateLeft[(-1) list , m] . (-1) list . This quantity is -1 for all nonzero m for PN sequences (so that all but the first component in Abs[Fourier[(-1) list ]] 2 are equal), but has mean 0 for truly random sequences. (Related sequences can be generated from RealDigits[1/p, 2] as discussed on page 912 .)
But since every value must be either 0 or 1, it can in fact be encoded by just a single bit. … The idea is to store the cellular automaton configuration in, say, m variables w[i] whose bits correspond respectively to the cell values {a 1 , a m + 1 , a 2m + 1 , …} , {a 2 , a m + 2 , a 2m + 2 , …} , {a 3 , …} , etc. This then makes the left and right neighbors of the j th bit in w[i] be the j th bits in w[i - 1] and w[i + 1] —so that for example a step of rule 30 evolution can be achieved just by w[i] = w[i - 1] ^ (w[i] | w[i + 1]) with no shift operations needed (except in boundary conditions on w[0] and w[m - 1] ).
Implementation [of cyclic tag systems]
With the rules for the cyclic tag system on page 95 given as {{1, 1}, {1, 0}} , the evolution can be obtained from
CTEvolveList[rules_, init_, t_] := Map[Last, NestList[CTStep, {rules, init}, t]]
CTStep[{{r_, s___}, {0, a___}}] := {{s, r}, {a}}
CTStep[{{r_, s___}, {1, a___}}] := {{s, r}, Join[{a}, r]}
CTStep[{u_, {}}] := {u, {}}
The leading elements on many more than t successive steps can be obtained directly from
CTList[rules_, init_, t_] := Flatten[Map[Last, NestList[CTListStep, {rules, init}, t]]]
CTListStep[{rules_, list_}] := {RotateLeft[rules, Length[list]],Flatten[rules 〚 Mod[Flatten[Position[list, 1]], Length[rules], 1] 〛 ]}
{x, y}, 1] . The continued fraction map x Mod[1/x, 1] discussed on page 914 becomes repetitive whenever its initial condition is a solution to a quadratic equation.
For a map x f[x] where f[x] is a polynomial such as a x (1 - x) the real initial conditions that yield period p are given by
Select[x /.
This is achieved for example by the definitions
f[n_] := f[n] = f[n - f[n - 1]] + f[n - f[n - 2]]
f[1] = f[2] = 1
The question of which recursive definitions yield meaningful sequences can depend on the details of how the rules are applied. For example, f[-1] may occur, but if the complete expression is f[-1] - f[-1] , then the actual value of f[-1] is irrelevant.
Recursive subdivision [encoding]
In one dimension, encoding can be done using
Subdivide[a_] := Flatten[ If[Length[a] 2, a, If[Apply[SameQ, a], {1,First[a]}, {0, Map[Subdivide, Partition[a, Length[a]/2]]}]]]
In n dimensions, it can be done using
Subdivide[a_, n_] := With[{s = Table[1, {n}]}, Flatten[ If[Dimensions[a] 2s, a, If[Apply[SameQ, Flatten[a]], {1, First[Flatten[a]]}, {0, Map[Subdivide[#, n] &, Partition[a, 1/2Length[a] s], {n}]}]]]]