next up previous contents index
Next: A fast matrix vector Up: Some algorithms connected to Previous: Some algorithms connected to   Contents   Index


Swapping the representation

Taking a closer look at the construction of a semiseparable matrix using the Givens-vector representation, we see that we keep in fact the dependency between the rows and construct the semiseparable matrix from top to bottom. In fact we can do completely the same by keeping the dependency between the columns and starting at the right side, and building the matrix from the right towards the left.

These two possibilities are in fact very important, because as we will show later on in the implicit $ QR$-algorithm, the choice between these two can make the implementation much more simple and cheap in terms of operation cost. Therefore we present in this section an order $ O(n)$ algorithm to swap the representation from top to bottom into a representation from right to left.

We will show this construction by an example of order $ n=4$. We have in fact the following matrix:

% latex2html id marker 31891
$\displaystyle \left( \begin{array}{rrrr} c_1 d_1 &...
...c_3 d_3 \\  s_3 s_2 s_1 d_1 & s_3 s_2 d_2 & s_3 d_3 & d_4 \end{array} \right) .$    

A naive way to do it, is to calculate the diagonal and subdiagonal elements, and to reconstruct the representation in the other direction by using this information. But as already mentioned before not all semiseparable matrices can be represented with the diagonal subdiagonal approach. We will start reconstructing the representation from right to left, this means that for $ \hat{G}$ and $ \hat{d}$, we first calculate $ \hat{d}_4$ and $ \hat{G}_3$. One can calculate $ \hat{d}_4$ immediately as $ \hat{d}_4= c_1 d_1$. The dependency between the first and second column has to be calculated from $ [s_1
d_1, d_2]$, because it is possible that $ c_2$ equals zero. Let us use now the following notation: $ [s_1 d_1, d_2]\hat{G}_3^T=[0,r_2]$, where $ \hat{G}_3$ is the Givens transformation annihilating $ s_1 d_1$ and $ r_2$ is the norm of $ [s_1
d_1, d_2]$. Now we calculate $ \hat{G}_2$ as the Givens transformation such that $ [s_2 r_2, d_3]\hat{G}_2^T=[0,r_3]$, and one has to continue now with $ [s_3 r_3, d_4]\hat{G}_1^T=[0,r_4]$. The reader can verify, that with this construction we omit all the problems which can occur with zero structures. The new Givens transformations are determined by the Givens transformations $ \hat{G}_i$ and the new diagonal elements are determined by the $ r_i$.

From an implementational point of view this will be a very powerful tool. If one performs for example a row transformation on a semiseparable matrix presented with the Givens-vector representation from top to bottom, one can see that the Givens transformations do not contain the correct dependencies between the rows anymore, because the transformation changed them. If however the matrix was presented with the Givens-vector representation from right to left, performing a row transformation on the matrix, would not change the dependencies between the columns, these dependencies are stored in the Givens transformations and are therefore not altered by this transformation.


next up previous contents index
Next: A fast matrix vector Up: Some algorithms connected to Previous: Some algorithms connected to   Contents   Index
Raf Vandebril 2004-05-03