ArticleslgStudy

computer science

Lattice problem

Lattice problem is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Lattice problem rather than just read about it. In short: In computer science, lattice problems are a class of optimization problems related to mathematical objects called lattices. The conjectured intractability of such problems is central to the construction of secure lattice-based cryptosystems: lattice problems are an example of NP-hard problems which have been shown to be average-case hard, providing a test case for the security of cryptographic algorithms.

Lattice problem — main illustration
Lattice problem — illustration

Key takeaways

  • Lattice problem belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Lattice problem to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Lattice problem from memory before moving on to harder problems.

Reference excerpt

In computer science, lattice problems are a class of optimization problems related to mathematical objects called lattices. The conjectured intractability of such problems is central to the construction of secure lattice-based cryptosystems: lattice problems are an example of NP-hard problems which have been shown to be average-case hard, providing a test case for the security of cryptographic algorithms. In addition, some lattice problems which are worst-case hard can be used as a basis for extremely secure cryptographic schemes. The use of worst-case hardness in such schemes makes them among the very few schemes that are very likely secure even against quantum computers. For applications in such cryptosystems, lattices over vector spaces (often ℚn) or free modules (often ℤn) are generally considered. For all the problems below, assume that we are given (in addition to other more specific inputs) a basis for the vector space V and a norm N. The norm usually considered is the Euclidean norm L2. However, other norms (such as Lp) are also considered and show up in a variety of results. Throughout this article, let λ(L) denote the length of the shortest non-zero vector in the lattice L: that is,

λ(L)=minv∈L∖{𝟎}‖v‖N.

Shortest vector problem (SVP)

In the SVP, a basis of a vector space V and a norm N (often L2) are given for a lattice L and one must find the shortest non-zero vector in V, as measured by N, in L. In other words, the algorithm should output a non-zero vector v such that ⁠‖v‖N=λ(L)⁠. In the following, the size of the problem is specified by n, the dimension of the vector space V. In the γ-approximation version SVPγ, one must find a non-zero lattice vector of length at most γ⋅λ(L) for given ⁠γ≥1⁠.

Hardness results In 1998, Miklós Ajtai proved that exact SVP in the Euclidean norm is NP-hard under randomized polynomial-time reductions. Subsequent work established randomized hardness of approximation for every constant factor, as well as larger factors under stronger complexity assumptions. The corresponding problem with respect to the uniform norm is known unconditionally to be NP-hard. In 2025, Isaac Hair and Amit Sahai proved that, for every fixed p>2 and ε>0, SVP in the ℓp norm is NP-hard under deterministic polynomial-time reductions even when approximation within a factor 2(log⁡n)1−ε is permitted. A 2026 preprint by Daqing Wan proves NP-hardness of exact Euclidean SVP and of Euclidean approximation within every factor smaller than 2.

Algorithms for the Euclidean norm To solve the exact version of the SVP under the Euclidean norm, several different approaches are known, which can be split into two classes: algorithms requiring superexponential time (2ω(n)) and poly⁡(n) memory, and algorithms requiring both exponential time and space (2Θ(n)) in the lattice dimension. The former class of algorithms most notably includes lattice enumeration and random sampling reduction, while the latter includes lattice sieving, computing the Voronoi cell of the lattice, and discrete Gaussian sampling. An open problem is whether algorithms for solving exact SVP exist running in single exponential time (2O(n)) and requiring memory scaling polynomially in the lattice dimension. To solve the γ-approximation version SVPγ for γ>1 for the Euclidean norm, the best known approaches are based on using lattice basis reduction. For large ⁠γ=2Ω(n)⁠, the Lenstra–Lenstra–Lovász (LLL) algorithm can find a solution in time polynomial in the lattice dimension. For smaller values γ, the Block Korkine-Zolotarev algorithm (BKZ) is commonly used, where the input to the algorithm (the blocksize β) determines the time complexity and output quality: for large approximation factors γ, a small block size β suffices, and the algorithm terminates quickly. For small γ, larger β are needed to find sufficiently short lattice vectors, and the algorithm takes longer to find a solution. The BKZ algorithm internally uses an exact SVP algorithm as a subroutine (running in lattices of dimension at most β), and its overall complexity is closely related to the costs of these SVP calls in dimension ⁠β⁠.

GapSVP The problem GapSVPβ consists of distinguishing between the instances of SVP in which the length of the shortest vector is at most 1 or larger than ⁠β⁠, where β can be a fixed function of the dimension of the lattice ⁠n⁠. Given a basis for the lattice, the algorithm must decide whether λ(L)≤1 or ⁠λ(L)>β⁠. Like other promise problems, the algorithm is allowed to err on all other cases. Yet another version of the problem is GapSVPζ,γ for some functions ζ and γ. The input to the algorithm is a basis B and a number d. It is assured that all the vectors in the Gram–Schmidt orthogonalization are of length at least 1, and that λ(L(B))≤ζ(n) and that ⁠1≤d≤ζ(n)/γ(n)⁠, where n is the dimension. The algorithm must accept if ⁠λ(L(B))≤d⁠, and reject if ⁠λ(L(B))≥γ(n)⋅d⁠. For large ζ (i.e. ⁠ζ(n)>2n/2⁠), the problem is equivalent to GapSVPγ because a preprocessing done using the LLL algorithm makes the second condition (and hence, ⁠ζ⁠) redundant.

Closest vector problem (CVP)

In CVP, a basis of a vector space V and a metric M (often L2) are given for a lattice L, as well as a vector v in V but not necessarily in L. It is desired to find the vector in L closest to v (as measured by M). In the γ-approximation version CVPγ, one must find a lattice vector at distance at most γ.

Relationship with SVP The closest vector problem is a generalization of the shortest vector problem. It is easy to show that given an oracle for CVPγ (defined below), one can solve SVPγ by making some queries to the oracle. The naive method to find the shortest vector by calling the CVPγ oracle to find the closest vector to 0 does not work because 0 is itself a lattice vector and the algorithm could potentially output 0. The reduction from SVPγ to CVPγ is as follows: Suppose that the input to the SVPγ is the basis for lattice B=[b1,b2,…,bn]. Consider the basis Bi=[b1,…,2bi,…,bn] and let xi be the vector returned by CVPγ(Bi, bi). The claim is that the shortest vector in the set {xi−bi} is the shortest vector in the given lattice.

… excerpt ends here. Continue reading the full article.

Illustrations

Lattice problem: This is an illustration of the closest vector problem (basis vectors in blue, external vector in green, closest vector in red).
This is an illustration of the closest vector problem (basis vectors in blue, external vector in green, closest vector in red).

Worked examples

Example 1 — a first encounter with Lattice problem

Start with the simplest possible case. Write down what Lattice problem claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Lattice problem before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Lattice problem ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Lattice problem

In research
Lattice problem appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Lattice problem in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Lattice problem is common in secondary-school and first-year university syllabi. It links to neighbouring topics Computational hardness assumptions, Lattice-based cryptography, Mathematical problems, so understanding it makes those chapters shorter.
In everyday life
Look for Lattice problem outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Lattice problem” →

How to study Lattice problem in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Lattice problem means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Lattice problem out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Lattice problem in simple terms?

In computer science, lattice problems are a class of optimization problems related to mathematical objects called lattices. The conjectured intractability of such problems is central to the construction of secure lattice-based cryptosystems: lattice problems are an example of NP-hard problems which…

Why does Lattice problem matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Lattice problem?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Lattice problem.

Tags

  • Computational hardness assumptions
  • Lattice-based cryptography
  • Mathematical problems
  • Post-quantum cryptography

Keep exploring