I am learning to use the NTL library currently, especially for the LLL algorithm later. Does anyone have any idea of the usage of the LLL function in the NTL library? Thanks in advance.
Asked
Active
Viewed 1,250 times
2
-
do you need anything beyond the documentation at e.g. http://www.shoup.net/ntl/doc/LLL.txt – mc110 Jun 17 '14 at 09:02
-
@mc110: I saw this documentation. But how do you use the LLL function, i.e. can you give an example? – meta_warrior Jun 17 '14 at 09:32
1 Answers
4
From the "documentation":
long
[G_]LLL_{FP,QP,XD,RR} (mat_ZZ& B, [ mat_ZZ& U, ] double delta = 0.99,
long deep = 0, LLLCheckFct check = 0, long verbose = 0);
You can use the LLL function by calling e.g.
LLL_FP(B)
The suffix FP
marks the precision, since the calculations are done in floating point arithmetic. This is done for speedup the LLL algorithm. If you need better prezision, you can choose one of the other suffixes QP
, XD
or RR
.
Notice that B
has to be a matrix of type ZZ
. NTL uses the rows of the matrix as basis of the lattice. (I ran into this problem, due to Prof. C.P. Schnorr writes a lattice basis as columns)
After thereduction the LLL-reduced basis overrides your input matrix B
. If you need the transition matrix U
, that do the reducktioin U*B = B_LLL
, you can call
LLL_FP(B, U)
I hope this helps.

AbcAeffchen
- 14,400
- 15
- 47
- 66
-
1
-
2I think yes, but maybe it has to be a basis, that means it has to have mor columns than rows. but you can easily test this. – AbcAeffchen Nov 24 '14 at 08:24