Реализация LLL на Python3.
python3 -m pip install olll
или
curl -O https://raw.githubusercontent.com/orisano/olll/master/olll.py
https://en.wikipedia.org/wiki/Lenstra%E2%80%93Lenstra%E2%80%93Lov%C3%A1sz_lattice_basis_reduction_algorithm#Example
import olll
reduced_basis = olll . reduction ([
[ 1 , 1 , 1 ],
[ - 1 , 0 , 2 ],
[ 3 , 5 , 6 ],
], 0.75 )
print ( reduced_basis )
# [[0, 1, 0], [1, 0, 1], [-1, 0, 2]]
Нао Йонаширо (@orisano)
Массачусетский технологический институт
https://en.wikipedia.org/wiki/Lenstra%E2%80%93Lenstra%E2%80%93Lov%C3%A1sz_lattice_basis_reduction_algorithm