User:Steinmacher-Burow/sandbox

From Wikipedia, the free encyclopedia

The Triangle of Binomial Transform Coefficients is like Pascal's Triangle.[edit]

This section introduces the triangle of binomial transform coefficients. The BTC triangle is like Pascal's triangle. The two triangles have the same rows and elements and values, except that all elements of Pascal's triangle are positive, while some particular elements of the BTC triangle are negative. The entry in the nth row and kth column of Pascal's triangle is for any non-negative integer n and any integer k between 0 and n. The binomial transform, T, of a sequence of values {vn}, is the sequence {sn} defined by

Ignoring the sign term , the coefficients of the element sn are the respective elements of the row n of Pascal's Triangle. The entry in the nth row and kth column of the BTC triangle is for any non-negative integer n and any integer k between 0 and n. This results in the following example rows through , top to bottom, for the BTC triangle:

                             1                                  // Row n = 0.
                         1      -1                              // Row n = 1 or d = 0.
                     1      -2       1                          // Row n = 2 or d = 1.
                 1      -3       3      -1                      // Row n = 3 or d = 2.
             1      -4       6      -4       1                  // Row n = 4 or d = 3.
         1      -5      10     -10       5      -1              // Row n = 5 or d = 4.
     1      -6      15     -20      15      -6       1          // Row n = 6 or d = 5.
 1      -7      21     -35      35     -21       7      -1      // Row n = 7 or d = 6.

For Pascal's triangle and the BTC triangle, the entries in each row are numbered from the left beginning with and are staggered relative to the numbers in the adjacent rows, so that an element in a row has a left element and a right element in an adjacent row. As described at the top of this article, each element of each row n of Pascal's triangle is the result of the right element plus the left element in the adjacent row , treating a blank right or left entry as 0. In contrast, each element of each row n of the BTC triangle is the result of the right element minus the left element in the adjacent row , again treating a blank right or left entry as 0.

As described above, the elements in Pascal's triangle are the coefficients arising in binomial expansions. The numbers on row n of Pascal's triangle are the coefficients ai in the expansion

Similarly, the numbers on row n of the BTC triangle are the coefficients ai in the expansion

The binomial transform has a relationship to polynomials. The binomial transform of a sequence {vn} is the nth forward differences of the sequence {vn}, with odd differences carrying a negative sign, namely:

where Δ is the forward difference operator. According to the method of finite differences, for any polynomial of degree d or less, any sequence of values at equally spaced positions has a th difference exactly equal to 0. The element sd+1 of the binomial transform is such a th difference. For convenience, each row n of the above example BTC triangle also has a label . Thus for any polynomial of degree d or less, any sequence of values at equally spaced positions has a linear combination result of 0, when using the elements of row d of the BTC triangle as the corresponding linear coefficients. The points and values may be integer or real or complex values. The history of this result and related results are surveyed [1]. For example, if is a polynomial of degree m, then the result is the case in entry (Z.8) of H. W. Gould's Combinatorial Identities which says

In appropriate scenarios, a row of the BTC triangle provides the linear coefficients to do polynomial interpolation as a linear combination of the given values.

With increasing d, the elements of row d and higher of the BTC triangle obey additional properties given by the polynomials of degree d. For the polynomial f(x) = 1 of degree 0, any sequence of values at equally spaced positions has a linear combination result of 0, when using the elements of row d as the corresponding linear coefficients. Each value in any such sequence is 1, so in each row of the BTC triangle, the sum of the elements is 0. For example in each row or higher, the coefficients have a linear combination result of 0 using the sequence from the polynomial , as demonstrated for row , where . For example in each row or higher, the coefficients have a linear combination result of 0 using the sequence from the polynomial , as demonstrated for row , where

For a polynomial of degree d, any sequence of values at equally spaced positions has a linear combination result of 0, when using the elements of row d as the corresponding linear coefficients. This also holds for a polynomial of degree d, constructed to yield the same sequence of values, but in reverse order. So in each row of the BTC triangle, the element values are symmetric front to back. On reversing a row with even d, the overall difference in sign does not impact the linear combination result of 0.

---- CUT ---------- add below aft Definition on Polynomial interpolation

A Linear Combination of the Given Values[edit]

The Lagrange form of the interpolating polynomial is a linear combination of the given values. In many scenarios, an efficient and convenient polynomial interpolation is a linear combination of the given values, using previously known coefficients. Given a set of data points

where each data point is a (position, value) pair and where no two positions are the same, the interpolation polynomial in the Lagrange form is a linear combination

