A first algorithm of complexity $ O(p_1 p_2 n^2)$

Based on the previous two sections we can present a first version of a Levinson-like solver for simple $ p_1$-Levinson conform matrices.

The algorithm is given in a simple mathematical formulation. First the problem is initialized and then the main loop is performed. After each computation in the algorithm, the number of operations5involved is shown. We remark that the presented algorithm, is not the most efficient implementation, it is written in this way, to clearly see the most computational expensive steps. For the operation count, we assume that the multiplication of a row vector with any of the matrices $ P_k$ has a flop count bounded by $ \kappa_1 n +
\kappa_2$, with $ \kappa_1$ and $ \kappa_2$ two constants.

Algorithm 1   Initialize
$\displaystyle Y_1= \alpha_1$ $\displaystyle =$ $\displaystyle \frac{-R_1}{a_{1,1}}$  
$\displaystyle \mathbf{x}_1= \mu_1$ $\displaystyle =$ $\displaystyle \frac{b_1}{a_{1,1}}$  

For $ k=1,\ldots,n-1$ do
  1. Compute and store the following variables:
    1. $ S_{k}^T Y_k$ Flops: $ p_1 p_2 (2k-1)$
    2. $ S_{k}^T \mathbf{x}_k$ Flops: $ p_2 (2k-1)$
    3. $ \mathbf{d}_{k+1} (S_{k}^T Y_{k})$ Flops: $ p_1 (2p_2 -1 ) $
    4. $ (\mathbf{d}_{k+1} S_{k}^T Y_{k} \mathbf{c}_{k+1}^T + a_{k+1,k+1})$ Flops: $ 2p_1$
  2. $ \mathbf{\alpha}_{k+1} = \frac{(-1) (\xi_{k+1} + \mathbf{d}_{k+1}
S_{k}^T Y_{k}P) }{(\mathbf{d}_{k+1} S_{k}^T Y_{k} \mathbf{c}_{k+1}^T +
a_{k+1,k+1})}$ Flops: $ 2p_1+\kappa_1 p_1 + \kappa_2$
  3. $ Z_{k+1} = Y_{k} \left(P+ \mathbf{c}_{k+1}^T \;\alpha_{k+1} \right)$ Flops: $ k (\kappa_1 p_1 + \kappa_2)+k(2p_1-1)+2p_1 k$
  4. $ \mu_{k+1} = \frac{b_{k+1} - \mathbf{d}_{k+1} S^T_k \mathbf{x}_k
}{\left(\mathbf{d}_{k+1} S^T_k Y_k \mathbf{c}_{k+1}^T + a_{k+1,k+1}\right)} $ Flops: $ 1+2p_2$
  5. $ \mathbf{w}_{k+1}=\mathbf{x}_k+ \mu_{k+1}\; Y_k \mathbf{c}_{k+1}^T$ Flops: $ 2k+k(2p_1-1)$
  6. $ Y_{k+1}^T=[Z_k^T,\alpha_k^T]$ Flops: 0
  7. $ \mathbf{x}_{k+1}^T=[w_k^T,\mu_k^T]$ Flops: 0
endfor;

Performing an overall complexity count leads us to an algorithm of complexity $ O(p_1 p_2 n^2)$. This means that as long as the factor $ p_1p_2< n$, the method will perform better than Gaussian elimination if the matrices in question are large enough. However, taking a closer look at the involved computations, we can see that the bottlenecks, causing the factor $ n^2$ in the operation count, are the computations of the matrices $ S_k^T Y_k$, and $ S_k^T x_k$, and the explicit formation of the matrices $ Z_{k+1}$ and vectors $ \mathbf{w}_{k+1}$. Assume, now that one could remove the computation of $ Z_{k+1}$ and $ \mathbf{w}_{k+1}$ out of the innermost loop, and compute the final solution, using only the stored values of $ \mathbf{\alpha}_k$ and $ \mu_k$ in $ O(n)$ operations (dependent on $ p_1$ and $ p_2$ however). Assume also that one could compute the products $ S_k^T x_k$ and $ S_k^T Y_k$ in constant time, independent of $ k$. This would lead to the following algorithm.

Algorithm 2   Initialize
$\displaystyle Y_1= \alpha_1$ $\displaystyle =$ $\displaystyle \frac{-R_1}{a_{1,1}}$  
$\displaystyle \mathbf{x}_1= \mu_1$ $\displaystyle =$ $\displaystyle \frac{b_1}{a_{1,1}}$  

For $ k=1,\ldots,n-1$ do the same initializations:

  1. Compute and store the following variables:
    1. $ S_{k}^TY_{k}$ Flops: Independent of $ k$
    2. $ S_{k}^T\mathbf{x}_{k}$ Flops: Independent of $ k$
    3. $ (\mathbf{d}_{k+1} S_{k}^T Y_{k} \mathbf{c}_{k+1}^T + a_{k+1,k+1})$ Flops: $ p_1(2p_2-1)+2p_1$
  2. $ \mathbf{\alpha}_{k+1} = \frac{(-1) (\xi_{k+1} + \mathbf{d}_{k+1}
S_{k}^T Y_{k}P) }{(\mathbf{d}_{k+1} S_{k}^T Y_{k} \mathbf{c}_{k+1}^T +
a_{k+1,k+1})}$ Flops: $ 1+p_1+\kappa_1 p_1 + \kappa_2 $
  3. $ \mu_{k+1} = \frac{b_{k+1} - \mathbf{d}_{k+1} S^T_k \mathbf{x}_k
}{\left(\mathbf{d}_{k+1} S^T_k Y_k \mathbf{c}_{k+1}^T + a_{k+1,k+1}\right)} $ Flops: $ 1+2p_2$
endfor;

Under these assumptions, the solver has a complexity: $ O(p_1p_2n)$.

In the next section, we illustrate how to achieve the above complexity, by computing the solution in another loop and by computing the products $ S^T_kY_k$ and $ S^T_k\mathbf{x}_k$, in an inductive way, making thereby the computation indepent of $ k$.

Raf Vandebril 2006-03-30