Search NKS | Online
201 - 210 of 681 for Novo Curso De Direito Civil - Vol. 1 - Parte Geral - 26ª EdGagliano, Pablo StolzeSaraiva Jur
The tetrahedron network from page 476 is for example given in this representation by
{1 {2, 3, 4}, 2 {1, 3, 4}, 3 {1, 2, 4}, 4 {1, 2, 3}}
The list of nodes reached by following up to n connections from node i are then given by
NodeLists[g_, i_, n_] := NestList[Union[Flatten[# /. g]] &, {i}, n]
The network distance corresponding to the length of the shortest path between two nodes is given by
Distance[g_, {i_, j_}] := Length[NestWhileList[ Union[Flatten[# /. g]] &, {i}, !MemberQ[#, j] &]] - 1
Arithmetic coding
Consider dividing the interval from 0 to 1 into a succession of bins, with each bin having a width equal to the probability for some sequence of blocks to occur. … For any sequence s this can be done using
Module[{c, m = 0}, Map[c[#] = {m, m += Count[s, #]/Length[s]} &, Union[s]]; Function[x, (First[RealDigits[2 # Ceiling[2 -# Min[x]], 2, -#, -1]] &)[Floor[Log[2, Max[x] - Min[x]]]]][ Fold[(Max[#1] - Min[#1]) c[#2] + Min[#1] &, {0, 1}, s]]]
Huffman coding of a sequence containing a single 0 block together with n 1 blocks will yield output of length about n ; arithmetic coding will yield length about Log[n] .
Chords
Two pure tones played together exhibit beats at the difference of their frequencies—a consequence of the fact that
Sin[ ω 1 t] + Sin[ ω 2 t] 2 Sin[1/2( ω 1 + ω 2 ) t] Cos[( ω 1 - ω 2 ) t]
With ω ≃ 500 Hz , one can explicitly hear the time variation of the beats if their frequency is below about 15 Hz, and the result is quite pleasant. … The mechanics of the ear imply that if two tones of reasonable amplitude are played together, progressively smaller additional signals will effectively be generated at frequencies Abs[n 1 ω 1 ± n 2 ω 2 ] . … The minima at values of ω 2 / ω 1 corresponding to rationals with small denominators may explain why such chords seem more pleasing.
If exactly m + 1 distinct blocks occur for every m , then the sequence must be of the so-called Sturmian type discussed on page 916 , and the n th element must be given by Round[(n + 1) a + b] - Round[n a + b] , where a is an irrational number. … Pictures (b), (c) and (d) show the simplest cases where this occurs (for length 3 {1 {1, 1, 1, 0, 0, 0}, 0 {1, 0}} also works).
[Rules for the] primes cellular automaton
The rules are
{{13, 3, 13} 12, {6, _, 4} 15, {10, _, 3 | 11} 15, {13, 7, _} 8, {13, 8, 7} 13, {15, 8, _} 1, {8, _, _} 7, {15, 1, _} 2, {_, 1, _} 1, {1, _, _} 8, {2 | 4 | 5, _, _} 13, {15, 2, _} 4, {_, 4, 8} 4, {_, 4, _} 5, {_, 5, _} 3, {15, 3, _} 12, {_, x : (2 | 3 | 8), _} x, {_, x : (11 | 12), _} x - 1, {11, _, _} 13, {13, _, 1 | 2 | 3 | 5 | 6 | 10 | 11} 15, {13, 0, 8} 15, {14, _, 6 | 10} 15, {10, 0 | 9 | 13, 6 | 10} 15, {6, _, 6} 0, {_, _, 10} 9, {6 | 10, 15, 9} 14, {_, 6 | 10, 9 | 14 | 15} 10, {_,6|10,_} 6, {6 | 10, 15, _} 13, {13 | 14, _, 9 | 15} 14, {13 | 14, _, _} 13, {_, _, 15} 15, {_, _, 9 | 14} 9, {_, _, _} 0}
and the initial conditions consist of {10, 0, 4, 8} surrounded by 0 's.
Multiplication systems [from cellular automata]
The rules for the cellular automaton shown here are
{{_, 0, 3 | 8} 5, {_, 0, 2 | 7} 8, {_, 1, 4 | 9} 9, {_, 1, 3 | 8} 4, {_, 1, 2 | 7} 8, {_, 10, 4 | 9} 3, {_, 10, 3 | 8} 7, {_, 10, 2 | 7} 2, {5 | 6, 1, 0} 9, {5 | 6, 10, 0} 3, {5 | 6, 1, _} 6, {5 | 6, 10, _} 5, {_, 2 | 3 | 4 | 5, _} 10, {_, 6 | 7 | 8 | 9, _} 1, {_, x_, _} x}
and the initial condition consists of a single 3 surrounded by 0 's. The idea used is that multiplication by 3 can be achieved by scanning digits from right to left, adding to each digit the value of the digit on its immediate right, as well as a carry that can propagate any distance but cannot be larger than 1.
Other pure power laws 1/f α are also sometimes seen; the pictures below show some examples. (Note that the correlations in such data in some sense go like t α - 1 .) … Note that the Weierstrass function of page 918 yields a 1/f spectrum, and presumably suitable averages of spectra from any substitution system should also have 1/f α forms (compare page 586 ).
Thus, for example, the exact value of 1/3 in base 10 is 0.3333333333333..., where the 3's repeat forever. And similarly, 1/7 is 0.142857142857142857142857142857..., where now the block of digits 142857 repeats forever. … For a number of the form p/q , the digit sequence always repeats with a period of at most q–1 steps.
The pictures on the next page show more examples of class 1 and 2 cellular automata. … But at least for these class 1 and 2 examples, the progression of networks always continues to have a fairly simple form.
… Both rules start on step 1 from random initial conditions in which all sequences of black and white cells are allowed.
And it turns out that of these exactly 17 perform the computation of adding 1 to a number.
… It turns out that there are 351 different functions that can be computed by one or more of the 4096 Turing machines with 2 states
Examples of the behavior of a simple Turing machine that does the computation of adding 1 to a number. … The result turns out to be given by 2 IntegerExponent[x + 1, 2] + 3 , which has a maximum of 2n+3 , where n is the length of the digit sequence of x , or Floor[Log[2, x]] .