Mathematical Problems in Engineering
Volume 2015 (2015), Article ID 232456, 9 pages
http://dx.doi.org/10.1155/2015/232456

Research Article

On Solving Pentadiagonal Linear Systems via Transformations

S. S. Askar1,2 and A. A. Karawia2,3

¹Department of Statistics and Operations Researches, College of Science, King Saud University, P.O. Box 2455, Riyadh 11451, Saudi Arabia
²Department of Mathematics, Faculty of Science, Mansoura University, Mansoura 35516, Egypt
³Computer Science Unit, Deanship of Educational Services, Qassim University, P.O. Box 6595, Buraidah 51452, Saudi Arabia

Received 4 January 2015; Revised 18 March 2015; Accepted 18 March 2015

Academic Editor: George S. Dulikravich

Copyright © 2015 S. S. Askar and A. A. Karawia. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

Abstract.

Many authors have studied numerical algorithms for solving the linear systems of pentadiagonal type. The well-known fast pentadiagonal system solver algorithm is an example of such algorithms. The current paper describes new numerical and symbolic algorithms for solving pentadiagonal linear systems via transformations. The proposed algorithms generalize the algorithms presented in El-Mikkawy and Atlan, 2014. Our symbolic algorithms remove the cases where the numerical algorithms fail. The computational cost of our algorithms is better than those algorithms in literature. Some examples are given in order to illustrate the effectiveness of the proposed algorithms. All experiments are carried out on a computer with the aid of programs written in MATLAB.

1. Introduction

The pentadiagonal linear systems, denoted by (PLS), take the following forms:

where is pentadiagonal matrix given by

where and are vectors of length .

This kind of linear systems is well known in the literature [1–11] and often these types of linear systems are widely used in areas of science and engineering, for example, in numerical solution of ordinary and partial differential equations (ODE and PDE), interpolation problems, boundary value problems (BVP), parallel computing, physics, and matrix algebra [4–14]. The authors in [7] have developed an efficient algorithm to find the inverse of a general pentadiagonal matrix. In [8], the author presented an efficient computational algorithm for solving periodic pentadiagonal linear systems. The algorithm depends on the LU factorization of the periodic pentadiagonal matrix. New algorithms are used for solving periodic pentadiagonal linear systems based on the use of any pentadiagonal linear solver. The author described a symbolic algorithm for solving pentadiagonal linear systems [9]. In [10], the authors discussed the general nonsymmetric problem and proposed an algorithm for solving nonsymmetric pentadiagonal Toeplitz linear systems. A fast algorithm for solving a large system with a symmetric Toeplitz pentadiagonal coefficient matrix has been presented [11]. This efficient method depends on the idea of a system perturbation followed by corrections and is competitive with standard methods. In [12], the authors described an efficient computational algorithm and symbolic algorithm for solving nearly pentadiagonal linear systems based on the LU factorization of the nearly pentadiagonal matrix.

In this paper, we introduce more efficient algorithms based on transformations which can be described as a natural generalization of the efficient algorithms in [15].

The current paper is organized as follows. In Section 2, new numerical algorithms for solving a pentadiagonal linear system are presented. New symbolic algorithms for solving a pentadiagonal linear system are constructed in Section 3. In Section 4, three illustrative examples are presented. Conclusions of the work are given in Section 5.

2. Numerical Algorithms for Solving PLS

In this section, we will focus on the construction of new numerical algorithms for computing the solution of pentadiagonal linear system. For this purpose it is convenient to give five vectors , , , , and , where

By using those vectors together with the suitable elementary row operations, one can see that system (1) may be transformed to the equivalent linear system as follows:

The transformed system (8) is easy to solve by a backward substitution. Consequently, the PLS (1) can be solved using Algorithm 1.

                To find the solution of PLS (1) using the transformed system (8), we proceed as follows:

INPUT Order of the matrix and the components , , .

OUTPUT The solution vector .

