1: Initialize: Choose X 0 , compute R 0 : = B A X 0 , V 1 B 1 : = R 0 and set V 1 : = V 1 .

2: Flexible Arnoldi process: Perform m steps of the block Arnoldi process to compute V m + 1 and H ˜ m

for j : = 1 , , m , compute Z j : = M 1 V j ,

accumulate Z j : = [ Z 1 , Z 2 , , Z j ] ,

compute W : = A Z j ,

for i : = 1 , , j ,

H i , j : = V i W , W : = W V i H i , j .

3: PBMinPert solution:

If H j + 1, j = 0 , then

compute the exact solution X j = X 0 + Z j H j 1 E 1 B 1 ; stop.

If H j + 1, j 0 , then

compute the Cholesky decomposition Q T Q = Z m T Z m and update L m 1 ,

compute the largest singular value and the associated right singular vector

for