next up previous contents index
Next: Implementation of the -factorization Up: QR-algorithms Previous: Conclusions   Contents   Index

Implementations of $ QR$-related algorithms and numerical experiments

In the previous two chapters different theoretical results were combined, in order to build an implicit $ QR$-algorithm for semiseparable matrices. We know how such an algorithm should be designed. The only unsolved problem yet is the implementation. For the implementation we choose the Givens-vector representation as defined in Chapter 2. In the previous chapters, nothing was mentioned about the deflation criterion, i.e., when do we assume that an eigenvalue is accurate enough, or even more, when should we deflate an almost block diagonal matrix into several blocks. This problem, together with a fast computation for the norms of the off-diagonal blocks is solved in this chapter too. The final important problem related to the eigenvalue decomposition is the calculation of the eigenvectors. Two different possible ways will be explained on how to compute them.


In the first section of this chapter an $ O(n)$ implementation will be given to solve diagonal plus semiseparable systems of equations via the $ QR$-factorization of the diagonal plus semiseparable matrix. As we know from the previous chapter the $ QR$-factorization consists of applying twice a sequence of $ n-1$ Givens transformations. The algorithm is therefore also divided in two separate parts. In a first part, the first sequence of Givens transformations is applied on three matrices: the lower triangular part of the semiseparable matrix, the strictly upper triangular part of the semiseparable matrix and the diagonal matrix. Recombining these three matrices shows that the resulting Hessenberg matrix has the upper triangular part of rank $ 2$. This upper triangular part will be represented by two Givens-vector representations. The application of the second sequence of Givens transformations will transform the Hessenberg matrix into a strictly upper triangular matrix of rank $ 2$, represented by two Givens-vector representations, and a diagonal. Using this representation of the upper triangular matrix, the system can be solved via backward substitution in order $ O(n)$.

In the second section, we will design the implementation of a $ QR$-step on a symmetric semiseparable matrix without shift. This corresponds to performing a similarity transformation, with the first sequence of Givens transformations as designed in Section 7.1. Instead of performing first all the transformations on the left side of the semiseparable matrix, and then performing all the transformations on the right side of the resulting semiseparable matrix, we will perform the transformations simultaneously. This means that at the same time as performing the transpose of a Givens transformation on the left, we will perform the Givens transformation also on the right. The details of the implementation are given in this section.

Section 9.3 discusses the reduction of a matrix to the unreduced form. Attention is paid to a criterion stating wether or not the semiseparable structure extends above the diagonal.

Section 9.4 gives the details on the implementation of an implicit $ QR$-step on a symmetric semiseparable matrix, with shift. As the $ QR$-step with shift, initially performs a $ QR$-step without shift, we assume that the matrix we start with has the structure of the resulting matrix from the previous section. The $ QR$-step with shift is initialized by performing the similarity Givens transformation $ G_n$, which will divide the matrix in two semiseparable matrices: one semiseparable matrix of dimension $ 2$ by $ 2$ at the upper left position, and one semiseparable matrix of dimension $ n-1$ by $ n-1$ at the lower right position. Both of the semiseparable matrices will be represented by the Givens-vector representation. The consecutive Givens transformations performed on the matrix, will increase the dimension of the upper left semiseparable matrix by one at each transformation, and they will decrease the dimension of the lower right semiseparable matrix by one at each step. At each step therefore the Givens-vector representation of the upper left and lower right semiseparable matrix have to be updated.

Deflation is the subject of following section. It is investigated when we should divide the symmetric semiseparable matrix in different blocks, such that all the eigenvalues of these blocks approximate very well the eigenvalues of the original matrix. In the tridiagonal approach the original matrix is divided, if the corresponding subdiagonal elements are close enough to zero. This is logical because the subdiagonal elements contain all the information of the corresponding lower left block, which only has the upper right element, which is the subdiagonal element, different from zero. In our semiseparable case however the lower left blocks are full. Calculating the norms of all of the lower right blocks, to see whether they are close enough to zero, is a very slow operation. Fortunately we can compute all the norms of the off-diagonal blocks in $ O(n)$. Also two different criterions whether an off-diagonal block is small enough or not, are discussed.

In several cases, not only the eigenvalues are desired, but sometimes also some or all of the eigenvectors are needed. Section 9.6 considers two possibilities for calculating the eigenvectors of the symmetric semiseparable matrix. The first method consists of performing all the orthogonal transformations, needed to compute all the eigenvalues via the implicit $ QR$-algorithm, on the identity matrix. In this way one constructs a matrix $ Q$, for which the columns are the eigenvectors of the original semiseparable matrix. The second method is preferable if only few of the eigenvectors are needed. This method calculates via inverse iteration the eigenvectors connected to a particular eigenvalue. To compute the eigenvectors of an arbitrary symmetric matrix $ A$, which first needs to be transformed to semiseparable form, one needs to store the orthogonal transformation used to transform the matrix $ A$ into semiseparable form.

Section 9.7 briefly discusses the implementation of the implicit $ QR$-algorithm for calculating the singular values and the implicit $ QR$-algorithm for Hessenberg-like matrices.

In Section 9.8 different numerical experiments are performed on the eigenvalue solver based on semiseparable matrices. Arbitrary matrices are transformed to a similar symmetric semiseparable one and afterwards the implicit $ QR$-algorithm is applied to the semiseparable matrix in order to calculate its eigenvalues. Four different experiments are reported. A first experiment investigates an almost block matrix and compares the tridiagonal approach with the semiseparable one. In a second experiment a matrix is constructed, for which the eigenvalues form a stair. After the reduction to tridiagonal and the corresponding reduction to the semiseparable form, the diagonal elements of both the tridiagonal and the semiseparable matrix are compared. In a third experiment the eigenvalues of two difficult matrices are calculated via the semiseparable and the tridiagonal approach. In a last experiment the accuracy of the eigenvalues, computed by two different deflation criterions, using the semiseparable approach is compared.

In the last section several numerical experiments are performed using the algorithm to compute the singular values via intermediate upper triangular semiseparable matrices. Two types of experiments are performed. In one type of experiment the accuracy between the bidiagonal and the upper triangular semiseparable approach are compared. In the second experiment the number of $ QR$-steps needed to compute all the singular values, via both the algorithms are compared.



Subsections
next up previous contents index
Next: Implementation of the -factorization Up: QR-algorithms Previous: Conclusions   Contents   Index
Raf Vandebril 2004-05-03