Step  1. Use DETGPENTA algorithm [14] or DETGPENTA algorithm [16] to check the non-singularity of the coefficient matrix

            of the system (1).

Step  2. If , then Exit and Print Message (“No solutions”) end if.

Step  3. Set , , , and .

Step  4. Set , , , , and .

Step  5. For do

                Compute and simplify:

                ,

                ,

                ,

                ,

                ,

            End do.

            ,

            ,

            ,

            ,

            ,

            ,

            ,

Step  6. Compute the solution vector using , .

            For do

             Compute and simplify:

            End do.

Algorithm 1: First numerical algorithm for solving pentadiagonal linear system.

The numerical Algorithm 1 will be referred to as PTRANS-I algorithm in the sequel. The computational cost of PTRANS-I algorithm is operations. The conditions , , are sufficient for its validity.

In a similar manner, we may consider five vectors , , , , and , where

Now we will present another algorithm for solving PLS. As in PTRANS-I algorithm, by using the vectors , , , , and , together with the suitable elementary row operations, we see that system (1) may be transformed to the equivalent linear system as follows:

The transformed system (14) is easy to solve by a forward substitution. Consequently, the PLS (1) can be solved using Algorithm 2.

              To find the solution of PLS (1) using the transformed system (14), we proceed as follows:

INPUT Order of the matrix and the components , , .

OUTPUT The solution vector .

Step  1. Use DETGPENTA algorithm [14] or DETGPENTA algorithm [16] to check the non-singularity of the coefficient matrix

            of the system (1).

Step  2. If , then Exit and Print Message (“No solutions”) end if.

Step  3. Set , , , and .

Step  4. Set , , , , and .

Step  5. For do

                Compute and simplify:

                ,

                ,

                ,

                ,

                ,

            End do.

            ,

            ,

            ,

            ,

            ,

            ,

            ,

Step  6. Compute the solution vector using ,  .

            For do

                Compute and simplify:

            End do.

Algorithm 2: Second numerical algorithm for solving pentadiagonal linear system.

The numerical Algorithm 2 will be referred to as PTRANS-II algorithm in the sequel. The computational cost of PTRANS-II algorithm is operations. Also, the conditions , , are sufficient for its validity.

If or for any then PTRANS-I and PTRANS-II algorithms fail to solve pentadiagonal linear systems, respectively. So, in the next section, we develop two symbolic algorithms in order to remove the cases where the numerical algorithms fail. The parameter “” in the following symbolic algorithms is just a symbolic character. It is a dummy argument and its actual value is zero.

3. Symbolic Algorithms for Solving PLS

In this section, we will focus on the construction of new symbolic algorithms for computing the solution of pentadiagonal linear systems. Algorithm 3 is a symbolic version of PTRANS-I algorithm.

                To find the solution of PLS (1) using the transformed system (8), we proceed as follows:

INPUT Order of the matrix and the components , , .

OUTPUT The solution vector .

Step  1. Use DETGPENTA algorithm [14] or DETGPENTA algorithm [16] to check the non-singularity of the coefficient matrix

            of the system (1).

Step  2. If , then Exit and Print Message (“No solutions”) end if.

Step  3. Set . If then end if.

Step  4. Set , , and .

Step  5. Set . If then end if.

Step  6. Set , , and .

Step  7. For do

                Compute and simplify:

                ,

                ,

                If then end if.

                ,

                ,

                ,

            End do.

            ,

            . If then end if.

            ,

            ,

            . If then end if.

            ,

            ,

Step  8. Compute the solution vector using , .

            For do

                Compute and simplify:

            End do.

Step  9. Substitute in all expressions of the solution vector .

Algorithm 3: First symbolic algorithm for solving pentadiagonal linear system.

The symbolic Algorithm 3 will be referred to as SPTRANS-I algorithm in the sequel.

Algorithm 4 gives the symbolic version of PTRANS-II algorithm.

              To find the solution of PLS (1) using the transformed system (14), we proceed as follows:

INPUT Order of the matrix and the components , , .

OUTPUT The solution vector .

