next up previous
Next: Conclusions Up: A note on the Previous: Retrieving the representation from

An algorithm connected to the representation

In this section one example of an implementation with the new definition is given. In [42,44] other algorithms, based on the Givens-vector representation can be found. The algorithms for retrieving the representation and for constructing the full semiseparable matrix, given the Givens-vector representation, can be deduced easily with the information in the previous section.

Here an $ O(n)$ implementation of a matrix vector multiplication will be given. The formulas will be given for nonsymmetric semiseparable matrices, who have two sequences of Givens transformations and two vectors. Let us denote the first sequence as:

$\displaystyle G$ $\displaystyle =$ \begin{displaymath}\left(
\begin{array}{cccc}
c_1 & c_2 & \ldots & c_{n-1} \\
s_1 & s_2 & \ldots & s_{n-1}
\end{array}\right)\end{displaymath}  
$\displaystyle d$ $\displaystyle =$ \begin{displaymath}\left(
\begin{array}{cccc}
d_1 & d_2 & \ldots & d_n
\end{array}\right)\end{displaymath}  

and the second as:
$\displaystyle H$ $\displaystyle =$ \begin{displaymath}\left(
\begin{array}{cccc}
r_1 & r_2 & \ldots & r_{n-2} \\
t_1 & t_2 & \ldots & t_{n-2}
\end{array}\right)\end{displaymath}  
$\displaystyle e$ $\displaystyle =$ \begin{displaymath}\left(
\begin{array}{cccc}
e_1 & e_2 & \ldots & e_{n-1}
\end{array}\right).\end{displaymath}  

We want to calculate the multiplication between $ S$ and $ v$ where

% latex2html id marker 3816
$\displaystyle S=\left( \begin{array}{cccccc} c_1 d_...
...} s_{n-2} \cdots s_1 d_1 & \ldots & & & s_{n-1}d_{n-1}& d_n \end{array} \right)$    

and

% latex2html id marker 3818
$\displaystyle v=\left(\begin{array}{cccc} v_1 & v_2 & \ldots & v_n \end{array}\right)^T.$    

To deduce the algorithm, we have to decompose the matrix into a strict uppertriangular, and a lower triangular part of $ S$. Denote $ S_1=tril(S)$ and $ S_2=triu(S)$. We will now compute:
$\displaystyle y$ $\displaystyle =$ $\displaystyle S_1 v$  
$\displaystyle z$ $\displaystyle =$ $\displaystyle S_2 v$  

such that $ x=y+z=Sv$ is the solution. To calculate % latex2html id marker 3841
$ y=\left(\begin{array}{cccc} y_1 & y_2 & \ldots & y_n \end{array}\right)$ in a fast way, we rewrite the following formulas (only the first $ 4$ components of $ y$ are denoted):
$\displaystyle y_1$ $\displaystyle =$ $\displaystyle c_1 d_1 v_1$  
$\displaystyle y_2$ $\displaystyle =$ $\displaystyle c_2 s_1 d_1 v_1 + c_2 d_2 v_2$  
$\displaystyle y_3$ $\displaystyle =$ $\displaystyle c_3 s_2 s_1 d_1 v_1 + c_3 s_2 d_2 v_2 + c_3 d_3 v_3$  
$\displaystyle y_4$ $\displaystyle =$ $\displaystyle c_4 s_3 s_2 s_1 d_1 v_1 + c_4 s_3 s_2 d_2 v_2 + c_4 s_3 d_3
v_3 + c_4 d_4 v_4.$  

We use some help variables called $ a_i$. Rewriting the formulas reveals the order $ O(n)$ algorithm for the multiplication.
$\displaystyle y_1$ $\displaystyle =$ $\displaystyle c_1 \left(d_1 v_1\right)$  
  $\displaystyle =$ $\displaystyle c_1 a_1$  
$\displaystyle y_2$ $\displaystyle =$ $\displaystyle c_2 \left(s_1 d_1 v_1 + d_2 v_2\right)$  
  $\displaystyle =$ $\displaystyle c_2 \left(s_1 a_1+d_2 v_2\right)$  
  $\displaystyle =$ $\displaystyle c_2 a_2$  
$\displaystyle y_3$ $\displaystyle =$ $\displaystyle c_3 \left(s_2 \left(s_1 d_1 v_1 + d_2 v_2\right) + d_3 v_3\right)$  
  $\displaystyle =$ $\displaystyle c_3 \left(s_2 a_2 + d_3 v_3\right)$  
  $\displaystyle =$ $\displaystyle c_3 a_3$  
$\displaystyle y_4$ $\displaystyle =$ $\displaystyle c_4 \left(s_3 \left(s_2 \left(s_1 d_1 v_1 + d_2 v_2\right) + d_3 v_3\right)
v_3 + d_4 v_4\right)$  
  $\displaystyle =$ $\displaystyle c_4\left(s_3 a_3 + d_4 v_4\right)$  
  $\displaystyle =$ $\displaystyle c_4 a_4.$  

Combining the last $ 2$ equalities of all the $ y_i$ one can derive an order $ n$ algorithm to perform the multiplication of $ S_1$ and $ v$. The multiplication of $ S_2$ and $ v$ can be derived in a completely analogous way.


next up previous
Next: Conclusions Up: A note on the Previous: Retrieving the representation from
Raf Vandebril 2004-04-19