Skip to main content
. 2018 Jan 19;18(1):283. doi: 10.3390/s18010283
Algorithm 2: The LLL reduction with pivoted reflection
Set R=B and Q=Im×m
For i = 1 to m − 1         (Pivoted Householder Reflection)
Find the shortest vector bsi in Bi
Swap(bi, bi+s1) of B
Calculate Hi for B
Set R=Hi·R and Q=Q·Hi
End
Set k = 2
While km
For j = k-1 down to 1
Set rk = rk[rj,krj,j]round·rj          (Size reduction)
End
If δ·rk1,k12>rk,k2+rk1,k2 then      (Lovász condition)
  Swap (rk1,rk)               (Swap process)
  Calculate Hk1 for R
  Set R=Hk1·R and Q=Q·Hk1
Set k = max(k − 1, 2)
Else
  Set k = k + 1
  End
End