Step  1. Use DETGPENTA algorithm [14] or DETGPENTA algorithm [16] to check the non-singularity of the coefficient matrix

            of the system (1).

Step  2. If , then Exit and Print Message (“No solutions”) end if.

Step  3. Set . If then end if.

Step  4. , , and .

Step  5. Set . If then end if.

Step  6. , , and .

Step  7. For do

                Compute and simplify:

                ,

                ,

                If then end if.

                ,

                ,

                ,

            End do.

            ,

            . If then end if.

            ,

            ,

            . If then end if.

            ,

            ,

Step  8. Compute the solution vector using ,  .

            For do

                Compute and simplify:

            End do.

Step  9. Substitute in all expressions of the solution vector .

Algorithm 4: Second symbolic algorithm for solving pentadiagonal linear system.

The symbolic Algorithm 4 will be referred to as SPTRANS-II algorithm in the sequel.

Corollary 1 (generalization version of Corollary 2.1 in [15]). Let be the backward matrix of the pentadiagonal matrix in (2) and be given by

Then the backward pentadiagonal linear system

has the solution , , where is the floor function of and is the solution vector of the linear system (1).

Proof. Consider the permutation matrix defined by

For this matrix, we have

Since

then, using (18) and (19), the result follows.

Corollary 2 (generalization version of Corollary 2.2 in [15]). The determinants of the coefficient matrices and in (2) and (15) are given, respectively, by

where and satisfy (7) and (13), respectively.

Proof. Using (8), (14) and (19) complete the proof.

4. Illustrative Examples

In this section, we give three examples for the sake of illustration. All experiments were performed in MATLAB R2014a with an Intel Core i7-4700MQ CPU@2.40 GHz 2.40 GHz.

Example 1 (Case I: and for all ). Find the solution of the following pentadiagonal linear system of size 10:

Solution. We have

  , , , , , , and .

(i)Applying the PTRANS-I algorithm, it yields

(a), , , , , , , and ;(b)PTRANS-I = .

(ii)Applying the PTRANS-II algorithm, it yields

(a), , , , , , , , , and ;(b)PTRANS-II = .

Example 2 (Case II: and for some ). Find the solution of the following pentadiagonal linear system of size 4:

Solution. We have

  , , , , ,  , and .

The numerical algorithms PTRANS-I and PTRANS-II fail to solve the pentadiagonal linear system (22) since .

(i)Applying the SPTRANS-I algorithm, it yields

(a), ;(b)SPTRANS-I = , , and .

(ii)Applying the SPTRANS-II algorithm, it yields

(a), ;(b)SPTRANS-II = .

Example 3. We consider the following pentadiagonal linear system in order to demonstrate the efficiency of Algorithms 3 and 4:

Analytically, one can see that the exact solution of the above system is . In Table 1, we give some comparisons between our proposed algorithm and the state-of-the-art algorithms in literature. Table 1 shows solutions obtained by our proposed algorithms and other algorithms in literature for different sizes. Our obtained results show that our algorithm PTRANS-II gives better absolute error than those algorithms used in comparisons for large values of . Moreover the obtained results indicate that the value of the running time for [9] is small in comparison with other algorithms for large sizes.

Table 1: Comparisons between our proposed algorithms and state-of-the-art algorithms in literature.

and CPU time (S)

PTRANS-I
PTRANS-II
Algorithm  3 [9]
(MATLAB)
SYMPENTAINV [7]

500
1.5856 × 10⁻⁷
0.0069
0
0.0086
6.8579 × 10⁻⁸
0.0048
9.98 × 10⁻⁸
0.0023
1.5881 × 10⁻⁷
0.3317

5000
8.3674 × 10⁻⁴
0.0062
0
0.0391
3.0253 × 10⁻⁴
0.0057
2.50 × 10⁻⁴
0.7548
8.3654 × 10⁻⁴
108.0919

10000
0.0058
0.0114
0
0.0511
0.0052
0.0101
0.0106
4.5464
0.0058
812.9783

