I'm trying to write a C++ program to solve the shortest vector problem. The program is given a basis of a vector space V and needs to find the shortest non-zero vector in V.

Right now I'm using the Ajtai-Kumar-Sivakumar (AKS) algorithm described here on slides 12 and 34. The problem is the time/memory complexity: for a 3-dimensional input lattice I have to generate over 20 million random numbers. Then I have to remove specific values from another absolutely massive set, which also seems very computationally expensive.

Does anyone know any more efficient algorithms for solving this problem (preferably using LLL reduction) which could feasibly be implemented in C++, or is AKS as fast as it gets?


1 Answer 1


Although asymptotically strong, the AKS sieving algorithms and its generalisations should only be used for large dimensions. For smaller dimensions there are methods for constructing optimal bases in dimensions 2-4 (a variation on Euclid's algorithm for $d=2$, the paper Low-Dimensional Lattice Basis Reduction Revisited by Nguyen and Stehle covers the $d=3$ $d=4$ cases).

For other small examples, an initial reduction using LLL or block Kolkin-Zolotarev (BKZ) followed by an application of Schnorr-Euchner reduction (essential a call of ENUM(1,m) using the ENUM function described in section 6 of their paper Lattice Basis Reduction: Improved Practical Algorithms and Solving Subset Sum Problems). A sketch log-asymptotic complexity of enumeration is $cm\log m$ for a small constant $c$ depending on the variant of lattice basis reduction used whereas AKS sieving variants have log-asymptotic complexity $c'm$ for a larger constant $c'$. For small $m$ the effect of the constants dominates.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.