Search NKS | Online
1 - 10 of 10 for CoefficientList
If the coefficients inside all the sine functions are rational, then going from t = 0 to t = 2 π Apply[LCM, Map[Denominator, list]] yields a closed curve. Irrational ratios of coefficients lead to curves that never close and eventually fill space uniformly.
Sierpiński pattern
Other ways to generate step n of the pattern shown here in various orientations include:
• Mod[Array[Binomial, {2, 2} n , 0], 2]
(see pages 611 and 870 )
• 1 - Sign[Array[BitAnd, {2, 2} n , 0]]
(see pages 608 and 871 )
• NestList[Mod[RotateLeft[#] + #, 2] &, PadLeft[{1}, 2 n ], 2 n - 1]
(see page 870 )
• NestList[Mod[ListConvolve[{1, 1}, #, -1], 2] &, PadLeft[{1}, 2 n ], 2 n - 1]
(see page 870 )
• IntegerDigits[NestList[BitXor[2#, #] &, 1, 2 n - 1], 2, 2 n ]
(see page 906 )
• NestList[Mod[Rest[FoldList[Plus, 0, #]], 2] &, Table[1, {2 n }], 2 n - 1]
(see page 1034 )
• Table[PadRight[ Mod[CoefficientList[(1 + x) t - 1 , x], 2], 2 n - 1], {t, 2 n }]
(see pages 870 and 951 )
• Reverse[Mod[CoefficientList[Series[1/(1 - (1 + x)y), {x, 0, 2 n - 1}, {y, 0, 2 n - 1}], {x, y}], 2]]
(see page 1091 )
• Nest[Apply[Join, MapThread[ Join, {{#, #}, {0 #, #}}, 2]] &, {{1}}, n]
(compare page 1073 )
The positions of black squares can be found from:
• Nest[Flatten[2# /. {x_, y_} {{x, y}, {x + 1, y}, {x, y + 1}}, 1] &, {{0, 0}}, n]
• Transpose[{Re[#], Im[#]}] &[ Flatten[Nest[{2 #, 2 # + 1, 2 # + } &, {0}, n]]]
(compare page 1005 )
• Position[Map[Split, NestList[Sort[Flatten[{#, # + 1}]] &, {0}, 2 n - 1]], _?
The first 2 m elements in the sequence can be obtained from (see page 1081 )
(CoefficientList[Product[1 - z 2 s , {s, 0, m - 1}], z] + 1)/2
The first n elements can also be obtained from (see page 1092 )
Mod[CoefficientList[Series[(1 + Sqrt[(1 - 3x)/(1 + x)])/ (2(1 + x)), {x, 0, n - 1}], x], 2]
The sequence occurs many times in this book; it can for example be derived from a column of values in the rule 150 cellular automaton pattern discussed on page 885 .
Any real number x can be represented as a set of integers using for example
Rest[FoldList[Plus, 1, ContinuedFraction[x]]]
but except when x is rational this list is not finite. … (The function σ above can for example be used to specify the order in which to sample elements in RealDigits[list] ). The total number of possible functions of real numbers is 2 2 ℵ 0 ; the number of continuous such functions (which can always be represented by a list of coefficients for a series) is however only 2 ℵ 0 .
Linear and nonlinear systems
A vast number of different applications of traditional mathematics are ultimately based on linear equations of the form u m . v where u and v are vectors (lists) and m is a matrix (list of lists), all containing ordinary continuous numbers. … (Generically there are 2 n solutions for v , and even for integer coefficients in the range -r to +r already in 95% of cases there are 4 solutions with n = 2 as soon as r ≥ 6 .)
Fibonacci[n] can be obtained in many ways:
• (GoldenRatio n - (-GoldenRatio) -n )/ √ 5
• Round[GoldenRatio n / √ 5 ]
• 2 1 - n Coefficient[(1 + √ 5 ) n , √ 5 ]
• MatrixPower[{{1, 1}, {1, 0}}, n - 1] 〚 1, 1 〛
• Numerator[NestList[1/(1 + #)&, 1, n]]
• Coefficient[Series[1/(1 - t - t 2 ), {t, 0, n}], t n - 1 ]
• Sum[Binomial[n - i - 1, i], {i, 0, (n - 1)/2}]
• 2 n - 2 - Count[IntegerDigits[Range[0, 2 n - 2 ], 2], {___, 1, 1, ___}]
A fast method for evaluating Fibonacci[n] is
First[Fold[f, {1, 0, -1}, Rest[IntegerDigits[n, 2]]]]
f[{a_, b_, s_}, 0] = {a (a + 2b), s + a (2a - b), 1}
f[{a_, b_, s_}, 1] = {-s + (a + b) (a + 2b), a (a + 2b), -1}
Fibonacci numbers appear to have first arisen in perhaps 200 BC in work by Pingala on enumerating possible patterns of poetry formed from syllables of two lengths. … In addition:
• GoldenRatio is the solution to x 1 + 1/x or x 2 x + 1
• The right-hand rectangle in is similar to the whole rectangle when the aspect ratio is GoldenRatio
• Cos[ π /5] Cos[36 ° ] GoldenRatio/2
• The ratio of the length of the diagonal to the length of a side in a regular pentagon is GoldenRatio
• The corners of an icosahedron are at coordinates
Flatten[Array[NestList[RotateRight, {0, (-1) #1 GoldenRatio, (-1) #2 }, 3]&, {2, 2}], 2]
• 1 + FixedPoint[N[1/(1 + #), k] &, 1] approximates GoldenRatio to k digits, as does FixedPoint[N[Sqrt[1 + #],k]&, 1]
• A successive angle difference of GoldenRatio radians yields points maximally separated around a circle (see page 1006 ).
In a typical case, each cell is updated using
LFSRStep[list_] := Append[Rest[list], Mod[list 〚 1 〛 + list 〚 2 〛 , 2]]
with a step of cellular automaton evolution corresponding to the result of updating all cells in the register. … In general, linear feedback shift registers can have "taps" at any list of positions on the register, so that their evolution is given by
LFSRStep[taps_List, list_] := Append[Rest[list], Mod[Apply[Plus, list 〚 taps 〛 ], 2]]
(With taps specified by the positions of 1's in a vector of 0's, the inside of the Mod can be replaced by vec . list as on page 1087 .) … Such generators are directly related to linear feedback shift registers, since with a list of length q , each step is simply
Append[Rest[list], Mod[list 〚 1 〛 + list 〚 q - p + 1 〛 , 2 k ]]
Cryptographic generators.
In general, the pattern produced by evolution for t steps is given by
NestList[ Inner[f, Prepend[#, 0], Append[#, 0], List] &, {a}, t]
so that the first few steps yield
{a},
{f[0, a], f[a, 0]},
{f[0, f[0, a]], f[f[0, a], f[a, 0]], f[f[a, 0], 0]},
{f[0, f[0, f[0, a]]], f[f[0, f[0, a]], f[f[0, a], f[a, 0]]], f[f[f[0, a], f[a, 0]], f[f[a, 0], 0]], f[f[f[a, 0], 0], 0]}
If f is Flat , however, then the last two lines here become
{f[0, 0, a], f[0, a, a, 0], f[a, 0, 0]},
{f[0, 0, 0, a], f[0, 0, a, 0, a, a, 0], f[0, a, a, 0, a, 0, 0], f[a, 0, 0, 0]}
and in general the number of a 's that appear in a particular element is given as in Pascal's triangle by a binomial coefficient.
Other significant publications of mine providing relevant summaries were (the dates here are for actual publication—sometimes close to writing, but sometimes long delayed):
• "Computers in science and mathematics" (September 1984) ( Scientific American article about foundations of the computational approach to science and mathematics)
• "Cellular automata as models of complexity" (October 1984) ( Nature article introducing cellular automata)
• "Geometry of binomial coefficients" (November 1984) (additive cellular automata and nested patterns)
• "Twenty problems in the theory of cellular automata" (1985) (a list of unsolved problems to attack—most now finally resolved in this book)
• "Tables of cellular automaton properties" (June 1986) (features of elementary cellular automata)
• "Cryptography with cellular automata" (1986) (using rule 30 as a cryptosystem)
• "Complex systems theory" (1988) (1984 speech suggesting the research direction for the new Santa Fe Institute)
If one draws a more general curve on a page, one can define its curvature at every point by seeing what size of circle fits it best at that point—or equivalently what the coefficients are in a quadratic approximation. … (In Mathematica, the explicit form of such a tensor can be represented as a nested list for which TensorRank[list] 4 .) … If p is a list of coordinate parameters that appear in a d -dimensional metric g , then
Riemann = Table[ ∂ p 〚 j 〛 Γ 〚 i, k 〛 - ∂ p 〚 i 〛 Γ 〚 j, k 〛 + Γ 〚 i, k 〛 .