2
$\begingroup$

There are several algorithms for lattice reductions in $n$-dimensions, LLL, etc. Here the lattice in question is in ${\mathbb R}^n$ and the basis vectors $b_1, \ldots, b_n$ are usually assumed to be either in ${\mathbb Z}^n$ or ${\mathbb Q}^n$.

If I am only interested in $n=3$ but the basis vectors are in ${\mathbb R}^3$ and not in ${\mathbb Z}^3$ or ${\mathbb Q}^3$, what algorithms are available? The original LLL apparently doesn't work because we are not in ${\mathbb Q}^3$ and for instance

https://link.springer.com/chapter/10.1007/3-540-44670-2_13

doesn't work either, because there the basis vectors should be in ${\mathbb Z}^3$.

As a practical matter, Mathematica also requires the basis vectors to be in ${\mathbb Z}^3$.

Why is it that non-rational or non-integer basis vectors are treated much less? Why is the general case different or more difficult?

The paper https://perso.ens-lyon.fr/damien.stehle/downloads/lowdim-final.pdf apparently deals with $n=3$ but I couldn't decipher the algorithm in a simple form that would work with ${\mathbb R}^3$.

The eventual goal is the SVP of the given lattice.

$\endgroup$
3
  • $\begingroup$ In the interest of keeping the question self-contained, it would be helpful to cite the relevant sections/theorems of the long paper at your last link, especially if the answer is indeed buried in there. $\endgroup$ Commented Jun 3 at 15:58
  • 1
    $\begingroup$ The problem is that the entire paper is about low dimensions, $d < 5$, some theorems are for all $d$, some of them are for $d=3,4$ and some are for $d=3$ only. It's very scattered across the paper. $\endgroup$ Commented Jun 3 at 20:50
  • $\begingroup$ I recently asked Gemini to write some Pari/gp code to implement the algorithms in the Stehle and Nguyen paper you reference. Although I never got any useful code (ymmv), the exercise helped in deciphering the algorithms. Perhaps try ChatGPT? $\endgroup$ Commented Aug 11 at 22:50

1 Answer 1

4
$\begingroup$

Semaev's paper A 3-Dimensional Lattice Reduction Algorithm, linked in the question, actually does work when the basis vectors are in $\mathbb{R}^3$; the algorithm does not require integer vectors. The same holds for LLL: you can run the algorithm just fine for vectors in $\mathbb{R}^n$. In fact there is a lot of work done in this direction, adapting LLL to work better with lattices in $\mathbb{R}^n$: see for instance these articles on Floating point LLL by Stehlé and by Nguyen-Stehlé, and the Github repository for the implementation fplll.

All that said, there are a few important reasons why it's common to restrict to lattices in $\mathbb{Q}^n$ or $\mathbb{Z}^n$:

  • Runtime analysis. Bounding the runtime often works by showing that some positive integer quantity decreases at each step of the algorithm, and therefore it must run out in a predictable number of steps. It's harder to make this sort of descent argument work if you replace this quantity with a positive real number: this measured quantity could decrease forever without ever running out. In practice, this means the algorithm may run very quickly for integer basis vectors, but could take significantly longer for real basis vectors of a similar size. (Semaev restricts to integer vectors in his runtime analysis for this exact reason.)
  • Error propagation. Computing with arbitrary real numbers can't be done exactly. Whether you use floating point arithmetic, interval arithmetic, or some other implementation of real number arithmetic, as you run the algorithm, the quantities you compute will be less and less precise. (See the Wikipedia article on Floating-point error mitigation for a brief intro to how tricky it can be to manage these errors.) With integers/rationals, on the other hand, the operations are all exact.
  • Every lattice is "essentially" an integer lattice. If you have some lattice in $\mathbb{R}^n$, you can't store all infinitely many decimal digits of the vector components anyways, so in practice you might just store, say, the first $20$ digits of each component of each vector. But this means your vectors are actually in $\mathbb{Q}^n$. And if you scale the lattice up by $10^{20}$, the scaled vectors are in $\mathbb{Z}^n$. So you may as well just use the integer algorithm on your new integer lattice, and then scale down the result when you're done. This is what's usually done in practice: instead of using real number arithmetic, where you have to work a bit harder to deal with the issues mentioned above around runtime and error accumulation, it's often much more straightforward to just approximate your lattice by a rational one and apply the more predictable error-free algorithms (though some care needs to be taken with how the rounding is done, especially as the dimension $n$ grows). See the Application section of the LLL Wikipedia page for example, where they define basis vectors using the golden ratio rounded to the nearest millionth.
$\endgroup$

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.