0% found this document useful (0 votes)
38 views

Conditioning Pascal Matrices Math

math

Uploaded by

Naina Seth
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views

Conditioning Pascal Matrices Math

math

Uploaded by

Naina Seth
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Journal of Computational and Applied Mathematics 252 (2013) 21–26

Contents lists available at SciVerse ScienceDirect

Journal of Computational and Applied


Mathematics
journal homepage: www.elsevier.com/locate/cam

Conditioning and accurate computations with Pascal matrices


Pedro Alonso a,∗ , Jorge Delgado b , Rafael Gallego a , Juan Manuel Peña b
a
Departamento de Matemáticas, Universidad de Oviedo, Spain
b
Departamento de Matemática Aplicada, Universidad de Zaragoza, Spain

article info abstract


Article history: A result on the ill-conditioning of Pascal matrices is proved. However, it is shown that
Received 13 September 2011 bidiagonal factorizations of Pascal matrices can be applied to perform computations with
high relative accuracy.
MSC: © 2011 Elsevier B.V. All rights reserved.
65F05
65F15
65F35

Keywords:
Pascal matrices
Bidiagonal factorizations
Accurate computations
Conditioning
Vandermonde matrices

1. Introduction

Pascal matrices have a long history (cf. [1–3]) and present important applications in filter design and image and signal
processing (cf. [2,4]), as well as in probability, combinatorics, numerical analysis and electrical engineering (cf. [5]), among
other fields. Recently, several papers have presented fast algorithms for solving linear systems whose coefficient matrices
are Pascal matrices (cf. [6]) and fast eigenvalue algorithms (cf. [7]).
It is well known that Vandermonde matrices are ill-conditioned and that this ill-conditioning increases with the size
of the matrix. Using the Skeel condition number, we prove a result on the ill-conditioning of Pascal matrices in Section 3,
showing that they are always worse conditioned than Vandermonde matrices of the same order. In spite of this result, we
show that one can obtain algorithms with high relative accuracy (HRA) for the computation of eigenvalues and inverses
of Pascal matrices, as well as for solving certain linear systems whose coefficient matrices are Pascal matrices. HRA means
that the relative errors of the computations are of the order of machine precision, independently of the size of the condition
number. It is well known (cf. [8]) that when the computations do not require subtractions (except for initial data), then the
HRA can be guaranteed. In order to construct HRA algorithms for Pascal matrices, two tools are used. On the one hand, a
bidiagonal factorization of Pascal matrices mentioned in Section 2. Although we present a direct approach of this bidiagonal
factorization, let us mention that it is closely related with the Neville elimination procedure (cf. [9]). On the other hand, the
second tool is the HRA algorithms for totally nonnegative matrices presented in [8]. Recall that a totally nonnegative matrix
is a matrix whose minors are all nonnegative and that Pascal matrices are totally nonnegative (cf. Section 2).
In Section 4 we illustrate with numerical experiments, accurate computations with Pascal matrices regarding the accurate
computation of the eigenvalues, of the solution of certain linear systems and of the inverse.

∗ Correspondence to: Departamento de Matemáticas, Universidad de Oviedo, Gijón, E-33203, Spain. Tel.: +34 985 18 21 28.
E-mail addresses: [email protected] (P. Alonso), [email protected] (J. Delgado), [email protected] (R. Gallego), [email protected] (J.M. Peña).

0377-0427/$ – see front matter © 2011 Elsevier B.V. All rights reserved.
doi:10.1016/j.cam.2011.12.007
22 P. Alonso et al. / Journal of Computational and Applied Mathematics 252 (2013) 21–26

2. Factorization of Pascal matrices

A Pascal matrix of order n is the symmetric matrix


 
i+j−2
P = (pij )16i,j6n ; pij := . (1)
j−1
A lower triangular Pascal matrix of order n is the lower triangular matrix
 
i−1
PL = (qij )16i,j6n ; qij := , (2)
j−1
where qij := 0 if j > i.
It is well known (cf. [10]) that the lower triangular Pascal matrix PL is the factor of the Cholesky factorization of the Pascal
matrix P:

P = PL PLT . (3)
The following well known result (cf. Lemma 1(ii) of [9]) provides a bidiagonal decomposition of a lower triangular Pascal
matrix and will be a key tool in the accurate algorithms used in this paper. For the sake of completeness, we will give a proof.

Lemma 1. The lower triangular Pascal matrix of order n PL given by (2) satisfies

1 1 1
    
0 1  0 1  1 1 
 .. ..  .. ..   .. .. .

PL =  . . . . . .
 ··· (4)
    
0 1 1 1 1 1
    
1 1 1 1 1 1

Proof. Let Fi (1 ≤ i ≤ n − 1) be the n × n matrix


1 
0 1
.. ..

. .
 
 
 ← (n − i + 1)th row
 
Fi = 
 0 1 
 1 1 
.. ..
 
. .
 
1 1
(k) (k) (k)
and let PL = (qij )1≤i,j≤n be the matrix PL = F1 F2 · · · Fk .
Let us prove by induction on k that
(k) (k) (k)
qij = qi−1,j−1 + qi−1,j , 1 ≤ i ≤ n, n − k ≤ j ≤ n, (5)
(k) (k) (k)
defining qi0 = q0j = 0, with 1 ≤ i, j ≤ n and q00 = 1.
(k) (k)
Since PL is lower triangular with unit diagonal, (5) is obvious ∀ k for i ≤ j, and in particular in the last column of PL .
So, we have only to prove that (5) holds for i > j with j = n − k, n − k + 1, . . . , n − 1.
(k)
For k = 1 it is obvious. Assume that (5) holds for k − 1 and let us prove it for k. Notice that PL can be obtained from
(k−1)
PL adding to each of the columns n − k, n − k + 1, . . . , n − 1 the next one.
If n − k ≤ j ≤ n − 1, then
(k) (k−1)
qij = qij + q(i,kj− 1)
+1 , ∀i (6)

and by the induction hypothesis, for i < n, one gets


(k) (k−1)
qij = qi+1,j+1 , n − k ≤ j ≤ n − 1. (7)

If n − k ≤ j ≤ n − 1 and i ≤ n, then, from (6) and (7), one gets (5).


Taking into account (5) for k = n − 1 we are going to prove that
 
(n−1) i−1
qij = (F1 F2 · · · Fn−1 )ij = , if i ≥ j,
j−1
P. Alonso et al. / Journal of Computational and Applied Mathematics 252 (2013) 21–26 23

(n−1)
i.e., qij of (2). We use proof by induction on the rows i of PL for i = 1, . . . , n. The inductive statement clearly holds for
the first row. Assume that it holds for 1,. . . ,i − 1 andlet us
 prove
 it for i.
(n−1)
If 1 < j < i, by (5) we have qij
i−2
= + ji− 2
= ji− 1
.
 j −2  −1  −1
(n−1)
= q(i−n−1,11) = i−02 = 1 = i−01 . Finally, if i = j, q(iin−1) = 1, and the proof is finished.

If j = 1, then qi1 

The joint use of the factorizations (3) and (4) gives a bidiagonal decomposition of a matrix P that will be denoted by
BD (P ).
This factorization can also be used as a proof of the total nonnegativity of a Pascal matrix because all factors are obviously
totally nonnegative and it is well known (cf. Theorem 3.1 of [11]) that the product of totally nonnegative matrices is also
totally nonnegative.

3. Conditioning and accurate algorithms for Pascal matrices

Let us start this section by recalling the definition of a Vandermonde matrix. A Vandermonde matrix of order n is the
matrix

V = (vij )16i,j6n ; vij := ( ji−1 ). (8)


It is well known that Vandermonde matrices are ill-conditioned.
If A = (aij )16i,j6n , we denote by |A| the matrix whose (i, j)-entry is |aij |. Given a nonsingular matrix A, let us consider the
traditional and the Skeel condition numbers of A, denoted by κ∞ (A) and Cond(A), respectively, and given by
κ∞ (A) := ∥A∥∞ ∥A−1 ∥∞ , Cond(A) := ∥ |A−1 | |A| ∥∞ .
Let us recall the following two properties:
• Cond(A) 6 κ∞ (A) and it can be much smaller, and,
• in contrast to κ∞ (A), Cond(A) is invariant under row scaling: if D is a nonsingular diagonal matrix then
Cond(DA) = Cond(A).

