Paper Menu >>
Journal Menu >>
![]() American Journal of Computational Mathematics, 2014, 4, 464-473 Published Online December 2014 in SciRes. http://www.scirp.org/journal/ajcm http://dx.doi.org/10.4236/ajcm.2014.45039 How to cite this paper: Tabanjeh, M.M. (2014) Combining Algebraic and Numerical Techniques for Computing Matrix De- terminant. American Journal of Computational Mathematics, 4, 464-473. http://dx.doi.org/10.4236/ajcm.2014.45039 Combining Algebraic and Numerical Techniques for Computing Matrix Determinant Mohammad M. Tabanjeh Department of Mathematics and Computer Science, Virginia State University, Petersburg, USA Email: [email protected] Received 22 October 2014; revised 1 December 2014; accepted 9 December 2014 Copyright © 2014 by author and Scientific Research Publishing Inc. This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/ Abstract Computing the sign of the determinant or the value of the determinant of an n × n matrix A is a classical well-know problem and it is a challenge for both numerical and algebraic methods. In this paper, we review, modify and combine various techniques of numerical linear algebra and ra- tional algebraic computations (with no error) to achieve our main goal of decreasing the bit- precision for computing detA or its sign and enable us to obtain the solution with few arithmetic operations. In particular, we improved the precision Hp 2 log bits of the p-adic lifting algorithm (H = 2h for a natural number h), which may exceed the computer precision β (see Section 5.2), to at most β bits (see Section 6). The computational cost of the p-adic lifting can be performed in O(hn4). We reduced this cost to O(n3) by employing the faster p-adic lifting technique (see Section 5.3). Keywords Matrix Determinant, Sign of the Determinant, p-Adic Lifting, Modular Determinant, Matrix Factorization, Bit-Precision 1. Introduction Computation of the sign of the determinant of a matrix and even the determinant itself is a challenge for both numerical and algebraic methods. That is, to testing whether ( ) det 0A> , ( ) det 0A< , or det 0A= for an n × n matrix A. In computational geometry, most decisions are based on the signs of the determinants. Among the geometric applications, in which the sign of the determinant needs to be evaluated, are the computations of co n- ![]() M. M. Tabanjeh 465 vex hulls, Voronoi diagrams, testing whether the line intervals of a given family have nonempty common inter- section, and finding the orientation of a high dimensional polyhedron. We refer the reader to [1]-[5], and to the bibliography therein for earlier work. These applications have motivated extensive algorithmic work on compu- ting the value and particulary the sign of the determinant. One of the well-known numerical algorithms is Clarkson’s algorithm. In [6], Clarkson uses an adaption of Gram-Schmidt procedure for computing an ortho- gonal basis and employs approximate arith metics. His algo rithm runs in time ( ) 3 Odb and uses 2 1.5bd + bits to represent the values for a d × d determinant with b-bit integer entries. On the other hand, the authors of [7] proposed a method for evaluating the signs of the determinant and bounding the precision in the case where 3n≤ . Their algorithm asymptotic worst case is worse than that of Clarkson. However, it is simpler and uses re- spectively b and () 1 b+ -bit arithmetic. In this paper we examine two different approaches of computing the de- terminant of a matrix or testing the sign of the determinant; the numerical and the algebraic approach. In partic- ular, numerical algorithms for computing various factorizations of a matrix A which include the orthogonal fac- torization A QR= and the triangular factorizations A LU= , r AP LU= , and rc AP LUP= seem to be the most effective algorithms for computing the sign of ( ) det A provided that det A is large enough relative to the computer precision. Alternatively, the algebraic techniques for computing det A modulo an integer M based on the Chinese remainder theorem and the p-adic lifting for a prime p use lower precision or less arith- metic operations. In fact, the Chinese remainder theorem required less arithmetic operations than the p-adic lift- ing but with higher precision due to (9). We also demonstrate some effective approaches of combining algebraic and numerical techniques in order to decrease the precision of the computation of the p-adic lifting and to intro- duce an alternative technique to reduce the arithmetic operations. If det A is small, then obtaining the sign of the determinant with lower precision can be done by effective algebraic methods of Section 4. Although, the Chinese remainder algorithm approach requires low precision computations provided that the determinant is bounded from above by a fixed large number. This motivated us to generalize to the case of any input matrix A and to decrease the precision at the final stage of the Chinese remaindering at the price of a minimal increase in the arithmetic cost. Furthermore, in Section 5 we extend the work to an algorithm that computes ( ) det modAM using low precision by relying on the p-adic lifting rather than the Chinese remaindering. 2. Definitions, Basic Facts, and Matrix Norms Definition 1. For an n × n matrix A, the determinant of A is given by either ( )( ) ( ) 1 det1det, for1,,, ij n ij ij j AAa Ain + = ==−= ∑ or ( )() ( ) 1 det1det, for 1,,, ij n ij ij i AAa Ajn + = ==−= ∑ where ij A is () 1n− -by- ( ) 1n− matrix obtained by deleting the i-th row and j-th column of A. Fact 1. Well-known properties of the determinant include ()( )( ) detdet detABA B= , () ( ) T det detAA= , and ()( ) det det n cA cA= for any two matrices , nn AB × ∈ and c∈ . Definition 2. If A is a triangular matrix of order n, then its determinant is the product of the entries on the main diagonal. Definition 3. For a matrix A of size m × n, we define 1-norm: 11 1max m j nij i Aa ≤≤ = =∑ , ∞ -norm: 11 max n i mij j Aa ≤≤ = ∞ = ∑ , p-norms: 00 1 sup supmax p p xx x pp pp p Ax x AA Ax xx ≠≠ = = == , and 2-norm: 2 2 0 22 = max x Ax Ax ≠ . 3. Numerical Computations of Matrix Determinant We find the following factorizations of an n × n matrix A whose entries are either integer, real, or rational by Gaussian elimination. A LU= (1) r AP LU= (2) . rc AP LUP= (3) We reduce A to its upper triangu lar form U. The matrix L is a unit lower triangular whose diagonal entries are ![]() M. M. Tabanjeh 466 all 1 and the remaining entries of L can be filled with the negatives of the multiples used in the elementary op er- ations. Pr is a permutation matrix results from row interchange and Pc is a permutation matrix results from col- umn interchange. Fact 2. If P is a permutati on matrix, then det 1P= ± . Moreover, det 1I= , where I is an identity matrix. 3.1. Triangular Factorizations The following algorithm computes ( ) det A or its sign based on the fa c torizations (1)-(3). Algorithm 1. Triangular factorizations. Input: An n × n matrix A. Output: ( ) det A . Computations: 1) Compute the matrices L, U satisfying Equation (1), or Pr, L, U satisfying Equation (2), or Pr, L, U, Pc satisfying Equation (3). 2) Compute det L , detU for Equation (1), or det r P , det L , detU for Equation (2), or det r P , det L , detU , det c P for Equation (3). 3) Compute and output ( )() detdet detA LU= for Equation (1), or ()( )( ) detdetdet det r AP LU = for Eq- uation (2), or ( )()()() ( ) detdetdet detdet rc APLU P= for Equation (3). One can easily output the sign of det A from the above algorithm. We only need to compute the sign of det r P , det L , detU , and det c P at stage 2 and multiply these signs. The value of det r P and det c P can be easily found by tracking the number of row or column interchanges in Gaussian elimination process which will be either 1 or −1 since those are permutation matrices. As L is a unit lower triangular matrix, det 1L= . Finally, the computations of detU required 1n− multiplications since U is an upper triangular matrix. Therefore, the overall arithmetic operations of Algorithm 1 will be dominated by the computational cost at stage 1, that is, ( )() 12 1 12 1 6 n i nn ni − = −− = ∑ multiplications, the same number for additions, subtractions, and comparisons, but ( ) 1 1 1 2 n i nn i − = −= ∑ divisions. However, Algorithm 1 uses 1 1 n ii − = ∑ comparisons to compute (2) rather than 12 1 n ii − = ∑ . 3.2. Orthogonal Factorization Definition 4. A square matrix Q is called an orthogonal matrix if T.QQ I= Equivalently, 1T QQ −= , where QT is the transpose of Q. Lemma 1. If Q is an orthogona l matrix, then ( ) det 1Q= ± . Proof. Since Q is orthogonal, then T QQ I= . Now T1QQ I= = and thus T 1QQ = , but T QQ= which implies that 2 1QQ Q== , hence 1Q= ± . Definition 5. If mn A × ∈ , then there exists an orthogonal matrix mm Q× ∈ and an upper triangular matrix mn R × ∈ so that .A QR= (4) Algorithm 2. QR-factorization. Input: An n × n matrix A. Output: ( ) det A . Computations: 1) Compute an orthogonal matrix Q satisfying the Equation (4). 2) Compute detQ . 3) Compute the matrix ( ) T,ij R QAr= = . 4) Compute ( )() , det detii i A Qr =∏ , where , ii r are the main diagonal entries of R. Here, we consider two well-known effective algorithms for computing the QR factorization; the House- holder and the Given algorithms. The Householder transformation (or reflection) is a matrix of the form T 2HI=− vv where 2 1=v . Lemma 2. H is symmetric and orthogonal. That is, T HH= and T .HHI⋅= Proof. T 2,HI=− vv and since T II= and ( ) T TT ,=vv vv then ( ) T TT TT 2 2.HII H=− =−=vv vv Hence, ![]() M. M. Tabanjeh 467 H is symmetric. On the other hand, ( )( )() TTTTTTT T 224444.HH IIIvII=−− =−+=−+=vvvvvvv vvvvvv Therefore, H is orthogonal, that is, 1T HH −= . The Householder algorithm computes 1n i i QH − =∏ as a product of 1 n− matrices of Householder trans- formations, and the upper triangular matrix T QA R= . Lemma 3. ( )() 1 det1n Q− = − for a matrix Q computed by the Househol de r algorit h m. Proof. Since T 2 i ii HI=− vv for vectors i v , 1, ,1in= − , Lemma 2 implies that T ii HH I= and hence () 2 det 1 i H= . Notice that ( ) T 11 det 21I−=−ee where ( ) T 1 1,0,,0e= . Now for 01t≤≤ , we define the trans- formation () ( ) 11i vttvee = −+ . Then the function ( )( )() ( ) T detDtIvtvt= − is continuous and 2 1D= t∀ . Hence ( ) ( ) T 11 1 det21DI vv=−=− since 2 1=v and ( ) () T 11 0 det21DIee=−=− . This proves that det 1 i H= − i∀ . But 1 1 n i i QH − = =∏ , we have ( ) 1 det 1 n Q − = − . The Givens rotations can also be used to compute the QR factorization, where 1t QG G= , t is the total number of rotations, Gj is the the j-th rotation matrix, and T QA R= is an upper triangular matrix. Since the Givens algorithm computes Q as a product of the matrices of Givens rotations, then ( ) det 1Q= . We define ()( ) ,, ,, ii kk G WcsWcsc= == , ,,ik ki GWWs= =−= for two fixed integers i and k, and for a pair of nonzero rea l numbers c and s that satisfies 22 1 cs += such that T GG I= . If the Householder is used to find the QR, Algo- rithm 2 uses 1n− multiplications at stage 3. It involves ( ) 32 4 3n On+ multiplications at stage 1, and () On evaluations of the square roots of positive numbers. If the Givens algorithm is used to find the QR, then it in- volves () 32 2n On+ multiplications at stage 3, () 32 n On + multiplications at stage 1, and ( ) 2 On evalua- tions. This shows some advantage of the Householder over the Givens algorithm. However, the Givens rotations algorithm allows us to update the QR of A successively by using only ( ) 2 O kn arithmetic operations and square root evaluations if ( ) Ok rows or columns of A are successively replaced by new ones. Therefore, in this case, the Givens algorithm is more effective. 4. Algebraic Computations of Matrix Determinant 4.1. Determinant Computation Based on the Chinese Remainder Theorem Theorem 1. (Chinese remainder theorem.) Let 12 , ,, k mm m be distinct pairwise relatively prime integers such that 12 1. k mm m> >> > (5) Let 1 k i i Mm = = ∏ , and let D denote an integer satisfying th e inequality 0.DM≤< (6) Let ( ) mod . ii rD m= (7) ( )( ) , mod , 1mod , 1,,. iiii iii i M Ms Mmysmik m = ≡≡∀= (8) Then D is a unique integer satisfying (6) and (7). In additio n, ( ) ( ) 1 mod . k ii i i D MryM = =∑ (9) Algorithm 3. (Computat i on of ( ) detmod AM based on the Chinese remainder theorem.) Input: An integer matrix A, an algorithm that computes ( ) detmod Am for any fixed integer 1 m> , k in- tegers 1 ,, k mm satisfying (5) and are pairwise r elatively prime, and 12 k M mmm= . Output: ( ) detmod AM . Computations: 1) Compute ( ) detmod ii r Am= , 1, ,ik= . 2) Compute the integers Mi, si, and yi as in (8) 1,,ik∀= . 3) Comput e an d output D as in (9). ![]() M. M. Tabanjeh 468 The values of yi in (8) are computed by the Euclidean algorithm when applied to si and mi for 1, ,ik= . Algorithm 3 uses ( ) 3 O kn arithmetic operations (ops) at stage 1, ( ) ( ) 11 log loglogOk mm ops at stage 2, and ( ) 2 log Ok k ops at stage 3. The computations of the algorithm are performed with precision of at most 21 log m bits at stage 1, and at most 2 log M bits at stages 2 and 3. The latest precision can be decreased at the cost of slightly in creasing the arithmetic operations [8]. Lemma 4. For any pair of integers M and d such that 2 Md> , we have ( )( )( ) mod if m od , and mod otherwise. 2 M ddM dMddMM= <=− (10) Suppose that the input matrix A is filled with integers and an upper bound det u dA≥ is known. Then we may choose an integer M such that 2 u Md> and compute ( ) detmod AM . Hence, det A can be recovered by using (10). 4.2. Modular Determinant Let nn A× ∈ and ( ) detdA= . In order to calculate ( ) detmod Ap , we choose a prime p that is bigger than 2d and perform Gaussian elimination (2) on ( ) mod nn p Ap × ∈ . This is the same as Gau s s ian elimination over , except that when dividing by a pivot element a we have to calculate its inverse modulo p by the ex- tended Euclidean algorithm. This requires ( ) 32 2 3n On+ arithmetic operations modulo p. On the other hand, if we need to compute ( ) detmod Ap for the updated matrix A, we rely on the QR factorization such that ( )() modA QRp= and ( ) T modQQ Dp= , where D is a diagonal matrix and R is a unit upper triangular matrix. The latest factorization can be computed by the Givens algorithm [9]. If the entries of the matrix A are much smaller than p, then we do not need to reduce modulo p the results at the initial steps of Gaussian elimination. That is, the computation can be performed in exact rational arithmetics using lower precision. In this case, one may apply the algorithm of [10] and [11] to keep the precision low. The computations modulo a fixed integer 1M> can be performed with precision 2 log M bits. In such a computation, we do not need to worry about the growth of the intermediate values anymore. However, to reduce the cost of the computations, one can work with small primes modular instead of a large prime, that is, these primes can be chosen very small with loga- rithmic length. Then the resulting algorithm will have lower cost of ( ) 3 O nk and can be performed in parallel. Now, one can find a bound on the det A without actually calculating the determinant. This bound is given by Hadamard’s inequality which says that () 2 det , nn n Anaa n ≤= (11) where 1, max i jnij aa + ≤≤ = ∈ (nonnegative integers) is the maximal absolute value of an entry of A. 5. Alternative Approach for Computing Matrix Inverses and Determinant 5.1. p-Adic Lifting of Matrix Inverses In this section, we present an alternative approach for computing matrix determinant to one we discussed in ear- lier sections. The main goal is to decrease the precision of algebraic computations with no rounding errors. The technique relies on Newton’s-Hensel’s lifting (p-adic lifting) and uses ( ) 4 logOn n arithmetic operations. However, we will also show how to modify this technique to use order of n3 arithmetic operations by employing the faster p-adic lifting. Given an initial approximation to the inverse, say S0, a well-known formula for New- ton’s iteration rapidly improves the initial ap proximation to the inverse of a nonsingula r n × n matrix A: ()( ) 1 222, 0. iiiiiiii SSIASSS ASIS ASi + =−=− =−≥ (12) Algorithm 4. (p-adic lifting of matrix inver ses.) Input: An n × n matrix A, an int ege r 1p> , the matrix ( ) 1 0 mod SA p − = , and a nat ural number h. Output: The matrix ( ) 1 mod H Ap − , 2 h H= . Computations: 1) Recursively compute the matrix j S by the equation, ![]() M. M. Tabanjeh 469 ( ) ( ) 11 2mod ,where2, 1,,. Jj jj j SSIASpJjh −− =−== (13) 2) Finally, outputs h S . Note that, ( ) 1 mod J j SA p − = , 2 j J= , j∀ . This follows from the equation ( ) ( ) 2 1mod J jj I ASI ASp − −=− . The above algorithm uses ( ) 3 On arithmetic operations performed modulo pJ at the j-th stage, that is, a to tal of ( ) 3 O hn arithmetic operations with precision of at most 2 logJp bits. 5.2. p-Adic Lifting of Matrix Determinant We can further extend p-adic lifting of matrix inverses to p-adic lifting of matrix determinants, that is ( ) detmod Ap , using the following formula [12]: ( ) 1 , 1 1 det . n kkk k A A− = = ∏ (14) Here, Ak denotes the k × k leading principal (north-western) submatrix of A so that n AA= for 1, ,kn= . Moreover, ( ) ,kk B denotes the ( ) ,kk -th entry of a matrix B. In order to use Formula (14), we must have the inverses of Ak available modulo a fixed prime integer p for all k . A nonsingular matrix A modulo p is called strongly nonsingular if the inverses of all submatrices Ak exist modulo p. In general, a matrix A is called strongly nonsingular if A is nonsingular and all k × k leading principle submatrices are nonsingular. Here, we assume that A is strongly nonsingular for a choice of p. Finally, Algorithm 4 can be extended to lifting det A (see Algo- rithm 5). Algorithm 5. (p-adic lifting of matrix determinant.) Input: An integer 1p> , an n × n matrix A, the matrices () 1 0, mod kk SA p − = , and a natur al number h. Output: ( ) 2 detmod H Ap , 2 h H= . Computations: 1) Apply Algorithm 4 to all pairs of matrices k A and 0,k S , (replacing the matrices A and 0 S in the algo- rithm), so as to compute the matrices ( ) 1 , mod H hk k SA p − = , for 1, ,kn= . 2) Compute the value ( ) ( ) 22 ,, , 1 1mod 2mod . det n HH hkkhkkk k pSI ASp A = = − ∏ (15) 3) Compute an d output the va lue () () 2 detmod H Ap , as the reciprocal of ( ) 2 1mod det H p A . The overall computational cost of Algorithm 5 at stage 1 is ( ) 4 O hn arithmetic operations performed with precision at most 2 logHp bits. However, at stage 2, the algorithm uses ( ) 3 On operations with precision 2 2 logHp bits. At stage 3, only one single multiplication is needed. All the above operations are calculated modulo p2H. Now, we will estimate the value of H and p that must satisfy the bound 2 2 det H pA> . But, due to Hadamard’s bound (11), we have () () 2 2 det2 nH Aanp << which implies that 2logloglog 2 ppp H nann>+ + . Therefore, it is suffices to choose p and H satisfying the inequalities ( ) 2 2 nH an p< and ( ) 2log2 n p H aa > . In the next section, we will present an alternative faster tech- nique to computing matrix determinant that uses only ( ) 3 On based on the divide-and-conquer algorithm . Example 1. Let 1 1718 11819. 5 1620 A = Then, [ ] 1 1,A= 2 1 17 1 18 A = , and 3 1 1718 11819. 5 1620 A = By Algorithm 4, compute the matrices: [ ] 1 1 1,A − = 1 2 1817 , 11 A−− = − and 1 3 56 521 75701. 7469 1 A − − = − −− Now, we compute ![]() M. M. Tabanjeh 470 [ ] 1 0,1 1 mod 31,SA − = = 1 0,2 2 01 mod 3, 21 SA − == and 1 0,3 3 111 mod 3011. 202 SA − == We apply Algorithm 4 (that is, ( ) 0, 0, 2 mod , 2, 1,, Jj k kkk SSIASpJjh=−== ) to all pair s of matrices: ( ) [ ] 2 1,110,110,1 2mod 31,SSSI AS==−= ( ) 2 1,220,22 0,2 01 2mod 3, 81 SSSIAS ==−= and ( ) 2 1,330,33 0,3 7 71 2mod 3671. 2 38 SSSIAS ==−= We then compute the value () () () [ ] ()()( ) 3 2 221 1,11 1,11,22 1,21,331,3 11,12,2 3,3 1,1 2,2 3,3 1mod 222mod 3 det 2243 2783 2510 144 17 12100 2603 2348 1216 1612113 2580 2269 11612269365309 mo H k pSIASSIASSIAS A ×× = =−⋅−⋅− −−− −− = ⋅⋅−−− −− −−− =−− = ∏ ( ) d 8180.= Therefore, we output the value of () 221 detmod 31 A ×× = − , since 180 mod 81−≡ . 5.3. Faster p-Adic Lifting of the D eterminant Assuming A is strongly nonsingular modulo p, block Gauss-Jordan elimination can be applied to the block 2 × 2 matrix BC AEG = to obtai n the we ll-known bl ock factorization of A: 1 1 , IO BOI BC AEBIO SOI − − = where 1 SGEB C − = − is the Schur complement of B in A. The following is the divide-and-conquer algorithm for computing () det A . Algorithm 6. (Computing the determinant of a strongly nonsingular matrix .) Input: An n × n stron gl y nonsingul ar matrix A. Output: ( ) det A . Computations: 1) Partition A according to the block factorization above, where B is an 22 nn × matrix. ( ⋅ refers to the floor of 2 n .) Compute 1 B − and S using the matrix equation 1 SGEB C − = − . 2) Compute ( ) det B and ( ) det S . 3) Comput e an d output ( )() detdet detABS= . Since A is strongly nonsingular modulo p, we can compute the inverse of k × k matrix by ( ) ( ) 3 logOkH Ik= arithmetic operations using Algorithm 4. From the above factorization of A, we conclude that ( ) ( )()( ) 2 22Dn DnDnIn≤++ . The computational cost of computing the determinant is ( ) ( ) 3 logDn OnH= . This can be derived from the above factorization of A using recursive factorization ap- plied to B and S and the inverses modulo 2H p . Here, ( ) Ik is the cost of computing the inverse and ( ) Dk is ![]() M. M. Tabanjeh 471 the cost of computing the determinant. 6. Improving the Precision of the p-Adic Lifting Algorithm Definition 6. Let e be a fixed integer such that 2 log e β > where β is the computer precision. Then any integer z, such that 01ze≤≤− , will fit the computer pre cision and will be called sh ort integer or e-integer. The integ- ers that exceed 1e α −= will be called long integers and we will associate them with the e-polynomials ( ) i i i p xpx =∑ , 0 i pe ≤< for all i. Recall that Algorithm 4 uses 2 logjp bits at stage j. For large j, this value is going to exceed β. In this section we decrease the precision of the p-adic algorithm and keep it below β. In order to do this, we choose the base K ep = where K is a power of 2, 2KH≤ , K divides 2 H , and 2 2 log . nH KK αβ ≤< (16) Now, let us associate the entries of the matrices mod J k Ap and 1, mod J jk Sp − with the e-polynomials in x for =2 j J and for all j and k. These polynomials have degrees () 1JK− and take values of the entries for xe= . Define the polynomial matrices ( ) , mod J jk k AeA p= and ( ) ,, mod J jk jk SeS p= . Then for JK≥ , we associate the p-adic lifting step of (13) with the matrix polynomial ( )()()()( ) ( ) ,1,1,,1, 2mod . JK jkjnjnjn jn SxSxSxAxSx x −− − = − (17) The input polynomial matrices a re () 1,jn Sx − and () , jn Ax for 1, 2,,jh= . We perform the computations in (17) modulo JK x . The idea here is to apply e-reduction to all the entries of the output matrix polynomial followed by a new reduction modulo JK x . The resulting entries are just polynomials with integer coefficients ranging between 1e − and 1e− . This is due to the recursive e-reductions and then taking modular reductions again. Note that the output entries are polynomials with coefficients in the range γ − to γ for 2 β γ ≤ even before applying the e-reductions. This shows that the β-bit precision is sufficient in all of the computation s due to (16). The same argument can be applied to the matrices ,jk S for all j and kn< . 7. Numerical Implementation of Matrix Determinant In this section we show numerical implementation of the determinant of n × n matrices based on the triangular factorization LU, PrLU, and PrLUPc. Algorithm 1 computes the triangular matrices L LLE=+ and U UUE= + , the permutation matrices r P and c P , where EL and EU are the perturbations of L and U. In gener- al, we can assume that rr PP= and cc PP= since the rounding error is small. Definition 7. Let 11 , , rc APAP LUAE −− ′ ′′ = −= (18) and let e′ , a, l , and u denote the maximum absolute value of the entries of the matrices E′ , A, L , and U . Also, E′ is the error matrix of the order of the roundoff in the entries of A. Assuming floating point arithmetic with double precision (64-bits) and round to β -bit. Then the upper bound on the magnitude of the relative rounding errors is 2 β − = , where is the machine epsilon. Our goal is to estimate e′ . Theorem 2. ([13]) F or a m atrix ( ) ,ij Aa= , let A denote the matrix ( ) ,ij a . Then unde r (18), ( ) ,EA LU ′′ ≤+ and ( ) .eea nlu + ′≤=+ (19) From the following matrix norm property ,, 1max ijij qq A aA n ≤≤ , for 1, 2,q= ∞ , we obtain the bound .eE ∞ ′′ ≤ Theorem 3. Let a + denotes the maximum absolute value of all entries of the matrices ( ) i A computed by Gaussian elimination, which reduces A′ to the upper triangular form and let as define d above. Then ![]() M. M. Tabanjeh 472 ( ) 2 24 21.8 . ln eeEnaan+ + +∞ ′′ ≤= ≤< (20) By using the following results, we can estimate the magnitude of the perturbation of det A and det A′ caused by the pe rturbati on of A′ . Here we assume that , rc PPIAA ′ = == and write, ( ) , detdet. d eeeAE A ′ = =+− (21) We use the following facts to estimate d e of (21) in Lemma 5 below. Fact 3. det n q AA ≤ , 1, 2,q= ∞ . qq BA≤ , 1,q=∞ , if BA ≤ ; qq BA ≤ , 1, 2,q= ∞ , if B is a submatrix of A. qq A EAne+≤ + , for 1, 2,q= ∞ ; 22 22 A EAne+≤ + . Lemma 5. ( ) 12, f or 1,2,. n dq eAneneq − ≤+ =∞ Combining Lemma 5 with the bound (19) enables us to extend Algorithm 1 as follows: Algorithm 7. (Bounding de t erminant.) Input: An nn× real matrix A and a positive . Output: A pair of real numbers d − and d + such that det .d Ad −+ ≤≤ Computations: 1) Apply Algorithm 1 in floating po int arithmetic with unit roundoff bounded by . Let U UUE = + denote the computed upper triangular matrix, approximating the factor U of A from (2) or (3). 2) Compute the upper bound e + of (20) where ee ′ = . 3) Substitute e+ for e and ( ) 1 2 11 min|,, AAAA ∞∞ for q A in Lemma 5 and obtain an upper bound d e + on d e . 4) Output the values det d d Ue + − = − and det d d Ue + + = + . Example 2. Let 5 31 036 01.6667 5.1667 19 3164.7500 1.50003.2000 . 42 53.4000 5.25001.3333 17 2112 54 9 A − − =≈ Using Matlab, Gaussian elimination with complete pivoting gives the matrix U rounded to 4 bits: 5.2500 1.33333.4000 05.5899 1.0794 00 3.2342 U = −− , 1 00 0.3175 1 0 0.28570.5043 1 L = − , U UUE= + , L LLE= + where EU and EL are the matrices obtained from accu- mulation of rounding errors. Also 001 100 010 r P = , and 001 1 0 0. 010 c P = Then 55 5 06 106 10 00 0 003 10 A E −− ′ − ×× = × is a perturbation in A, and 4 1.2 10 A E− ′∞= × . We now compute the upper bound e + of (20). Therefore, 62.9618ee + ′≤≤ , where 5.25 a= is the maximum of ,ij a of A, l = 1 is th e ma x imu m o f , ij l of L, 2 β − = , 4 β = , and 3n= is the size of the input matrix A . Hence we obtain the following upper bound d e + on d e by Lemma 5. That is, ( ) 1 127 2 11 min,,2.2347 10 n d eAAAAnene − ++ ∞∞ ≤ +=× , where 1 9.7A= , 9.9833A∞= , and 1 9.8406AA ∞ = . Hence, 7 2.2347 10 d e + = × is an upper bound of d e . 7 det2.2347 10 d d Ue + − = −=−× and 7 det2.2347 10 d d Ue + += +=× . Since ( ) det 94.91597A= − , we have ![]() M. M. Tabanjeh 473 ( ) det det dd UeA Ue ++ − ≤≤+ . On the other hand ()( ) detdet 0.00123 d eA EAA = +−= which is less than the upper bound 7 2.2347 10× we have computed. Acknowledgements We thank the editor and the referees for their valuable comments. References [1] Muir, T. (1960) The Theory of Determinants in Historical Order of Development. Vol. I-IV, Dover, New York. [2] Fortune, S. (1992) Voronoi Diagrams and Delaunay Triangulations. In: Du, D.A. and Hwang, F.K., Eds., Computing in Euclidean Geometry, World Scientific Publishing Co., Singapore City, 193-233. [3] Brönnimann, H., Emiris, I.Z., Pan, V.Y. and Pion, S. (1997) Computing Exact Geometric Predicates Using Modular Arithmetic. Proceedings of the 13th Annual ACM Symposium on Computational Geometry, 174-182. [4] Brönnimann, H. and Yvinec, M. (2000) Efficient Exact Evaluation of Signs of Determinant. Algorithmica, 27, 21-56. http://dx.doi.org/10.1007/s004530010003 [5] Pan, V.Y. and Yu, Y. (2001) Certification of Numerical Computation of the Sign of the Determinant of a Matrix. Algo- rithmica, 30, 708-724. http://dx.doi.org/10.1007/s00453-001-0032-8 [6] Clarkson, K.L. (1992) Safe and Effective Determinant Evaluation. Proceedings of the 33rd Annual IEEE Symposium on Foundations of Computer Science, IEEE Computer Society Press, 387-395. [7] Avnaim, F., Boissonnat, J., Devillers, O., Preparata, F.P. and Yvinec, M. (1997) Eval uating Signs of Determinants Us- ing Single-Precision Arithmetic. Algorithmica, 17, 111-132. http://dx.doi.org/10.1007/BF02522822 [8] Pan, V., Yu, Y. and Stewart, C. (1997) Algebraic and Numerical Techniques for Computation of Matrix Determinants. Computers & Mathematics with Applications, 34, 43-70. http://dx.doi.org/10.1016/S0898-1221(97)00097-7 [9] Golub, G.H. and Van Loan, C.F. (1996) Matrix Computations. 3rd Edition, John Hopkins University Press, Baltimore. [10] Edmonds, J. (1967) Systems of Distinct Representatives and Linear Algebra. Journal of Research of the National Bu- reau of Standards, 71, 241-245. http://dx.doi.org/10.6028/jres.071B.033 [11] Bareiss, E.H. (1969) Sylvester’s Identity and Multistep Integer-Preserving Gaussian Elimination. Mathematics of Computation, 22, 565-578. [12] Bini, D. and Pan, V.Y. (1994) Polynomial and Matrix Computations, Fundamental Algorithms. Vol. 1, Birkhäuser, Boston. http://dx.doi.org/10.1007/978-1-4612-0265-3 [13] Conte, S.D. and de Boor, C. (1980) Elementary Numerical Analysis: An Algorithm Approach. McGraw-Hill, New York. |












