2

I wish to find the set of ordered pairs $(n,m)$ such that \begin{equation} \lVert n\vec{a} + m\vec{b} - \vec{r}\rVert\leq R\, ,\qquad\qquad(1) \end{equation} where $n$ and $m$ are integers; $\vec{a}$, $\vec{b}$, and $\vec{r}$ are given two dimensional vectors; and $R>0$ is a given real number. $\vec{a}$ and $\vec{b}$ are non-parallel. Is there some algorithm or formula for calculating this? Is this a classic problem that has a name I could search for? I believe (by squaring both sides of Eq. (1)) that this problem can be reduced to finding the solutions to a nonlinear Diophantine inequality.

This question comes from the problem in two dimensional crystallography of finding the set of lattice points which are within a given distance $R$ of a location $\vec{r}$, where $\vec{a}$ and $\vec{b}$ are the crystal's lattice vectors.

I'd also be happy to get expressions which bound the set of possible $(n,m)$, i.e. numbers $n_{min}$, $n_{max}$, $m_{min}$, and $m_{max}$ which give me ranges for $n$ and $m$ guaranteed to contain the set of solutions $(n,m)$ to equation (1).

Edited to add:

If, as suggested by @Andrei in the comments below, we write $\vec{r}$ as a linear combination of $\vec{a}$ and $\vec{b}$, \begin{equation} \vec{r} = \alpha\vec{a} + \beta\vec{b}, \end{equation} then we have \begin{equation} \lVert x\vec{a} + y\vec{b}\rVert\leq R \end{equation} where $x = n-\alpha$ and $y = m-\beta$. This defines the interior of an ellipse. But how do I actually enumerate the set of $(n,m)$ yielding $(x,y)$ that lie within the ellipse? How would I get at that set in an actual algorithm?

John Barber
  • 4,576
  • Can this be simplified with $\vec {r} = 0$ ? – z100 Jul 09 '24 at 20:03
  • The problem would certainly be simpler if $\vec{r} = 0$, but I'm interested in the case where $\vec{r}\neq 0$. – John Barber Jul 09 '24 at 20:04
  • Add it up later. 3D case is more interesting. IMHO it is a topic about Linear analysis on groups. – z100 Jul 09 '24 at 20:18
  • 1
    You can simplify the problem by writing $\vec r$ as a linear combination of vectors $\vec a$ and $\vec b$ – Andrei Jul 09 '24 at 21:33
  • @Andrei Then you'd have something like $\lVert(n-\alpha)\vec{a} + (m-\beta)\vec{b}\rVert \leq R$. What then? – John Barber Jul 09 '24 at 21:41
  • If we write this as $\lVert x\vec{a}+y\vec{b}\rVert\leq R$, where $x = n-\alpha$ and $y = m-\beta$, then the set of points $(x,y)$ solving the inequality is the interior of an ellipse. – John Barber Jul 09 '24 at 22:07
  • https://en.wikipedia.org/wiki/Lattice_problem#Closest_vector_problem_(CVP) – Will Jagy Jul 09 '24 at 23:11

0 Answers0