via orthogonal polynomials
TRANSCRIPT
MATHEMATICS OF COMPUTATIONVOLUME 53, NUMBER 187JULY 1989, PAGES 249-264
A Fast Algorithm for Rational Interpolation
Via Orthogonal Polynomials
By Ömer Egecioglu*and Çetin K. Koç**
Abstract. A new algorithm for rational interpolation is proposed. Given the data
set, the algorithm generates a set of orthogonal polynomials by the classical three-
term recurrence relation and then uses Newton interpolation to find the numerator
and the denominator polynomials of the rational interpolating function. The number
of arithmetic operations of the algorithm to find a particular rational interpolant is
0(N2), where N + 1 is the number of data points. A variant of this algorithm that
avoids Newton interpolation can be used to construct all rational interpolants using
only 0(N2) arithmetic operations.
1. Introduction. Let R(m, n) be the set of rational functions of the form
rm,n(x) = Pm(x)/qn(x), where pm(x) and qn(x) are polynomials of degree m and
n, respectively. If a set of N +1 = m + n + 1 pairs of points (x¿, fi) for 0 < i < N is
given, then the rational interpolation problem is defined as the task of determining
a rational function rmj„(x) € R(m,n) such that
(1.1) rm,n(xi) = fi forO<i<N,
where the x¿'s are distinct elements. We also assume that the /j's are the values of
a function f(x) at the nodes x¿ for all i.
In the case of polynomial interpolation (i.e., n = 0) it is always possible to
construct a unique polynomial satisfying (1.1), but this is not true for rational
interpolation. For fixed m and n, a rational interpolant that satisfies (1.1) at all
points may not exist, even though it may be possible to satisfy (1.1) on a subset
of the given point set by means of an rll¡u(x) e R(p,u) with p < m and v < n.
For this particular pair m and n, the point set becomes a degenerate configuration.
The points (xj,fj) for which
rli,v\Xj) ^p Jj
are called the unattainable points. Roughly speaking, the existence of an unattain-
able point (xj,fj) for 0 < j < N means that Xj is a common zero of the numerator
and the denominator polynomials. Thus a degenerate point set contains one or
more unattainable points.
A direct algorithm for rational interpolation solves a set of linear equations
(1-2) Pm(^t)-/l<7n(xl) = 0, 0<i<N,
Received June 3, 1987; revised February 4, 1988.
1980 Mathematics Subject Classification (1985 Revision). Primary 65D05; Secondary 33A65.
Key words and phrases. Rational interpolation, orthogonal polynomials, Hankel matrices.
'Supported in part by NSF Grant No. DCR-8603722."Supported in part by Lawrence Livermore National Laboratory Contract No. LLNL-7526225
while the author was with the Department of Electrical and Computer Engineering, University of
California, Santa Barbara, California 93106.
©1989 American Mathematical Society0025-5718/89 $1.00 + $.25 per page
249
License or copyright restrictions may apply to redistribution; see http://www.ams.org/journal-terms-of-use
250 ÖMER EGECIOGLU AND ÇETIN K. KOÇ
to compute the coefficients of the polynomials pm(x) and qn(x), the oldest method
being an elegant elimination process due to Jacobi [6, pp. 326-330], [9]. Jacobi's
method yields exact determinantal formulae for the coefficients of the denominator
and numerator polynomials. A more recent algorithm by Schneider and Werner
[10] makes use of the barycentric representation of the rational interpolant. Here
a set of linear equations of size n is solved by applying Gaussian elimination to
compute the coefficients of qn(x).
Direct methods can be computationally inefficient because the solution of a gen-
eral set of linear equations may require as much as 0(t73) arithmetic operations.
Jacobi's algorithm, on the other hand, results in a Hankel system of linear equa-
tions, which in turn can be solved with 0(n2) arithmetic operations.
We remark that alongside the direct algorithms there exists an array of iterative
methods to construct rm,„(x), and the reader is referred to [4] for a review of these
algorithms.
In this paper we propose a fast direct algorithm for rational interpolation. Given
the data set (x¿,/¿) for 0 < i < N, the algorithm first generates a sequence qo(x),
qi(x),... ,qn(x) of orthogonal polynomials on the discrete set {xo,xi,... , x;v} with
respect to certain weights. The values of these polynomials at the nodes x¿ for
0 < i < N are computed by using the classical three-term recurrence relation sat-
isfied by orthogonal polynomials. Once the values of a particular polynomial are
known, its coefficients can be computed easily via Newton interpolation. The last
orthogonal polynomial qn(x) generated by this algorithm is the required denom-
inator polynomial of the rational interpolant. Once the denominator polynomial
qn(x) is determined, the construction of the numerator pTO(x) becomes a polyno-
mial interpolation problem. We prove that the number of arithmetic operations of
this algorithm to find a particular rational interpolant for given values of m and n
is 0(N2).
The coefficients of the orthogonal polynomials can also be found without the
application of the Newton interpolation algorithm. This is again achieved by using
the three-term recurrence formula. The resulting algorithm requires 0(N2) arith-
metic operations to generate the polynomials qo(x), qi(x),... ,q^(x). If the same
reasoning is applied to the data (x¿, f~~l) for 0 < i < N, the coefficients as well as
the values of the numerator polynomials po(x), Pi(x),... ,pn(x) can be computed.
We show that in this way all rational interpolants rm,n(x) with m + n = N and
0 < 77 < N can be computed using a total of only 0(N2) arithmetic operations
provided that fi ^0 for all 0 < i < N, and the orthogonal polynomials exist.
The outline of this paper is as follows: In Section 2, we describe the Jacobi
algorithm for rational interpolation. Section 3 outlines the use of orthogonal poly-
nomials to compute a particular rational interpolant based on a generalization of
Jacobi's approach and Newton interpolation. Fast computation of all rational inter-
polants that avoids Newton interpolation is described in Section 4. This is followed
by examples for each one of these algorithms in Section 5, and conclusions and
suggestions for further research in Section 6.
2. Jacobi Rational Interpolation Algorithm. Let [g(x)]0...N denote the
Nth divided difference of a function g(x) with respect to the node values x¿ for
License or copyright restrictions may apply to redistribution; see http://www.ams.org/journal-terms-of-use
A FAST ALGORITHM FOR RATIONAL INTERPOLATION 251
0 < i < N. Put
(2.1) w(x) = (x - x0)(x - xi) • • ■ (x - xjv)
andTV
(2.2) Wi = w'(xi) = Y[{xi-Xj).
3=0JTti
By direct application of the Lagrange interpolation formula one has
(2-3) [ff(*)W = ££
where gi = g(xi). Note that (2.3) gives the leading coefficient of the polynomial
of degree at most N that takes the values & at the node points x¿ for 0 < i <
N. Clearly, if g(x) is a polynomial of degree strictly less than A^, then [g(x)]o-.-N
vanishes.
From (1.2) we can write for any j > 0
(2.4) APm(xi) = x3lfiqn(xi) [mQ^{^N
Wi Wi
and by summing these terms over i we obtain
y> x{pm(xi) _ y* xifiqn(xi)
¿-i Wi -nwii=0 1=0
Using the definition (2.3) this can be simplified as
(2.5) [x3pm(x)}0...N = [x3f(x)qn(x)}0-N-
The left-hand side of (2.5) is equal to the Nth divided difference of the polynomial
x3prn(x). Thus, if j is in the range 0 < j < n — 1, we have
deg(xJpm(x)) =j + m<n-l + m = N-l.
Hence,
(2.6) [xjpm(x)]o...N =0 for 0 < j < n - 1
and therefore
(2.7) [x3f(x)qn(x)}o...N = 0 forO<j<n-l.
The equation (2.7) allows us to compute the coefficients of qn(x) by solving a set
of linear equations. Since there are n equations and n + 1 unknowns, one of the
parameters can be chosen arbitrarily.
If qn(x) is represented in the standard power basis,
n
Qn(x) = J2bl<xk>k=0
then from (2.7) the 6/t's satisfy the following linear system of equations
£^^ = £^¿ fc = 0i o^y<«-if^—' Wi *—' Wi ^-^i=0 ' i=0 * fc=0
License or copyright restrictions may apply to redistribution; see http://www.ams.org/journal-terms-of-use
252 OMER EGECIOGLU AND ÇETIN K. KOÇ
which can be put in the form
n
(2.8) J2 hJ+kbk = 0,k=0
where
(2-9)
N
hs = Ei=0
fixlWi
0<j<n-l,
0 < s < 277 - 1.
The system of equations given in (2.8) is a Hankel system. As indicated before,
we have one degree of freedom in choosing the coefficients of qn (x) in any rational
interpolation. From now on we will assume that qn(x) is a monk polynomial of
degree n, that is bn = 1- With this choice, (2.8) can be rewritten as the matrix
equation
(2.10)
Therefore,
(2.11)
where
hohi
h2
hih2
h3
hh3
tl4
hn-i
h„
hn+i
hn-i h„ hn
Qn(x)det(Hn-i)
+ 1 ■•' l2n-2
h0 hi
hi h2
hn-i hn
1 x
bo
hb2
bn-]
hn
hn+l
hn+2
72n-l
det
hn-i hn
hn hn+i
h-2n-2 h2n-l„n-1 „.n
Hj =
ho hihi h2
hjhj+i
hj+ i h2]
As it stands, the determinantal formula (2.11) is computationally inefficient to
construct the denominator polynomial qn(x). However, Trench [12] has provided a
fast algorithm to solve the Hankel system (2.10) directly. If all of the matrices Hq,
Hi, ..., Hn-i are nonsingular, then the number of arithmetic operations to invert
Hn-i is proportional to n2. Thus the system in (2.10) can be solved in 0(n2)
arithmetic operations given the nonsingularity condition on the principle minors of
Hn-i-
Note that the existence of the denominator of degree n for rm,n(x) depends
only on the nonsingularity of the matrix Hn-i by (2.11). The nonsingularity of
all the matrices Ho, Hi,... ,Hn-i is thus equivalent to the existence of all of the
denominator polynomials qo(x), qi(x),... ,qn(x). It turns out that this is precisely
the assumption required on the matrices H0, Hi,..., Hn-i for the construction of
orthogonal polynomials outlined in the next section.
Once the coefficients of qn(x) are found, we can evaluate qn(x) at all of the node
points to check if the data set is degenerate for the given values of m and n and
License or copyright restrictions may apply to redistribution; see http://www.ams.org/journal-terms-of-use
A FAST ALGORITHM FOR RATIONAL INTERPOLATION 253
thus locate unattainable points. The coefficients of pm (x) can then be computed by
performing a polynomial interpolation for the data set (x¿, fiqn(xi)) for 0 < i < m.
To summarize, Jacobi's algorithm for rational interpolation can be carried out
in the following manner:
Jacobi Algorithm
Input: (xi, fi) for 0 < i < N.
Output: Coefficients of pm(x) and qn(x) of the rational interpolant rm,n(x).
Step 1. Compute Wi for 0 < i < N using (2.2).
Step 2. Compute hs for 0 < s < 2n — 1 using (2.9).
Step 3. Solve the resulting Hankel system by using the Trench algorithm to find
the coefficients of qn (x) in the standard form.
Step 4. Check whether or not the data set is degenerate for the given values of m
and n, i.e., check if qn(xt) = 0 for any 0 < i < N by evaluating qn(x) at all x¿ and
thus locating the unattainable points.
Step 5. Interpolate the data set (x¿, fiqn(xi)) for 0 < i < m using the Newton
interpolation algorithm to find pm (x) in the Newton form.
Thus we have
THEOREM 1. Given the data set (xj,/¿) for 0 < i < N, the Jacobi algorithm
computes the coefficients of the rational interpolant rm,n(x) which satisfies (1.1)
using 0(N2) arithmetic operations.
Proof. We will count the number of arithmetic operations at each step of the
algorithm.
In Step 1, Wi can be calculated with N subtractions and N — 1 multiplications for
any fixed i. For all i = 0,1..., N this clearly takes 0(N2) arithmetic operations.
In Step 2, first Xs is computed for all s = 0,1,... ,2n —1 with 2n-2 multiplications.
To compute hs we perform N +1 multiplications, N + Í divisions and TV additions.
For all s = 0,1,..., 2n - 1 this takes O(Nn) operations. Thus Step 2 takes 0(N2)
arithmetic operations.
The solution of the Hankel system takes 0(n2) arithmetic operations as stated
earlier. Step 4 consists of evaluating a polynomial of degree n at N + 1 points.
Hence up to Step 5, the number of operations required is no more than 0(N2).
Finally, in Step 5 we apply the Newton interpolation to construct the polynomial
Pm(x) which takes |m(m-f 1) = 0(7772) = 0(N2) operations [5]. Thus the number
of operations of the Jacobi algorithm add up to 0(N2). D
It should be noted that Step 3 of the Jacobi algorithm can be carried out with
0(n2) arithmetic operations without the assumption that the principal minors of
Hn-i be nonzero (except det(Hn-i)) by applying an algorithm of Rissanen to solve
Hankel and Toeplitz systems [8]. Nevertheless, if one is interested in constructing
all rm,n (x) for m + n = A7 and 0 < n < N, we see that the construction of all of
the denominator polynomials qo(x), qi(x),..., qn(x) would require the solution of n
such systems, resulting in an 0(n3) algorithm. Given the nonsingularity assumption
on the matrices Hq, Hi,..., Hn-i, we can compute all of the polynomials qo(x),
License or copyright restrictions may apply to redistribution; see http://www.ams.org/journal-terms-of-use
254 OMER EGECIOGLU AND ÇETIN K. KOÇ
qi(x),... ,qn(x) with a total of 0(n2) arithmetic operations by using orthogonal
polynomials. This is the subject matter of the next section.
Alternatively, the process that yielded the coefficients of qn(x) can be repeated
with the data set (x¿,/t_1) for 0 < i < N to construct the coefficients of pm(x). To
this end, note that (1.2) can be written as
Qn(Xi) - TPm(xi) =0, 0<i<N,Ji
provided /¿ # 0 for all 0 < i < N. By representing pm (x) in its standard form
TO
Pm(x) = ^2akxk
k=0
and applying the same reasoning as in the Eqs. (2.4) through (2.8), we obtain
TO
(2.12) ^2 h3+kak = °» 0 < j < m - 1,
where
(2.13) fe's==£-£L 0<S<2m-l.-_n JiWi
k=0
N
t=0
Again the system of equations in (2.12) becomes a Hankel system. By assuming
Pm(x) to be a monic polynomial for the moment, we obtain a system of linear
equations of size m with the unknowns ao, a\,... ,am-i similar to (2.10):
(2.14)
KK
l/4-1
K h'2h'2 h'3
W, h'A
"m "*n
h'm-l
h'm
nm+l
/i2to-2-I Lam-1
a0
0-2
nm+l
hm+2
K,m+1 "2to-2-I L-m-ij L«2m-1-
Since Pm(x) and qn(x) cannot be forced to be monic at the same time, we
need to multiply one of these polynomials with a nonzero constant to make them
consistent with (1.1). Thus if qn(x) and pm(x) are monic polynomials as solutions
of the equations (2.10) and (2.14), the corresponding rational interpolant is simply
(x)(2.15)
where
i,n(x) —
am =
OmPn
Qn(x)
foQn(xo)
Pm(xo)
assuming that (xq, /o) is an attainable point. If we put
(2.16) *3 =
h'o
h\
K
K
h'J+i
h>3 '
h'j+i
h'0"3 "¿+1 ''2j J
and use the Trench algorithm to solve (2.14), we see that the matrices H'Q, H[,...,
H'm_1 should be nonsingular.
License or copyright restrictions may apply to redistribution; see http://www.ams.org/journal-terms-of-use
A FAST ALGORITHM FOR RATIONAL INTERPOLATION 255
Thus, Newton interpolation can be avoided in Step 5 of the Jacobi Algorithm by
solving another Hankel system to determine pm(x). Since the number of arithmetic
operations to solve a Hankel system or to perform a Newton interpolation is the
same, 0(m2), we see that this approach does not provide any gains in terms of
number of arithmetic operations. However, we will make use of this idea in Section
4 to devise an algorithm to construct all rational interpolants using only 0(N2)
arithmetic operations.
The Jacobi algorithm may have undesirable numerical properties because of the
stability issues involved in the way the divided differences (i.e., the individual hs's)
are calculated. The algorithm proposed by Schneider and Werner in [10] makes
use of the barycentric representation of the rational interpolant and seems to have
better numerical properties. On the other hand, there is a trade-off in terms of
time complexity, since the linear system of equations that arise in this particular
algorithm has no additional structure to facilitate a reduction in the overall time
complexity. In particular, the use of Gaussian elimination to solve a general system
of linear equations, as proposed, requires 0(n3) operations. Thus the number of
arithmetic operations required by the Schneider-Werner algorithm to compute a
particular rational interpolant is 0(N3) because of this apparent bottleneck, as
opposed to 0(N2) achieved by the Jacobi algorithm.
3. Rational Interpolation Using Orthogonal Polynomials. Our point
of departure will be the Jacobi algorithm and we will show that it is possible
to compute the denominator polynomial qn (x) without solving a system of linear
equations.
We start by noting that any polynomial of degree j in x¿ can be used as a mul-
tiplier in Eq. (2.4). It follows that (2.5) and (2.7) hold for an arbitrary polynomial
tj (x) degree j in place of x3. Hence we have
N fi(3.1) [tj(x)f(x)qn(x)]0-N = ^2 —tji^Q^Xi) = 0
¿=o Wl
for 0 < j < n — 1. Set c¿ = fi/wi for 0 < i < N and define a discrete symmetric
bilinear form {•, •) on the space of polynomials of degree less than or equal to n by
setting
N
(3.2) (tj(x),tk(x)) := Y,Citj(xi)tk(xi).i=0
Using (3.2), the linear system (3.1) can be written as
JV
(3.3) ^2cit3(xi)qn(xi) = (tj(x),qn(x)) = 0, 0<j<n-l.i=0
Note that the bilinear form (3.2) does not necessarily define an inner product
since it is possible to have (tj(x),tj(x)) < 0. For our purposes, however, it suffices
to assume nondegeneracy, that is, (tj(x), tj(x)) ^ 0 for 0 < j < n. If we require the
set {io(x), ii(x),..., tn(x)} to be orthogonal with respect to this discrete bilinear
form, then the nondegeneracy condition together with (3.3) imply that qj(x) is
a constant multiple of tj(x) for j = 0,1,... ,n. In particular, the denominator
polynomials qo(x), qi(x),... ,qn(x) are orthogonal with respect to (3.2).
License or copyright restrictions may apply to redistribution; see http://www.ams.org/journal-terms-of-use
256 OMER EGECIOGLU AND ÇETIN K. KOÇ
The nondegeneracy of the bilinear form (3.2) is in turn guaranteed by the non-
singularity of the matrices Ho, Hi,..., Hn-i-
THEOREM 2. There exists a sequence of orthogonal polynomials {<o(x),
ti(x),... ,£n(x)} on the set {xo,xi,... ,x^} with respect to the symmetric bilin-
ear formN
fi(tj(x),tk(x)) = ^2-^-tj(Xi)tk(xl)
i=0
if and only if the matrices Hq, Hi, ..., Hn-i are all nonsingular.
Proof. From the general theory of orthogonal polynomials [1], the polynomial
tj (x) is given explicitly (up to a constant multiple) by the determinant
(3.4)
Note that
tj(x) = det
(1,1) <l,x)
(x, 1) (x,x)
iy-M) <x^-\x)1 X
(i,x»;>
(x,x})
(x3~l,x3)
xi
Nh(xk,xl) = J2^k+l = hk+l.
i=o —
Thus the coefficient of x1 in tj(x) is precisely the determinant of H,_i, which has
to be nonzero. D
Since we have assumed that qn(x) is monic, by making use of (3.4) we arrive at
Jacobi's explicit formula for the denominator polynomials given in (2.11).
The conventional method for generating orthogonal polynomials is the Gram-
Schmidt orthogonalization process. However in our case, this approach would re-
quire 0(n2) inner product operations to generate qn(x). A more efficient technique
is to use the three-term recurrence relation for orthogonal polynomials to generate
the values of the polynomials q-, (x) directly. With this approach, the total number of
inner product operations required to compute the values qo(xi), qi (x¿),..., gn_i (x¿)
for any given point x¿ becomes only 0(n) [3], [7], [11].
More precisely, let {to(x), ti(x),..., tn(x)} be a set of polynomials satisfying the
orthogonality relationship with respect to the weights c¿ and the sequence of data
points Xi for 0 < i < N. It is well known that
(3.5)i_i(x) = 0, i0(x) = l,
tj+i(x) = (X - Oj)tj(x) - ßjtj-i(x), j = 0,1,...,
where a} and ßj are constants determined as
_ (xtj(x),t3(x)) a _ (t:i(x),t:i(x))(3.6) a,
(tj(x),tj(x)) 'A =
(tj-l(x),tj-i(x))'
Note that the relation (3.5) generates monic orthogonal polynomials, and requires
only the nondegeneracy of the underlying symmetric bilinear form.
License or copyright restrictions may apply to redistribution; see http://www.ams.org/journal-terms-of-use
A FAST ALGORITHM FOR RATIONAL INTERPOLATION 257
Let T = [Tji] be the (N + 1) x (N + 1) matrix where
(3.7) Tji = tj(xi), 0<i,j<N.
In other words, the jth row of T consists of the vector of values of the jth orthogonal
polynomial tj(x) at the nodes Xo, Xi,...,xjv- The following procedure generates
the first n + 1 rows of the matrix T using the three-term recursion (TTR) in (3.5).
Procedure TTR.
Input: n and (x,, /¿) for 0 < i < N.
Output: T = [Tji] for 0 < j < n and 0 < i < N.
Step 1. Compute Wi and c¿ for 0 < i < N using
tt fiWi = JJ(x¿ - Xj) and c¿ = —.
3=0
Step 2. Set T0i = 1 for 0 < i < N, ß0 = 0, and compute
N N
O; anH n/r. =
0oio = ^2 c»x*' 9° = ^2Ci' and a°= "^
i=0 i=0
Step 3. Set Ti¿ = x¿ - ao for 0 < i < N, and compute
N N
li = ̂ 2 CiXiT2t, ei = J2ciTu, and aj = J-, ft = £¿=o ¿
5iep 4. For 1 < j < n - 1 compute
-i 0o '
ri+M = (xt - a^Tyi - ^Tj-a.i, 0 < i < N,N N
l3 + l = J2 CiX*Tj+l,i> e3 + l = ^2 C'T3+hi't=0 t=0
- li±l R - e3 + 1a3 + l - ~d-' P3 + Í - -J—-
i/j + 1 0j
We will denote by T: = TTR(n, a, fi) the (n +1) x (N +1) matrix produced by
TTR from the input data 77 and (x¿, /¿), 0 < i < N.
LEMMA 1. Given the data set (x¿,/¿) for 0 < i < N, and n < N, Procedure
TTR computes the first n + 1 rows of the matrix T using
(3.8) 2AT2 + lONn + 2N + 10n-l = 0(N2)
arithmetic operations. In particular, all rows of T can be computed with
(3.9) 12N2 + 12N-1 = 0(N2)
arithmetic operations.
License or copyright restrictions may apply to redistribution; see http://www.ams.org/journal-terms-of-use
258 OMER EGECIOGLU AND ÇETIN K. KOÇ
Proof. In Step 1 the computation of w¿ takes 2N — 1 operations for a particular
value of z. All 0 < i < N takes (N+1)(2N—1) operations. The c¿'s can be computed
in N + 1 operations. Hence Step 1 of the procedure takes 2N2 + 2N arithmetic
operations. The computation of ao in Step 2 takes 2>N + 2 arithmetic operations.
In Step 3, Tu and Tx2 are computed with 2(N +1) arithmetic operations. Then to
compute ai and ßi we need to perform 5N + 5 arithmetic operations. Thus Step
3 takes IN + 7 operations. In Step 4 for a particular value of j the computation
of Tj+iti and lf+li takes b~N + 5 arithmetic operations. Then to compute aJ+i
and ßj+i, 57V + 5 operations are needed. For all 1 < j < n — 1, Step 4 takes
(n - 1)(107V + 10) operations. The result in (3.8) thus follows. To find (3.9) we
replace n with N in (3.8). D
We are now in a position to describe the rational interpolation algorithm via
orthogonal polynomials and to prove that rational interpolation can be done using
0(N2) arithmetic operations. The following algorithm first generates the first n+1
rows of the matrix Q = [Qji], where Qji = Oj(x¿), and then applies the Newton
interpolation algorithm to find qn(x) and pm(x).
Algorithm 1.
Input: (xj, fi) for 0 < i < N.
Output: Coefficients of pm(x) and qn(x) of the rational interpolant rm<n(x).
Stepl. Q: = TTR(n,xl,fi).
Step 2. Interpolate the data set (xi,Qni) for 0 < i < n to compute the coefficients
of qn(x) in the Newton form by using the Newton interpolation algorithm.
Step 3. Compute fiQn% for all 0 < i < N and then interpolate the data set
(xí, fiQni) for 0 < i < 777 to compute the coefficients of pm(x) in the Newton
form by using the Newton interpolation algorithm.
THEOREM 3. Given the data set (xi,ft) for 0 < i < N, Algorithm 1 computes
the coefficients of the rational interpolant rmyn(x) which satisfies (1.1) using 0(N2)
arithmetic operations.
Proof. By Lemma 1, Step 1 takes 2N2 + lOAn + 2N + lOn - 1 arithmetic opera-
tions. Step 2 is an interpolation process with n + 1 points. This requires |n(n + 1)
operations [5]. Similarly, in Step 3 we first compute fiQni for all 0 < i < m and
then perform a polynomial interpolation with m+1 points; hence, 7n+l+|m(7n+l)
arithmetic operations need to be performed in this step. If we sum the number of
operations at each step we conclude that Algorithm 1 takes
(3.10) 2/V2 + §(n2 + m2) + lOAn + 2/V + f n + \m = 0(N2)
arithmetic operations. D
One remarkable property of Algorithm 1 is that it makes it trivial to check
whether the given data set is degenerate for any values of m and n with m + n = N.
To check for degeneracy, we compute the values of Qj% for all 0 < j < N in
Step 1. This implies that the input set for the Procedure TTR is N and (x¿,/,)
for 0 < i < N. The number of arithmetic operations to compute all rows Q is
12N2 + 12N - 1 as given in (3.9). Thus the total number of arithmetic operations
License or copyright restrictions may apply to redistribution; see http://www.ams.org/journal-terms-of-use
A FAST ALGORITHM FOR RATIONAL INTERPOLATION 259
of Algorithm 1 increases slightly to
(3.11) 12/V2 + |(n2 + m2) + 12A + fn+|7n,
which is still 0(N2). This allows us to select a particular value of m and n for
which the data set is not degenerate while keeping the total number of operations
within 0(N2).
4. Fast Computation of All Rational Interpolants. Note that it is possible
to compute the coefficients of the polynomial qn(x) recursively using the three-term
recurrence formula in (3.5) and thus avoid the Newton interpolation in Step 2 of
Algorithm 1. This can be done by applying the three-term recursion directly to the
coefficients of the denominator polynomials. More precisely, let B = [Bjk] be the
(N + 1) x (N + 1) matrix in which the jth row consists of the coefficients of the
polynomial qj(x), i.e.,
(4.1) q,(x) = ¿ Bjkxk.
fc=o
Then S is a lower triangular matrix with unit diagonal whose elements satisfy the
recursion
(4.2) Bj+ltk = Bjik-! - ajBjk - ßjBj-i,k, 0<k<j<N-l,
induced by (3.5). In (4.2) we take
Bj-i=0 for 0 < j'< TV,4.3 h -J- y
H_i,fc = 0 forO<k<N.
Thus using this recursion formula we can generate the coefficients of the polyno-
mials qj(x) for 0 < j < n. The values of the polynomials qj(x) at the node points
Xi (i.e., Qji) are computed at each step to calculate aj and ßj, but this also helps
to locate the unattainable points if the point set happens to be degenerate for the
particular values of m and n.
If only one rational interpolant is needed then, in Step 2 of Algorithm 1, the
choice between the Newton interpolation algorithm or the application of recurrence
formula in (4.2) is somewhat arbitrary, since both algorithms will require 0(n2)
arithmetic operations. For the Newton algorithm, however, the constant in front
of the order is smaller.
More importantly, the generation of the coefficients of the polynomials qj(x),
0 < j < n, in 0(n2) arithmetic operations suggests a drastic cut-down on the
number of arithmetic operations when all rational interpolants rm,n(x) for 0 < n <
N with m = N - n are computed. We note that for 0 < j < N the coefficients
of the polynomials pj (x) can also be computed similarly by applying the recursion
in (4.2) to the data (x¿, /,_1) for 0 < i < N, as we already remarked at the end of
Section 2. This is possible provided /¿ / 0 for 0 < z < TV and H0, H[,...,H'N_l
are nonsingular. This given, define A = [Ajk] and P = [Pij] to be (N + 1) x (N + 1)
matrices where the jth row of A contains the coefficients of the polynomial Pj(x),
(4.4) p,(x) = ¿Ajfcxfc,
k=0
License or copyright restrictions may apply to redistribution; see http://www.ams.org/journal-terms-of-use
260 ÖMER EGECIOGLU AND ÇETIN K. KOÇ
and the jth row of P contains the values of the polynomial Pj(x) at the nodes x¿
Pji = pj(xi), 0<i,j<N,
similar to the matrices B and Q.
The following algorithm first generates the values and the coefficients of the
polynomials qj(x) for all 0 < j < N. The algorithm then proceeds to generate the
values and the coefficients of the polynomials pj (x) for 0 < j < N by applying the
same technique to the data (x¿, ff ) for 0 < i < N.
Algorithm 2.
Input: (xí, fi) for 0 < i < N.
Output: Coefficients of pm(x) and qn(x) for 0 < n < TV and m = N — n.
Stepl. Q:=TTR(N,Xi,fi).Step 2. Set Bjj = 1 for 0 < j < N and Bjk = 0 for 0 < j < k < N. Set Bw = -a0.
For all 0 < k < j < N - 1 compute
Bj+i,k — Pj,k-\ — OLjBjk — ßjBj-i^k-
Step 3. Compute f~l for 0 < i < N and P := TTR(N, Xi,f~l).
Step 4. Set Ajj = 1 for 0 < j < N and Ajk = 0for0<j<k<N. Set Aw = -a0.
For all 0 < k < j < N - 1 compute
Aj+i,k = Aj,k-i - oijAjk - ßjAj-itk-
Step 5. Update the coefficients of Pj(x) according to (2.15):
Ajk = !(ß^-Ajk, 0<k<j<N.fjo
At the end of Algorithm 2, the coefficients of the polynomials
are Amk and Bnk, respectively, for 0 < k < N. Note that Amk =
Bnk = 0 for k > n.
THEOREM 4. Algorithm 2 computes all rational interpolants rmin(x) for
n + m = N and n = 0,1,... ,N using 0(N2) arithmetic operations provided the
matrices Ho, Hi,..., Hjv-i o.nd H'Q, H[,..., H'N_1 are nonsingular.
Proof. As we showed in Theorem 2, the orthogonal polynomials qo(x), qi(x),...,
o;v(x) can be constructed if and only if the matrices Ho, Hi,...,Hjv-i are all
nonsingular. By applying the same technique to the data (x¿, /,_1) for 0 < i < N,
we conclude that the polynomials po(x), pi(x),... ,Pn(x) can be constructed if the
matrices H0, H[,..., H'N_1 are all nonsingular and if fi ^ 0 for all 0 < i < N.
To compute the number of arithmetic operations required for Algorithm 2 we
count the operations at each step. Step 1 takes 12Ar2+12Ar-l arithmetic operations
by Lemma 1. Also Step 3 will take N +1 + 12N2 + 12N - 1 arithmetic operations.
For each of Step 2 and 4 notice that the recursion in (4.2) requires X)i_Ti 12í=o ^ =
2N2 + 27V - 4 arithmetic operations. Also in Step 5 only the lower triangular part
of the matrix A is updated which results in
N-l j j .
2N + 2+^2^2l = -N2 + -N + 3j = l fc=0
pm(x) and gn(x)
0 for k > m and
License or copyright restrictions may apply to redistribution; see http://www.ams.org/journal-terms-of-use
A FAST ALGORITHM FOR RATIONAL INTERPOLATION 261
arithmetic operations. Thus Algorithm 2 requires a total of
(4.5) Ç/V2 + 6iAr_6 = 0(Ar2)2 2
arithmetic operations to compute all rational interpolants. D
5. Examples. The algorithms have been implemented on a VAX-11/780 com-
puter running Unix 4.2 BSD, using the Pascal programming language. Even though
we have not yet conducted a detailed experimental study of the numerical prop-
erties of these algorithms, we present computer generated solutions to two simple
interpolation problems.
Example 1 (Algorithm 1). Given f(x) = \x\, find r2,2(x) which interpolates f(x)
at the node points —1, -0.5, 0, 0.5, 1. We apply Step 1 of Algorithm 1 to the data
and obtain the following Q matrix of size (5x5):
Q =
1.00
1.00
1.50
0.75
0.00
1.00 1.00
0.50 0.00
0.75 0.50
0.75 0.00
0.00 0.25
1.00
0.50
0.75
0.75
0.00
1.00
1.00
0.75-0.75
0.00
The rows of the matrix Q are the values of the denominator polynomials qj(x) at
the nodes x¿ for 0 < i, j < 4. As mentioned before, if Qn% = 0 for an i then
the point (xj,/¿) is an unattainable point for the (m,n) pair. An inspection of all
entries in Q gives the following result:
m n unattainable points
none
(0,0)none
(0,0)0 4 all points except (0,0)
The rational interpolant 7-2,2(x) interpolates f(x) at all points. In order to deter-
mine q2(x), we use the Newton interpolation algorithm. The values of the polyno-
mial q2 (x) at the node points are seen from the third row to be
q2(-l) = 1.50, q2(-0.5) = 0.75, q2(0) = 0.50, g2(0.5) = 0.75, q2(l) = 0.75.
Since three points are necessary and sufficient to determine the coefficients of 0.2 (x),
we choose the first three points: (-1, 1.50) (—0.5, 0.75), (0,0, 0.5), and find
q2(x) = x2+0.5. In order to determine the coefficients of the numerator polynomial,
first we compute
/0Q20 = 150, AQ21 = 0.375, /2Q22 = 0.00
and then apply Newton interpolation to the data (-1, 1.50), (-0.5, 0.375), (0, 0.00)
to find the numerator polynomial P2(x) = 1.50x2. Thus,
p2(x) 1.50X2r2,2(x) = —7—r = ,,-.-•
q2(x) x2 +0.5
License or copyright restrictions may apply to redistribution; see http://www.ams.org/journal-terms-of-use
262 OMER EGECIOGLU AND ÇETIN K. KOÇ
Here we note that since f2 = 0, Algorithm 2 cannot be applied to find all rational
interpolants for this problem.
Example 2 (Algorithm 2). Given f(x) = 2X, find all rational interpolants of
f(x) at the node points —2, —1, 0, 1, 2. The application of Step 1 and Step 2 of
Algorithm 2 to this data set produces the following Q and B matrices:
Q =
B
48-192
384
1-6
26-72
96
1-7
36-120
192
0
1-9
38-66
1-6
26-72
96
0
0
1-9
23
1-5
18-42
48
0
0
0
0
1
1-4
12-24
24
Thus we observe that for this interpolation problem all points are attainable for all
(m, n) pairs. The elements of B are the coefficients of the denominator polynomials
<7j(x) for 0 < j < 4. In other words, the entries in the first column are the coefficient
of x° in qj(x), the entries in the next column are the coefficient of x, and so on.
The unit diagonal entries correspond to the coefficient of the leading term x3 in
qj(x).
Similarly, the application of Steps 3, 4 and 5 of Algorithm 2 produces the coef-
ficients of the numerator polynomials, namely the A matrix:
A =
96-72
26-6
1
0-12
9_ IS
61116
0
0
1_ 3
42396
0
0
0_1_12J_16
0
00
0J_96 J
Hence the rational interpolants are found to be
Po(x)»"0,4 (X) =
rlAx) =
r2,2 (x) =
r3,l(z) =
r<i,o(x)
96
94 (x)
Pi(x)
«73 (z)
P2(X)
Q2(x)
PA1)Qi(x)
Pi(x)
Qo(x)
6x3 + 23x2
12x + 72
66x + 96'
-x3 + 9x2-38x + 72'
x2 + 9x + 26
x2-9x + 26'
x3 + 9x2 + 38x + 72
-12X + 72
x4 + 6x3 + 23x2 + 66x + 96
96
6. Summary and Conclusions. We have described two algorithms for ra-
tional interpolation. Given that the Hankel matrices Ho, Hi,...,Hv-i are all
nonsingular, the first one of these algorithms (Algorithm 1) generates orthogonal
polynomials qo(x), <7i(x),... ,<7jv(x) which are the monic denominator polynomials
License or copyright restrictions may apply to redistribution; see http://www.ams.org/journal-terms-of-use
A FAST ALGORITHM FOR RATIONAL INTERPOLATION 263
of the associated rational interpolants. If the computation of the corresponding nu-
merator polynomials are then carried out by Newton interpolation, then the number
of arithmetic operations required becomes 0(7V3). However, if the corresponding
matrices H'Q, H[,..., H'N_1 for the numerators are also nonsingular, then Newton
interpolation can be avoided, and all rational interpolants can be found with only
0(N2) arithmetic operations. This is the content of Algorithm 2.
Note that in case a particular matrix Hj_i happens to be singular, then it is no
longer possible to continue the generation of the denominator polynomials qj(x),
(7i+i(x),... ,9jv(x) by using the three-term recursion, as the necessary condition
for the existence of the desired orthogonal family of polynomials is not satisfied.
Thus, if the discrete symmetric bilinear form we are interested in happens to be
degenerate, it is not clear how to proceed with the method of orthogonal poly-
nomials to generate the rest of the rational interpolants. At this point, however,
the remaining denominator polynomials can be computed individually by repeated
application of Rissanen's algorithm at a cost of 0(N2) operations each. Similarly,
the singularity of a matrix H',_l associated with a numerator polynomial puts a
limit on the applicability and the operating range of Algorithm 2. Nevertheless, it
is possible to combine these two approaches for a hybrid algorithm whose running
time is guaranteed to be no worse than the existing algorithms for rational inter-
polation. In addition, both Algorithm 1 and Algorithm 2 provide simple provisions
to check for degeneracy of the interpolation problem at hand.
Although the proposed algorithms are fast, an extensive analysis of their prac-
ticality in terms of numerical stability has not yet been carried out. It should be
noted however, that both Algorithm 1 and Algorithm 2 can be parallelized on ei-
ther shared-memory or message-passing multiprocessor models. This aspect of the
algorithms will be reported elsewhere [2].
Acknowledgment. We are grateful to the anonymous referee whose comments
and suggestions have greatly improved the readability of this paper.
Department of Computer Science
University of California
Santa Barbara, California 93106
E-mail: [email protected]
Department of Electrical Engineering
University of Houston
Houston, Texas 77204
E-mail: [email protected]
1. P. J. DAVIS, Interpolation and Approximation, Dover, New York, 1975.
2. Ö. EGECIOGLU k Ç. K. KOC, An 0(N log N) Parallel Algorithm for Rational Interpolation,Technical Report No. TRCS88-2, Department of Computer Science, University of California, Santa
Barbara, August 1988.
3. G. E. FORSYTHE, "Generation and use of orthogonal polynomials for data fitting with a
digital computer," J. Soc. Indust. Appl. Math., v. 5, 1957, pp. 74-78.
4. P. R. GRAVES-MORRIS k T. R. HOPKINS, "Reliable rational interpolation," Numer. Math.,
v. 36, 1981, pp. 111-128.5. F. B. HILDEBRAND, An Introduction to Numerical Analysis, McGraw-Hill, New York, 1956.
6. T. MUIR, The Theory of Determinants, vol. 2, Dover, New York, 1960.
License or copyright restrictions may apply to redistribution; see http://www.ams.org/journal-terms-of-use
264 OMER EGECIOGLU AND ÇETIN K. KOÇ
7. A. RALSTON k P. RABINOWITZ, A First Course in Numerical Analysis, McGraw-Hill, New
York, 1978.
8. J. RlSSANEN, "Solution of linear equations with Hankel and Toeplitz matrices," Numer.
Math., v. 22, 1974, pp. 361-366.9. T. J. RlVLIN, An Introduction to the Approximation of Functions, Dover, New York, 1969.
10. C. SCHNEIDER k W. WERNER, "Some new aspects of rational interpolation," Math. Comp.,
v. 47, 1986, pp. 285-299.11. G. SZEGÖ, Orthogonal Polynomials, Amer. Math. Soc, Providence, R. I., 1959.
12. W. F. TRENCH, "An algorithm for the inversion of finite Hankel matrices," J. Soc. Indust.
Appl. Math., v. 13, 1965, pp. 1102-1107.
License or copyright restrictions may apply to redistribution; see http://www.ams.org/journal-terms-of-use