0

Setup: Let ei be an orthogonal basis for n-dimensional Euclidean space, but suppose that ei has irrational (L1) norm. Let L be the set of points obtained by taking linear combinations of the ei with coefficients in the natural numbers (including zero). Now order the points in L first by their L1-norm and then lexicographically.

Question: Is there an efficient algorithm for producing the points in L in increasing order up to some pre-defined bound? Note that I do not want to produce the points and then sort them, rather I want to walk the lattice in order.

Observation: This is easy to do if the ei are an orthonormal basis. For instance, this problem is solved here. In principle something similar would work here, however determining the radii to iterate over is almost as hard as solving the enumeration problem, so it isn't very useful.

Paul
  • 503
  • 4
  • 15

1 Answers1

0

How about this:

Let L₁ and L₂ be lists of vectors, where L₁ is the list of visited/processed lattice vectors and L₂ is a list of lists of vectors that will be visited next.

  1. Set L₁={ } and L₂ = {[0]}, where 0 is the zero-vector.
  2. Let v be the smallest vector of the first list in L₂.
  3. Visit/process the vector v.
  4. Add the list L={v+e₁,...,v+en} to L₂, such that the lists are sorted by their smallest element. Only generate v+ei as long as its norm is smaller than your predefined bound.
  5. Insert v at the end of L₁ and remove it from the front of the first list L₂.
  6. If the first list is now empty, remove it from L₂. If not, move it to the correct place.
  7. If L₂ is not empty, goto 2.

This algorithm requires the ei to be sorted by their norm from small to big.

This algorithm adds at most n vectors to L₂ per round. Let B your predefined upper bound, then there are at most nk-1 vectors you are going to visit, where k = 1+B/||e₁||. The first ca. nk' rounds, the list will be of size n, where k' = B/||en||. So in total you have to store less than N = nk' + (nk-1)/(nk'+1) lists. you can generate a new list in O(n) and add place it in L₂ in O(log N) (binary search the correct place and link insert it there).

So the overall complexity would be something like O(N⋅n⋅log N), but notice that N is about the number of vectors you are looking for.

Notice: most likely there is a faster algorithm, but this is something you can try.

AbcAeffchen
  • 14,400
  • 15
  • 47
  • 66