Neha Patil (Editor)

Remez algorithm

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit

The Remez algorithm or Remez exchange algorithm, published by Evgeny Yakovlevich Remez in 1934, is an iterative algorithm used to find simple approximations to functions, specifically, approximations by functions in a Chebyshev space that are the best in the uniform norm L sense.

Contents

A typical example of a Chebyshev space is the subspace of Chebyshev polynomials of order n in the space of real continuous functions on an interval, C[a, b]. The polynomial of best approximation within a given subspace is defined to be the one that minimizes the maximum absolute difference between the polynomial and the function. In this case, the form of the solution is precised by the equioscillation theorem.

Procedure

The Remez algorithm starts with the function f to be approximated and a set X of n + 2 sample points x 1 , x 2 , . . . , x n + 2 in the approximation interval, usually the Chebyshev nodes linearly mapped to the interval. The steps are:

  • Solve the linear system of equations
  • b 0 + b 1 x i + . . . + b n x i n + ( 1 ) i E = f ( x i ) (where i = 1 , 2 , . . . n + 2 ), for the unknowns b 0 , b 1 . . . b n and E.
  • Use the b i as coefficients to form a polynomial P n .
  • Find the set M of points of local maximum error | P n ( x ) f ( x ) | .
  • If the errors at every m M are of equal magnitude and alternate in sign, then P n is the minimax approximation polynomial. If not, replace X with M and repeat the steps above.
  • The result is called the polynomial of best approximation or the minimax approximation.

    A review of technicalities in implementing the Remez algorithm is given by W. Fraser.

    On the choice of initialization

    The Chebyshev nodes are a common choice for the initial approximation because of their role in the theory of polynomial interpolation. For the initialization of the optimization problem for function f by the Lagrange interpolant Ln(f), it can be shown that this initial approximation is bounded by

    f L n ( f ) ( 1 + L n ) inf p P n f p

    with the norm or Lebesgue constant of the Lagrange interpolation operator Ln of the nodes (t1, ..., tn + 1) being

    L n = Λ ¯ n ( T ) = max 1 x 1 λ n ( T ; x ) ,

    T being the zeros of the Chebyshev polynomials, and the Lebesgue functions being

    λ n ( T ; x ) = j = 1 n + 1 | l j ( x ) | , l j ( x ) = i j i = 1 n + 1 ( x t i ) ( t j t i ) .

    Theodore A. Kilgore, Carl de Boor, and Allan Pinkus proved that there exists a unique ti for each Ln, although not known explicitly for (ordinary) polynomials. Similarly, Λ _ n ( T ) = min 1 x 1 λ n ( T ; x ) , and the optimality of a choice of nodes can be expressed as Λ ¯ n Λ _ n 0.

    For Chebyshev nodes, which provides a suboptimal, but analytically explicit choice, the asymptotic behavior is known as

    Λ ¯ n ( T ) = 2 π log ( n + 1 ) + 2 π ( γ + log 8 π ) + α n + 1

    (γ being the Euler-Mascheroni constant) with

    0 < α n < π 72 n 2 for n 1 ,

    and upper bound

    Λ ¯ n ( T ) 2 π log ( n + 1 ) + 1

    Lev Brutman obtained the bound for n 3 , and T ^ being the zeros of the expanded Chebyshev polynomials:

    Λ ¯ n ( T ^ ) Λ _ n ( T ^ ) < Λ ¯ 3 1 6 cot π 8 + π 64 1 sin 2 ( 3 π / 16 ) 2 π ( γ log π ) 0.201.

    Rüdiger Günttner obtained from a sharper estimate for n 40

    Λ ¯ n ( T ^ ) Λ _ n ( T ^ ) < 0.0196.

    Detailed discussion

    This section provides more information on the steps outlined above. In this section, the index i runs from 0 to n+1.

    Step 1: Given x 0 , x 1 , . . . x n + 1 , solve the linear system of n+2 equations

    b 0 + b 1 x i + . . . + b n x i n + ( 1 ) i E = f ( x i ) (where i = 0 , 1 , . . . n + 1 ), for the unknowns b 0 , b 1 , . . . b n and E.

    It should be clear that ( 1 ) i E in this equation makes sense only if the nodes x 0 , . . . , x n + 1 are ordered, either strictly increasing or strictly decreasing. Then this linear system has a unique solution. (As is well known, not every linear system has a solution.) Also, the solution can be obtained with only O ( n 2 ) arithmetic operations while a standard solver from the library would take O ( n 3 ) operations. Here is the simple proof:

    Compute the standard n-th degree interpolant p 1 ( x ) to f ( x ) at the first n+1 nodes and also the standard n-th degree interpolant p 2 ( x ) to the ordinates ( 1 ) i

    p 1 ( x i ) = f ( x i ) , p 2 ( x i ) = ( 1 ) i , i = 0 , . . . , n .

    To this end, use each time Newton's interpolation formula with the divided differences of order 0 , . . . , n and O ( n 2 ) arithmetic operations.

    The polynomial p 2 ( x ) has its i-th zero between x i 1 and x i ,   i = 1 , . . . , n , and thus no further zeroes between x n and x n + 1 : p 2 ( x n ) and p 2 ( x n + 1 ) have the same sign ( 1 ) n .

    The linear combination p ( x ) := p 1 ( x ) p 2 ( x ) E is also a polynomial of degree n and

    p ( x i ) = p 1 ( x i ) p 2 ( x i ) E   =   f ( x i ) ( 1 ) i E ,         i = 0 , , n .

    This is the same as the equation above for i = 0 , . . . , n and for any choice of E. The same equation for i = n+1 is

    p ( x n + 1 )   =   p 1 ( x n + 1 ) p 2 ( x n + 1 ) E   =   f ( x n + 1 ) ( 1 ) n + 1 E and needs special reasoning: solved for the variable E, it is the definition of E: E   :=   p 1 ( x n + 1 ) f ( x n + 1 ) p 2 ( x n + 1 ) + ( 1 ) n .

    As mentioned above, the two terms in the denominator have same sign: E and thus p ( x ) b 0 + b 1 x + + b n x n are always well-defined.

    The error at the given n+2 ordered nodes is positive and negative in turn because

    p ( x i ) f ( x i )   =   ( 1 ) i E ,     i = 0 , . . . , n + 1.

    The theorem of de La Vallée Poussin states that under this condition no polynomial of degree n exists with error less than E. Indeed, if such a polynomial existed, call it p ~ ( x ) , then the difference p ( x ) p ~ ( x ) = ( p ( x ) f ( x ) ) ( p ~ ( x ) f ( x ) ) would still be positive/negative at the n+2 nodes x i and therefore have at least n+1 zeros which is impossible for a polynomial of degree n. Thus, this E is a lower bound for the minimum error which can be achieved with polynomials of degree n.

    Step 2 changes the notation from b 0 + b 1 x + . . . + b n x n to p ( x ) .

    Step 3 improves upon the input nodes x 0 , . . . , x n + 1 and their errors ± E as follows.

    In each P-region, the current node x i is replaced with the local maximizer x ¯ i and in each N-region x i is replaced with the local minimizer. (Expect x ¯ 0 at A, the x ¯ i near x i , and x ¯ n + 1 at B.) No high precision is required here, the standard line search with a couple of quadratic fits should suffice. (See )

    Let z i := p ( x ¯ i ) f ( x ¯ i ) . Each amplitude | z i | is greater than or equal to E. The Theorem of de La Vallée Poussin and its proof also apply to z 0 , . . . , z n + 1 with min { | z i | } E as the new lower bound for the best error possible with polynomials of degree n.

    Moreover, max { | z i | } comes in handy as an obvious upper bound for that best possible error.

    Step 4: With min { | z i | } and max { | z i | } as lower and upper bound for the best possible approximation error, one has a reliable stopping criterion: repeat the steps until max { | z i | } min { | z i | } is sufficiently small or no longer decreases. These bounds indicate the progress.

    Variants

    Sometimes more than one sample point is replaced at the same time with the locations of nearby maximum absolute differences.

    Sometimes relative error is used to measure the difference between the approximation and the function, especially if the approximation will be used to compute the function on a computer which uses floating point arithmetic.

    References

    Remez algorithm Wikipedia