The algorithm

Let us denote with $ u$ and $ v$ the generators of the semiseparable matrix. The vector $ d$ contains the diagonal elements and $ b$ is an arbitrary right-hand side. The following algorithm solves the following system of equations $ (S+D)x=b$, using thereby the Yule-Walker-like results as developed in the previous section. We have to store now $ 4$ extra vectors for recalculating the solution, namely $ a$ and $ \mu$ for storing the values of $ \alpha$ and $ \mu$ in each step and $ f$ and $ g$ for storing the values of $ f_i$ and $ g_i$ in each step.

%---- First part: construction of the vectors -----
% initialization for the different vectors
denominator=d(1)+u(1)*v(1);
a(1)=-v(1)/denominator;
mu(1)=b(1)/denominator;
f(1)=1;
g(1)=1;
% initialization for the different inner products
ip=a(1)*v(1);   % the inner product r^T y
ipl=mu(1)*v(1); % the inner product r^T x
% The main loop
for i=2:n
  % initialize
  t=u(i)*ip+v(i);
  denominator=(u(i)*t+d(i));
  % Calculation of alpha
  a(i)=-t/denominator;  
  % Calculation of the factor f
  f(i)=(1+u(i)*a(i));
  % The calculation of mu
  mu(i)=(b(i)-u(i)*ipl)/denominator;
  % The factor g
  g(i)=mu(i)*u(i);
  % the inner product r^T x
  ipl=ipl+mu(i)*t;
  % the inner product r^T y
  ip=a(i)*t+ip;
end

%---- Second part: construction of the solution ----
% we construct now the solution with the 4 vectors.
x(n)=mu(n);
factor=g(n);
for i=n-1:-1:1  
  x(i)=mu(i)+factor*a(i);
  factor=g(i)+f(i)*factor;
end

An easy calculation reveals that the complexity of this solver is $ 19n-13$ operations.



Raf Vandebril 2005-04-25