Open
Description
Specifying a weight for the different columns in LLL is a very common use case. In practice, this means you performing LLL to find shortest vector(s), but instead of the usual norm
One case where this is used is in the current implementation of small_roots
if X is None:
X = (0.5 * N**(beta**2/delta - epsilon)).ceil()
verbose("X = %s" % X, level=2)
⋮
B = Matrix(ZZ, len(g), delta*m + max(delta,t) )
for i in range(B.nrows()):
for j in range( g[i].degree()+1 ):
B[i, j] = g[i][j]*X**j
B = B.LLL(**kwds)
f = sum([ZZ(B[0, i]//X**i)*x**i for i in range(B.ncols())])
R = f.roots()
Here the X**j
is the weight of column j
— notice all elements of column j
are multiplied by X**j
then they're immediately divided after running the LLL.
Alternatively we can give a solution_scale
which is essentially the inverse of weight
.
Possible extension: pass that to approximate_closest_vector
too.
Metadata
Metadata
Assignees
Labels
No labels