MathOverflow is a question and answer site for professional mathematicians. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Consider finite piece of lattice i.e. points of the form m*h1 + n*h2, for 0<m,n<N h1, h2 -some vectors. Consider some point "P" on the plane. How to find (m,n) such that m*h1 + n*h2 is closest to "P" ? I mean what is the simplest method ? Of course we can use brute force search since finite set of points, but may be there is elegant solution ?

The problem is that "lattice reduction" may bring us out the finite set of points...

The problem may be also reformulated like: minimize in int "k" f(k)= (x - (k*b mod a))^2 + (y-k*h)^2 , for given a,b,h,x,y (which may be assumed integers)

the first term is jumping in "k" because of mod a and this a problem...

share|cite|improve this question
As long as this was still up I put a few backticks – Aaron Meyerowitz Apr 23 '11 at 6:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.