These properties provide some of the reasons that explain why the Skeel condition number Cond(A) is more satisfying
than the traditional condition number κ∞ (A) (cf. also Section 7.2 of [12]).
Let us prove that Pascal matrices always present a worse conditioning than Vandermonde matrices of the same order.

Theorem 1. Let P and V be the Pascal and Vandermonde matrices of order n given by (1) and (8), respectively. Then
Cond(V ) 6 Cond(P ). (9)

Proof. Let T the matrix satisfying


P = TV . (10)
t
As proved in Theorem 3 of [13] the matrix T is an stochastic matrix (cf. also [14]), that is, T > 0 and T e = e, where
e = (1, 1, . . . , 1)t . Since P and V are nonnegative matrices with nonzero row sums, we can define the following diagonal
matrices with positive diagonal entries:
   
n
 n
 n
 n
 n
 n

D1 := diag p1j , p2j , . . . , pnj , D2 := diag v1j , v2j , . . . , vnj .
j =1 j =1 j =1 j =1 j =1 j =1

Then, observe that the matrices

1 P,
P̄ := D− V̄ := D−
1 1
2 V (11)
are stochastic matrices. By (10) and (11) we can write

P̄ = (D−
1 TD2 )V̄ .
1
(12)
Let us define

1 TD2 .
H := D− 1
(13)

It is clear that H is nonnegative. Since P̄ and V̄ are stochastic matrices we have, by (12) and (13), that
He = H V̄ e = P̄e = e,
so H is also stochastic.
24 P. Alonso et al. / Journal of Computational and Applied Mathematics 252 (2013) 21–26

Fig. 1. Skeel condition numbers for Vandermonde and Pascal matrices versus the matrix size.

Since H , P̄ and V̄ are stochastic, we also have

∥P̄ ∥∞ = ∥V̄ ∥∞ = ∥H ∥∞ = 1. (14)


Now, since P is nonnegative (so |P | = P) and nonsingular, and taking into account that the Skeel condition number is
invariant under row scaling, we deduce from (11) that

Cond(P ) = Cond(P̄ ). (15)


Since P̄ is stochastic and |P̄ | = P̄ we have by (14) that

Cond(P̄ ) = ∥ |P̄ −1 | |P̄ | ∥∞ = ∥ |P̄ −1 | |P̄ |e∥∞ = ∥P̄ −1 ∥∞ = κ∞ (P̄ ), (16)


where we have used the fact that |P̄ |e = e and ∥P̄ ∥∞ = 1.
From (15) and (16) we conclude that

Cond(P ) = κ∞ (P̄ ). (17)


Analogously we can deduce that:

Cond(V ) = κ∞ (V̄ ). (18)


By (12) and (13) we can write

P̄ −1 H = V̄ −1 . (19)
From (14), (17)–(19) we can conclude that
Cond(V ) = κ∞ (V̄ ) = ∥V̄ −1 ∥∞ = ∥P̄ −1 H ∥∞ 6 ∥P̄ −1 ∥∞ = κ∞ (P̄ ) = Cond(P )
and the result follows. 
However, in spite of the ill-conditioning of a Pascal matrix P, one can use its bidiagonal decomposition BD (P ) to provide
accurate algorithms. In fact, as shown in [8], if the entries of the bidiagonal factorization BD (A) of a totally nonnegative
matrix A are known to HRA, then we can find HRA algorithms to perform some computations with A, such as the computation
of its singular values, eigenvalues and inverse, or solving certain linear systems Ax = b (those where b has a chessboard
pattern of alternating signs). So, we can construct such accurate algorithms for Pascal matrices because their bidiagonal
factorization is known to HRA. In fact, all the nonzero entries of BD (P ) are 1’s.

4. Numerical results

In this section we present some numerical experiments. First we compare the Skeel condition number for Pascal and
Vandermonde matrices. Next, taking into account the bidiagonal decomposition of Pascal matrices and the algorithms
presented in [15,8], we show that it is possible to obtain accurate numerical results using HRA despite the ill-conditioning
of Pascal matrices.
In Fig. 1 the Skeel condition numbers of Vandermonde and Pascal matrices up to a size of n = 50 are depicted. We can
see that the inequality Cond(V ) 6 Cond(P ) holds as stated by Theorem 1.
P. Alonso et al. / Journal of Computational and Applied Mathematics 252 (2013) 21–26 25

