Nearest Lattice Point - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Home : Support : Online Help : Mathematics : Number Theory : Nearest Lattice Point

NumberTheory

 NearestLatticePoint
 solution to the nearby lattice point problem

 Calling Sequence NearestLatticePoint(B, v)

Parameters

 B - list of lists or Matrix of real numbers; must be square v - list or Vector of real numbers; the number of elements must equal the number of rows of B

Description

 • The NearestLatticePoint function returns a $w$ such that there exists a constant $C$ that depends only on the dimension of the lattice with basis B such that for every point $u$ in the lattice with basis B we have

$\left|w-v\right|\le C\left|u-v\right|$

 • If B is a list of lists, then each inner list is interpreted as a basis vector.
 • If B is a Matrix, then each row is interpreted as a basis vector.

Examples

 > $\mathrm{with}\left(\mathrm{NumberTheory}\right):$
 > $B≔\left[\left[{2}^{\frac{1}{3}},0,0\right],\left[\mathrm{exp}\left(2\right),1,0\right],\left[0,\mathrm{\pi }\cdot 100,1\right]\right]:$
 > $v≔\left[7.01,8.01,\mathrm{\gamma }\right]:$
 > $\mathrm{NearestLatticePoint}\left(B,v\right)$
 $\left[{-36}{,}{7}{,}{0}\right]$ (1)
 > $B≔\mathrm{Matrix}\left(\left[\left[-\frac{127230625}{746351104},1,0\right],\left[\frac{90325}{71691},0,0\right],\left[-\frac{726529225}{1119526656},\frac{477}{2995},1\right]\right]\right):$
 > $v≔\mathrm{Vector}\left(\left[71.01,18.01,{\mathrm{\pi }}^{4}\right]\right):$
 > $\mathrm{NearestLatticePoint}\left(B,v\right)$
 $\left[{2}{,}{107}{,}{97}\right]$ (2)

Compatibility

 • The NumberTheory[NearestLatticePoint] command was introduced in Maple 2016.
 • For more information on Maple 2016 changes, see Updates in Maple 2016.