next up previous
Next: Reduction to Tridiagonal Up: The algorithms and operation Previous: Implementation with Givens rotations

Implementation with Householder and Givens

The second way to implement the algorithm is to use instead of Givens, Householder transformations for annihilating the first elements. This means that the first innerloop in (1) can be replaced by performing Householder transformations. The second innerloop will not be changed.

algorithm 2   Suppose we have the following function:
A=SymHous(A,k,m)
Which transforms $ A$ into $ H*A*H^T$ where $ H$ is the Householder rotation such that $ A*H^T$ eliminates the elements in the row $ m$ from position $ 1$ to up to the element $ k$. Using this function and the function SymGiv from (1) our algorithm looks like: (in matlab style notation)
for j=n:-1:2
  A=SymHous(A,j-2,j);
  for i=j:1:n
    A=SymGiv(A,i-1,i,i);
  end
end

Because the inner loop only gives an extra $ O(n^2)$ operations, the overall cost of this algorithm is the same, as the complexity to tridiagonalize a symmetric matrix by means of householder transformations. Therefore the complexity equals:

$\displaystyle \frac{4}{3}n^3 + O(n^2)$ (1)



Raf Vandebril 2004-04-19