Skip to main content
. 2023 Jul 27;25(8):1130. doi: 10.3390/e25081130
Algorithm 5: Variance reduction power method with the proposed Monte Carlo AMM
Require: A:  m×m symmetric positive-semidefinite matrix, x≠0: m-dimensional randomized unit vector, c∈N
Ensure:  λ: the largest absolute eigenvalue of A
  1:  z←Aα, v←z−α2em, x¯←0, y¯←0
  2:  Set p1,…,pm, such that ∑l=1mpl=1
  3:  for while not converged do
  4:    if criteria are met then
  5:        y←y¯+em⊤(x−x¯)v+z⊤(x−x¯)em
  6:        for t=1,…,c do
  7:              Pick it with P[it=l]=pl
  8:           y←y+A′(it)A(it)′⊤(x−x¯)cpit
  9:           end for
  10:    else
  11:        y←A2x, x¯←x, y¯←y
  12:    end if
  13:    λ←x⊤y
  14:    x←y/∥y∥
  15:  end for
  16:  Return λ