50000
2.1415
0.0308
0
0.1687
7.9056
0.0119
0.0159
655.51
—
—

5. Conclusion

There are many numerical algorithms that have been used for solving linear systems of pentadiagonal type. All numerical algorithms including the PTRANS-I and PTRANS-II algorithms of the current paper fail to solve the pentadiagonal linear system if and for any . The symbolic algorithms SPTRANS-I and SPTRANS-II of the current paper are constructed in order to remove the cases where the numerical algorithms fail. Using numerical examples we have obtained that SPTRANS-II algorithm works as well as   [9] and (A y) MATLAB algorithms. Hence, it may become a useful tool for solving linear systems of pentadiagonal type.

Conflict of Interests

The authors declare that there is no conflict of interests regarding the publication of this paper.

Acknowledgments

The authors would like to express their extremely gratefulness to the referees and editor for their useful comments and suggestions that improved this paper. This project was supported by King Saud University, Deanship of Scientific Research, College of Science Research Center.

References

T. A. Davis, Direct Methods for Sparse Linear Systems, SIAM, Philadelphia, Pa, USA, 2006.

J. W. Demmel, Applied Numerical Linear Algebra, SIAM, Philadelphia, Pa, USA, 1997.

G. H. Golub and C. F. van Loan, Matrix Computations, The Johns Hopkins University Press, Baltimore, Md, USA, 3rd edition, 1996.

J. P. Killingbeck and G. Jolicard, “The folding algorithm for pentadiagonal matrices,” Physics Letters A, vol. 166, no. 3-4, pp. 159–162, 1992.

J. J. Dongarra and A. H. Sameh, “On some parallel banded system solvers,” Parallel Computing, vol. 1, no. 3-4, pp. 223–235, 1984.

U. Meier, “A parallel partition method for solving banded systems of linear equations,” Parallel Computing, vol. 2, no. 1, pp. 33–43, 1985.

X.-L. Zhao and T.-Z. Huang, “On the inverse of a general pentadiagonal matrix,” Applied Mathematics and Computation, vol. 202, no. 2, pp. 639–646, 2008.

A. A. Karawia, “A computational algorithm for solving periodic penta-diagonal linear systems,” Applied Mathematics and Computation, vol. 174, no. 1, pp. 613–618, 2006.

T. Sogabe, “New algorithms for solving periodic tridiagonal and periodic pentadiagonal linear systems,” Applied Mathematics and Computation, vol. 202, no. 2, pp. 850–856, 2008.

L. Du, T. Sogabe, and S.-L. Zhang, “An algorithm for solving nonsymmetric penta-diagonal toeplitz linear systems,” Applied Mathematics and Computation, vol. 244, pp. 10–15, 2014.

S. S. Nemani, “A fast algorithm for solving Toeplitz penta-diagonal systems,” Applied Mathematics and Computation, vol. 215, no. 11, pp. 3830–3838, 2010.

A. A. Karawia and S. A. El-Shehawy, “Nearly pentadiagonal linear systems,” Journal of Natural Sciences and Mathematics, Qassim University, vol. 5, pp. 89–102, 2012.

J. M. McNally, “A fast algorithm for solving diagonally dominant symmetric pentadiagonal Toeplitz systems,” Journal of Computational and Applied Mathematics, vol. 234, no. 4, pp. 995–1005, 2010.

T. Sogabe, “A fast numerical algorithm for the determinant of a pentadiagonal matrix,” Applied Mathematics and Computation, vol. 196, no. 2, pp. 835–841, 2008.

M. El-Mikkawy and F. Atlan, “Algorithms for solving linear systems of equations of tridiagonal type via transformations,” Applied Mathematics, vol. 5, no. 3, pp. 413–422, 2014.

M. E. A. El-Mikkawy, “A fast and reliable algorithm for evaluating nth order pentadiagonal determinants,” Applied Mathematics and Computation, vol. 202, no. 1, pp. 210–215, 2008.