of the given values with each coefficient given by evaluating the corresponding Lagrange basis polynomial using the given positions .

Each coefficient in the linear combination depends on the given positions and the desired position , but not on the given values . For each coefficient, inserting the values of the given positions and simplifying yields an expression , which depends only on . Thus the same coefficient expressions can be used in a polynomial interpolation of a given second set of data points

at the same given positions , where the second given values differ from the first given values . Using the same coefficient expressions as for the first set of data points, the interpolation polynomial of the second set of data points is the linear combination

For each coefficient in the linear combination, the expression resulting from the Lagrange basis polynomial only depends on the relative spaces between the given positions, not on the individual value of any position. Thus the same coefficient expressions can be used in a polynomial interpolation of a given third set of data points

where each position is related to the corresponding position in the first set by and the desired positions are related by , for a constant scaling factor a and a constant shift b for all positions. Using the same coefficient expressions as for the first set of data points, the interpolation polynomial of the third set of data points is the linear combination

In many applications of polynomial interpolation, the given set of data points is at equally spaced positions. In this case, it can be convenient to define the x-axis of the positions such that . For example, a given set of 3 equally-spaced data points is then . The interpolation polynomial in the Lagrange form is the linear combination

This quadratic interpolation is valid for any position x, near or far from the given positions. So, given 3 equally-spaced data points at defining a quadratic polynomial, at an example desired position , the interpolated value after simplification is given by

This is a quadratic interpolation typically used in the Multigrid method.

Again given 3 equally-spaced data points at defining a quadratic polynomial, at the next equally spaced position , the interpolated value after simplification is given by

In the above polynomial interpolations using a linear combination of the given values, the coefficients were determined using the Lagrange method. In some scenarios, the coefficients can be more easily determined using other methods. Examples follow.

According to the method of finite differences, for any polynomial of degree d or less, any sequence of values at equally spaced positions has a th difference exactly equal to 0. The element sd+1 of the Binomial transform is such a th difference. The binomial transform, T, of a sequence of values {vn}, is the sequence {sn} defined by

Ignoring the sign term , the coefficients of the element sn are the respective elements of the row n of Pascal's Triangle. The triangle of binomial transform coefficients is like Pascal's triangle. The entry in the nth row and kth column of the BTC triangle is for any non-negative integer n and any integer k between 0 and n. This results in the following example rows n = 0 through n = 7, top to bottom, for the BTC triangle:

                             1                                  // Row n = 0.
                         1      -1                              // Row n = 1 or d = 0.
                     1      -2       1                          // Row n = 2 or d = 1.
                 1      -3       3      -1                      // Row n = 3 or d = 2.
             1      -4       6      -4       1                  // Row n = 4 or d = 3.
         1      -5      10     -10       5      -1              // Row n = 5 or d = 4.
     1      -6      15     -20      15      -6       1          // Row n = 6 or d = 5.
 1      -7      21     -35      35     -21       7      -1      // Row n = 7 or d = 6.

For convenience, each row n of the above example BTC triangle also has a label . Thus for any polynomial of degree d or less, any sequence of values at equally spaced positions has a linear combination result of 0, when using the elements of row d as the corresponding linear coefficients.

For example, 4 equally spaced data points of a quadratic polynomial obey the linear equation given by row of the BTC triangle.

This is the same linear equation as obtained above using the Lagrange method.

The BTC triangle can also be used to derive other polynomial interpolations. For example, the above quadratic interpolation

can be derived in 3 simple steps as follows. The equally spaced points of a quadratic polynomial obey the rows of the BTC triangle with or higher. First, the row spans the given and desired data points with the linear equation

Second, the unwanted data point is replaced by an expression in terms of wanted data points. The row provides a linear equation with a term , which results in a term by multiplying the linear equation by 4.

Third, the above two linear equations are added to yield a linear equation equivalent to the above quadratic interpolation for .

Similar to other uses of linear equations, the above derivation scales and adds vectors of coefficients. In polynomial interpolation as a linear combination of values, the elements of a vector correspond to a contiguous sequence of regularly spaced positions. The p non-zero elements of a vector are the p coefficients in a linear equation obeyed by any sequence of p data points from any degree d polynomial on any regularly spaced grid, where d is noted by the subscript of the vector. For any vector of coefficients, the subscript obeys . When adding vectors with various subscript values, the lowest subscript applies for the resulting vector. So, starting with the vector of row and the vector of row of the BTC triangle, the above quadratic interpolation for is derived by the vector calculation