Table 1
Relative errors of the eigenvalues of a 20 × 20 Pascal matrix.
λ econv eHRA

4.699483854180265·1010 0 0
5.549569598629316·108 7.5183·10−15 4.2962·10−16
1.398271987686576·107 1.1216·10−13 9.3247·10−16
5.667410592514715·105 1.0349·10−12 0
3.306137385353127·104 5.3936·10−12 8.8030·10−16
2.624520577381837·103 2.0108·10−11 5.1981·10−16
2.753624643918711·102 7.6078·10−11 2.0643·10−16
3.778382893288340·101 3.2207·10−10 0
6.860716460896207·100 1.1676·10−9 2.5892·10−16
1.748761542199869·100 2.8461·10−9 7.6184·10−16
5.718332522008930·10−1 7.2625·10−9 7.7661·10−16
1.457573717992379·10−1 2.9716·10−8 0
2.646634891811339·10−2 1.4704·10−7 3.9327·10−16
3.631577027785784·10−3 9.0709·10−7 2.3884·10−16
3.810219697334504·10−4 6.7348·10−6 1.4228·10−16
3.024677693160022·10−5 5.3381·10−5 1.1202·10−16
1.764474240353715·10−6 3.8181·10−4 6.0006·10−16
7.151684427680540·10−8 1.6781·10−3 1.1104·10−15
1.801941542001724·10−9 1.1909·10−2 3.4429·10−16
2.127893256001899·10−11 6.3160·10−1 1.2148·10−15

Fig. 2. Relative errors associated with the lowest eigenvalue of a Pascal matrix of order n with n = 5(5)50.

As a first numerical test, we have compared the eigenvalues of a Pascal matrix computed with both HRA and conventional
algorithms. In order to compute the eigenvalues accurately the TNEigenValues routine [15] was used; the Matlab function
eig was chosen for comparison. The accuracy of the eigenvalues provided by TNEigenValues was tested by comparing
them with those obtained by Mathematica using 60 significant digits.
In Table 1 we give the eigenvalues of a 20 × 20 Pascal matrix (16 digits are shown) along with the relative errors of the
eigenvalues obtained to HRA and of those obtained with the conventional algorithm. Observe that, while the relative error of
the eigenvalues computed to HRA is close to the unit roundoff (in double precision), the error associated to the conventional
algorithm grows as the eigenvalue size decreases. In fact, the maximum error occurs for the smallest eigenvalue. It is well
known that all the eigenvalues of totally nonnegative matrices are nonnegative (cf. [11]). But for larger Pascal matrix
dimensions (n > 20), approximations to the smallest eigenvalues given by the conventional algorithm turn out to be
negative indicating that this algorithm is not suitable for computing such eigenvalues. In addition, observe that, since a
Pascal matrix of order n is a symmetric matrix, its singular values match its eigenvalues.
In Fig. 2 we have plotted the relative error associated with the lowest eigenvalue of a Pascal matrix of order n with
n = 5(5)50. It shows the stability of the relative error associated with the use of HRA, however the error associated with a
conventional algorithm grows exponentially.
To further show how it is possible to obtain accurate results with Pascal matrices, we have solved linear systems of the
form Px = b where b has alternating sign pattern. In this situation, the solution of the system can be obtained to HRA. To this
end we have used the TNSolve routine [16]. In Table 2 we show the average relative errors for the approximate solutions
26 P. Alonso et al. / Journal of Computational and Applied Mathematics 252 (2013) 21–26

Table 2
Average relative errors for the approximate solution of a linear
system of the form Px = b.
n ⟨econv ⟩ ⟨eHRA ⟩
5 2.4292·10 −16
9.5635·10−17
10 7.0317·10−15 1.1479·10−16
15 2.7774·10−13 1.3792·10−16
20 5.8856·10−12 1.3644·10−16
25 2.8650·10−10 1.8974·10−16

Table 3
Maximum relative error of the elements of P −1 computed to
HRA and with a conventional algorithm.
n econv eHRA

