Numerical algorithms for solving comrade linear systems based on tridiagonal solvers

https://doi.org/10.1016/j.amc.2007.08.029Get rights and content

Abstract

Recently, two efficient algorithms for solving comrade linear systems have been proposed by Karawia [A.A. Karawia, Two algorithms for solving comrade linear systems, Appl. Math. Comput. 189 (2007) 291–297]. The two algorithms are based on the LU decomposition of the comrade matrix. In this paper, two algorithms are presented for solving the comrade linear systems based on the use of conventional fast tridiagonal solvers and an efficient way of evaluating the determinant of the comrade matrix is discussed.

Introduction

We consider the solution of comrade linear systems of the form Ax = b, where x  (x1, x2,…, xn)T, b  (b1, b2,…, bn)T are vectors of length n and A is an n-by-n comrade matrix given byA=-β1α11α10000γ2α2-β2α21α20000γ3α3-β3α31α300000000γn-1αn-1-βn-1αn-11αn-1-anαn-an-1αn-a4αn-a3αnγn-a2αn-βn-a1αn.Multiplying Ax = b by the diagonal matrix D  diag(α1, …, αn) from the left, i.e. DAx = Db, then we obtain the following linear systems:A˜x=b˜,whereA˜=-β110000γ2-β210000γ3-β3100000000γn-1-βn-11-an-an-1-a4-a3γn-a2-βn-a1and b˜(b˜1,b˜2,,b˜n)T=(α1b1,α2b2,,αnbn)T. Since the transformation does not lose generality for solving the original systems, i.e. it keeps the same solution as the original systems, we consider the solution of the above linear systems (1). The coefficient matrix of (1) is closely related to a tridiagonal matrix in that the matrix can be split as a tridiagonal matrix and a rank-one matrix of the formA˜=T+enaT,where en is the nth unit vector, i.e. the nth entry is one and others are all zeros, a  (−an, −an−1,…, −a1)T, andT-β110000γ2-β210000γ3-β3100000000γn-1-βn-110000γn-βn.Recently, Karawia has proposed numerical and symbolic algorithms for solving comrade liner systems [4]. Since the algorithms are based on the LU decomposition of A˜, it is natural and good approach. From the perturbation point of view, the matrix A˜ can be written as T + enaT. Hence, it may be also natural to use tridiagonal solvers for solving comrade linear systems. Efficient tridiagonal solvers have been given much attention and developed by many researchers such as TDMA or the Thomas algorithm see e.g. [5, p. 186], and the stable and reliable algorithms [1]. Therefore, it is worth considering numerical algorithms for comrade linear systems based on tridiagonal solvers.

The present paper is organized as follows: in the next section, we give two numerical algorithms for solving comrade linear systems. In Section 3, we present a numerical formula for evaluating the determinant of the comrade matrix. In Section 4, we show the result of a numerical experiment. Finally we make some concluding remarks in Section 5.

Section snippets

Two algorithms based on any fast tridiagonal solver

In this section, we give two numerical algorithms for solving comrade linear systems. It follows from (1), (2) that we have the following two linear systems:(I+T-1enaT)x=T-1b˜,(I+enaTT-1)x˜=b˜,x˜=Tx.Here, the tridiagonal matrix is assumed to be nonsingular. By the above transformation, we show that efficient numerical algorithms based on fast tridiagonal solvers can be obtained for solving comrade linear systems. Now we consider the solution of the linear systems (3). For convenience to

Efficient determinant evaluation for comrade matrices

In this section, we give an efficient numerical formula for the determinant of the comrade matrix. It is important to evaluate the determinant since the value tells whether the system has a unique solutions or not and the system is ill-conditioned or not.

We now show that an efficient numerical formula for the determinant of the comrade matrix can be obtained by the combination of our framework [6] and any efficient algorithm for evaluating tridiagonal determinants, e.g. the DETGTRI algorithm [2]

A numerical example

In this section, we show that if we use the Thomas algorithm and Algorithm 1, then we can obtain the comrade linear systems and the determinant of the matrix. As a example we consider the following scaled linear systems [4]:-110003-210001-310002-41-1-1-13-1-5-1x1x2x3x4x5=12-3-5-28.Here we describe the Thomas algorithm, see e.g. [5, p. 186]. The algorithm solves the following tridiagonal linear systems:c1d100b2c2d20b30dn-100bncnx1x2xn-1xn=f1f2fn-1fnby computing the recurrences of the

Concluding remarks

In this paper, we have presented two numerical algorithms for solving comrade linear systems based on any fast tridiagonal solver and have given a formula for evaluating the determinant of the comrade matrix based on any algorithm for evaluating tridiagonal determinants. Since there are efficient tridiagonal solvers and algorithms for tridiagonal determinants, our algorithms may be useful. Moreover, if users have the codes for tridiagonal solvers and algorithms for tridiagonal determinants,

References (6)

There are more references available in the full text version of this article.

Cited by (0)

Partially supported by the MEXT. KAKENHI (Grant No. 18760063).

View full text