Similarly, the cubic interpolation typical in the Multigrid method,

can be derived by a vector calculation starting with the vector of row and the vector of row of the BTC triangle.

---- CUT ---------- add below to Constant-recursive sequence

Sequence of values from any polynomial on a regularly-spaced grid[edit]

For each value , the corresponding row of the triangle of binomial transform coefficients provides the d coefficients for an order-d homogeneous linear recurrence with constant coefficients. The first few equations are listed below.

s(n) = 1s(n-1)                                 // Recurrence order d=1 obeyed by any 0th order polynomial.
s(n) = 2s(n-1) - 1s(n-2)                       // Recurrence order d=2 obeyed by any 1st order polynomial.
s(n) = 3s(n-1) - 3s(n-2) + 1s(n-3)             // Recurrence order d=3 obeyed by any 2nd order polynomial.
s(n) = 4s(n-1) - 6s(n-2) + 4s(n-3) - 1s(n-4)   // Recurrence order d=4 obeyed by any 3rd order polynomial.

Any given sequence of d values can be used to define a polynomial of degree , where the values are assumed to be at contiguous positions on a regularly spaced grid. The d values may be integers or reals or complex numbers. Using the appropriate above order-d homogeneous linear recurrence, the given sequence of d values also defines and is part of a constant recursive sequence. The constant recursive sequence is the sequence of values from that polynomial on a regularly-spaced grid. For example, given the 2 values defining a polynomial of degree 1, then the above equation for yields the next value of the polynomial as

and same above equation for yields the next value as

Each above equation for recurrence order d is obeyed by any polynomial of order or less. So, the same result for is also obtained by using the above equation for .

yields the same result the next value is

Any given sequence of d values contiguous on a regularly spaced grid defines a polynomial of degree . The given sequence of d values also defines and is part of a constant recursive sequence, is the first on a

>> BEGIN OLD TEXT

An order-d homogeneous linear recurrence with constant coefficients is an equation of the form

where the d coefficients are constants.

A sequence is a constant-recursive sequence if there is an order-d homogeneous linear recurrence with constant coefficients that it satisfies for all .

Equivalently, is constant-recursive if the set of sequences

is contained in a vector space whose dimension is finite.

Fibonacci sequence[edit]

The sequence 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ... of Fibonacci numbers satisfies the recurrence

with initial conditions

Explicitly, the recurrence yields the values

etc.

>> END OLD TEXT

---- CUT ---------- add below to Extrapolation#Polynomial

In some scenarios, a polynomial interpolation or extrapolation is simply a (TODO link: linear combination of the known values).

---- CUT ---------- add below to Interpolation#Polynomial interpolation

In some scenarios, calculating the polynomial interpolation is computationally inexpensive, since the polynomial interpolation is a linear combination of the known values.

However, polynomial interpolation also has some disadvantages. Polynomial interpolation may exhibit oscillatory artifacts, especially at the end points (see Runge's phenomenon). Furthermore in some scenarios, calculating the interpolating polynomial is computationally expensive (see computational complexity) compared to linear interpolation.

OLD TEXT: However, polynomial interpolation also has some disadvantages. Calculating the interpolating polynomial is computationally expensive (see computational complexity) compared to linear interpolation. Furthermore, polynomial interpolation may exhibit oscillatory artifacts, especially at the end points (see Runge's phenomenon).

---- CUT ---------- add below to bottom of Linear prediction

For equally-spaced values, polynomial interpolation is a linear combination of the known values. If the discrete time signal is estimated to obey a polynomial of degree then the predictor coefficients are given by the corresponding row of the triangle of binomial transform coefficients. This estimate might be suitable for a slowly varying signal with low noise. The predictions for the first few values of p are

======EXCEPT FOOTNOTES, DELETE BELOW ============================================

DELETE BELOW

The pattern produced by an elementary cellular automaton using rule 60 is exactly Pascal's triangle of binomial coefficients reduced modulo 2 (black cells correspond to odd binomial coefficients).[2] Rule 102 also produces this pattern when trailing zeros are omitted. Rule 90 produces the same pattern but with an empty cell separating each entry in the rows.

  1. ^ Boyadzhiev, Boyad (2012). "Close Encounters with the Stirling Numbers of the Second Kind" (PDF). Math. Mag. 85: 252–266.
  2. ^ Wolfram, S. (2002). A New Kind of Science. Champaign IL: Wolfram Media. pp. 870, 931–2.