A New Algorithm to Obtain the Adjugate Matrix Using CUBLAS on GPU González, H.E., Carmona, L., J.J

A New Algorithm to Obtain the Adjugate Matrix Using CUBLAS on GPU González, H.E., Carmona, L., J.J

ISSN: 2277-3754 ISO 9001:2008 Certified International Journal of Engineering and Innovative Technology (IJEIT) Volume 7, Issue 4, October 2017 A New Algorithm to Obtain the Adjugate Matrix using CUBLAS on GPU González, H.E., Carmona, L., J.J. Information Technology Department, ININ-ITTLA Information Technology Department, ININ proved to be the best option for most practical applications. Abstract— In this paper a parallel code for obtain the Adjugate The new transformation proposed here can be obtained from Matrix with real coefficients are used. We postulate a new linear it. Next, we briefly review this topic. transformation in matrix product form and we apply this linear transformation to an augmented matrix (A|I) by means of both a minimum and a complete pivoting strategies, then we obtain the II. LU-MATRICIAL DECOMPOSITION WITH GT. Adjugate matrix. Furthermore, if we apply this new linear NOTATION AND DEFINITIONS transformation and the above pivot strategy to a augmented The problem of solving a linear system of equations matrix (A|b), we obtain a Cramer’s solution of the linear system of Ax b is central to the field of matrix computation. There are equations. That new algorithm present an O n3 computational several ways to perform the elimination process necessary for complexity when n . We use subroutines of CUBLAS 2nd A, b R its matrix triangulation. We will focus on the Doolittle-Gauss rd and 3 levels in double precision and we obtain correct numeric elimination method: the algorithm of choice when A is square, results. dense, and un-structured. nxn Index Terms—Adjoint matrix, Adjugate matrix, Cramer’s Let us assume that AR is nonsingular and that we rule, CUBLAS, GPU. wish to solve the linear system Ax b . Here we show how for exact arithmetic and partial pivoting and column I. INTRODUCTION interchanges some Gauss transformations M1 ,..., Mn1 can A Linear System of Equations (LSE) can be defined as a almost always be found such that Mn1 ,..., M2M1A U is set of m equations with n unknowns represented by a matrix upper triangular [9]. The original problem is then A, a vector b and an unknown vector x, namely, equivalent to the upper triangular system Ax b .Many methods have been proposed to solve such linear equations. A famous one is Cramer’s rule, where each Ux Mn1 ,..., M 2M1 b wich can be solved through component of the solution is determined as the ratio of two determinants. back-substitution. nxn When trying to solve a system of n equations using Suppose, then, that AR and that, for some k<n, we Cramer’s rule, one needs to compute n+1 determinants, each have determined the Gauss transformations nxn of order n. If these are computed in a straightforward way, M1 ,..., Mk1 R such that using the Laplace Expansion, the solution to the linear system A (k1) A (k1) (k 1) (k1) 11 12 takes n 1n!n 1 multiplications, plus a similar number A M k1 M 1 A 0 A (k1) (n k 1) of additions. Although Cramer´s rule possesses a fundamental 22 theoretical importance, it may result impractical in (k 1) (n k 1) computations. It is for that reason that this method is seldom (k1) Where: A11 is an upper triangular matrix? recommended [1]-[6]. Cramer´s rule has at least one attractive property: it computes every element of the solutions a (k 1) . a (k 1) independently. For this reason, it can be a practical method kk kn for some special linear systems on parallel computers [7]. . (k1) Now, if A Another approach, with a certain mathematical appeal but 22 . considerable computational pitfalls, finds the solution to a . 1 linear system of equations using the inverse matrix A . (k 1) (k 1) ank . ann However, in virtually every application, it is unnecessary and inadvisable to compute the inverse matrix explicit. The (k 1) and akk 0, then the multiplicators : inverse requires more arithmetic and produces a less accurate (k 1) answer. Therefore, neither of the above methods are aik mi (k 1) ;i k 1,...,n ; with akk 0 are well defined. recommended [8]. Again, in this paper, we will propose a new akk efficient method to calculate the adjugate matrix. So, we have the following The Gaussian Transformation (GT) for solving an LSE has DOI:10.17605/OSF.IO/RPB6F Page 12 ISSN: 2277-3754 ISO 9001:2008 Certified International Journal of Engineering and Innovative Technology (IJEIT) Volume 7, Issue 4, October 2017 Definition. An elementary lower triangular matrix of interchange equations before this is done through P, a order n and index k is a matrix of the form [10] permutation matrix that records the row exchanges as detailed T Mk In mek below. Where: A. LU Decomposition Theorem 1 . 0 Using the above expression, the following can be established . e T (0,...,0,1,0,...,0)T [11]: k , I . Theorem. Let A k denote the leader or main sub-matrix (k k n . x k ) of AR nxn . If is non-singular for k=1,...,n ; nxn 0 . 1 then there exist a lower triangular matrix LR and an nxn upper triangular matrix UR so that A=PLU. T Furthermore, Ak u11...ukkk 1,..., n. m 0,0,0,...,0, mk 1 ,...,mn k times III. DERIVATION OF A NEW LINEAR In general an elementary lower triangular matrix has the TRANSFORMATION above form. In the previous section we have defined an elementary lower The computational significance of elementary lower T triangular matrix of order n and index k as Mk In mek . triangular matrices is that they can be used to introduce zero We shall find the above expression and the next theorem, components into a vector. Thus, whose proof can be found in [10] useful. a11 a11 Theorem. The pivot elements a (k) (k 1,..., n) , are . . k,k . . nonzero if and only if the leading principal sub . . matrices A (k 1,..., n) , are non-singular. k ak1 ak1 M k . On this basis, the following can be stated a 0 k 1,1 A Rnxn A (k 1,..., n) . . Corollary. Let be a matrix with k . . non-singular leading principal sub-matrices. Then, there . . exists a unique diagonal matrix for k=1 (a (1) 1) whose 00 an1 0 entries are: The matrix M is said to be a GT. The vector m is referred to k 11 as the Gauss vector. The components of m are known as . multipliers. Then it follows that A (k) A (k) (k) . (k) (k1) 11 12 A M k A 0 A (k) (n k) . 22 (k) (n k) 1k (k) (k) Where A is an upper triangular matrix? ak,k 11 D This process illustrates the k-th step of the decomposition k (k) ak 1,k 1 process, in which we used k 1 k k . 1 1 1 (i) T (i) T (Mk M1) M1 Mk (In m ei ) In m ei i1 i1 . We find the final expression for the decomposition process as . L (k) 0 I 0 A (k) A (k) 11 k 11 12 (k) A (k) a (k) 0 A k,k L 21 I nk 22 0 I nk (k) (k) a L 0 k 1,k 1 n 1 11 (1) (k) (M k ...M1 ) (k) I n (m ,...,m ,0,...,0). L 21 I nk (k ) (k ) In general, the forward elimination consists of n-1 steps. At Where ak,k and ak 1,k 1 are the pivots elements. the k-th step, multiples of the k-th equations are subtracted Now, if we scale the matrix Mk with that diagonal matrix, from the remaining equations to eliminate the k-th variable. If we will have (k ) the pivot element ak,k is null or “small”, it is advisable to DOI:10.17605/OSF.IO/RPB6F Page 13 ISSN: 2277-3754 ISO 9001:2008 Certified International Journal of Engineering and Innovative Technology (IJEIT) Volume 7, Issue 4, October 2017 ' Mk DkMk A. New Decomposition Theorem through Determinants 1 Using any of the above expressions, one can state 1 1 . nxn ' Theorem. Let A R and M Mk .Then M is a . kn1 . lower triangular matrix all whose components are determinants and U MA also has all components in 1k (k) (k ) a a determinant form. Furthermore, A un,n k 1,k k,k a(k) a(k ) k 1,k 1 k 1,k 1 k 1 Proof. It follows from an induction on n. For n=1 the . ' theorem is trivially true since M M1 1 and U MA a11. . For the induction step (k 1,..., n 1) we have: . n=2 . (k ) (k) k=1 an,k ak,k . a(k) a(k) a11 a12 ' 1 0 ' k 1,k 1 k 1,k 1 n A ; M ; M M ; a a 1 a a 1 and, once simplified, it can be re-expressed as 21 22 21 11 1 a a M' 11 12 k (k ) 1 0 a11 a12 ak 1,k 1 U MA a a 0 11 12 (k ) a21 a11 a21 a22 ak 1,k 1 a a 1 21 22 . n=3 . k=1,2 . (k ) ak 1,k 1 k a a a 1 0 0 a(k ) a(k ) 1 11 12 13 k 1,k k ,k k 1 A a a a ; M ' a a 0 ; . 21 22 23 1 21 11 a a a a 0 a . 31 32 33 31 11 . . a(k ) . a(k ) a a a n,k k ,k n 11 12 13 a a a a U M ' A 0 11 12 11 13 By using this new transformation and applying the 1 1 ; a21 a22 a21 a23 elimination process to a matrix A, all of whose entries are a a a a integers, all intermediate results are integers too, forming a 11 12 11 13 0 number ring [12], since they are obtained through additions a31 a32 a31 a33 nxn ' nxn and products.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    8 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us