5 1.3989·10 −14
1.7764·10−16
10 4.7017·10−10 5.8003·10−16
15 8.4625·10−06 1.1102·10−15
20 2.1371·10+00 1.1219·10−15
25 1.0402·10+00 2.3007·10−15

of such a linear systems. The results were averaged over 20 measures and the errors where computed with the euclidean
norm. The elements of b1 := |b| were taken as uniformly distributed random numbers between 0 and 1 and b was set as
b(i) = (−1)i b1 (i). The exact solution of the systems was obtained with Mathematica. As expected, the error is smaller with
HRA computations, and the situation is more evident the greater the system dimension is.
Finally, we have computed the inverse of Pascal matrices to HRA. This was achieved using the TNJinverse routine [16].
The Matlab routine inv was chosen as the conventional algorithm. The exact inverse matrices were obtained with
Mathematica. In Table 3 we show the maximum relative errors of the elements of P −1 up to a size of n = 25 computed
with both HRA and conventional algorithms. For the conventional algorithm the relative error increases with the matrix
size, whereas it keeps of the order of the unit roundoff for the HRA algorithm.

5. Conclusions

The ill-conditioning of Pascal matrices is shown, proving that they are always worse conditioned for the Skeel condition
number than the Vandermonde matrices of the same order. However, we have shown by means of numerical experiments
that there are algorithms that allow us to calculate accurately the inverses and the eigenvalues of these matrices, as well as
solving certain linear systems.

Acknowledgments

This work has been partially supported by the Spanish Research Grant MTM2009-07315 and under MEC and FEDER Grant
TIN2010-14971.

References

[1] L. Aceto, D. Trigiante, The matrices of Pascal and other greats, Amer. Math. Monthly 108 (2001) 232–245.
[2] A. Edelman, G. Strang, Pascal Matrices, MIT, Cambridge, MA, 2003.
[3] B. Lewis, Revisiting the Pascal matrix, Amer. Math. Monthly 117 (2010) 50–66.
[4] B. Psenicka, F. Garcia-Ugalde, A. Herrera-Camacho, The bilinear Z transform by Pascal matrix and its application in the design of digital filters, IEEE
Signal Process. Lett. 9 (2002) 368–370.
[5] V. Biolkova, D. Biolek, Generalized Pascal matrix of first-order S–Z transforms, in: ICECS99 Pafos, Cyprus, 1999, pp. 929–931.
[6] X.-G. Lv, T.-Z. Huang, Z.-G. Ren, A new algorithm for linear systems of the Pascal type, J. Comput. Appl. Math. 225 (2009) 309–315.
[7] X. Wang, J. Zhou, A fast eigenvalue algorithm for Pascal matrices, Appl. Math. Comput. 183 (2006) 711–716.
[8] P. Koev, Accurate computations with totally nonnegative matrices, SIAM J. Matrix Anal. Appl. 29 (2007) 731–751.
[9] P. Alonso, J. Delgado, R. Gallego, J.M. Peña, Growth factors of pivoting strategies associated to Neville elimination, J. Comput. Appl. Math. 235 (7) (2011)
1755–1762.
[10] J.H. Mathews, Numerical Methods for Mathematics, Science, and Engineering, second ed., Prentice-Hall, Englewood Cliffs, NJ, 1992.
[11] T. Ando, Totally positive matrices, Linear Algebra Appl. 90 (1987) 165–219.
[12] N.J. Higham, Accuracy and Stability of Numerical Algorithms, second ed., Society for Industrial and Applied Mathematics (SIAM), Philadelphia, PA,
2002.
[13] Y. Sheng-Liang, Y. Hong, On a connection between the Pascal, Stirling and Vandermonde matrices, Discrete Appl. Math. 155 (2007) 2025–2030.
[14] M. El-Mikkawy, On a connection between the Pascal, Vandermonde and Stirling matrices. I, Appl. Math. Comput. 145 (2003) 23–32.
[15] P. Koev, Accurate eigenvalues and SVDs of totally nonnegative matrices, SIAM J. Matrix Anal. Appl. 27 (2005) 1–23.
[16] This routine is included in the TNTool library by P. Koev which is Available at: http://math.mit.edu/~plamen/software/TNTool.html.

You might also like