Find two generators for a lattice (2D)

288 Views Asked by At

I want to solve this problem, given $n$ vectors $v_1, v_2, ..., v_n$ in two dimensions, find two vectors that spans the same lattice spanned by $v_1, v_2, ..., v_n$.

For instance, if $n = 3$ and $v_1 = (494, -606), v_2 = (-346, -821), v_3 = (-592, -174)$. We can span the same lattice using the following two vectors: $(0, 1), (2, 0)$. That is, the sets of points generated by integer linear combinations of $[v_1, v_2, v_n]$ and $[(0, 1), (2, 0)]$ are the same.

All values should be integers.

1

There are 1 best solutions below

5
On

Let me see: If you can use Mathematica, all you need to do is this: start with LatticeReduce[v1,v2] Retrieve that pair of new vectors, call them w2,x2.

Next, call Lattice Reduce[ w2,x2, v3]. Call the new pair of vectors w3,x3.

Next, call Lattice Reduce[ w3,x3, v4]. Call the new pair of vectors w4,x4.

Next, call Lattice Reduce[ w4,x4, v5]. Call the new pair of vectors w5,x5.