# Lattice Demonstration

The algorithm used for the lattice basis reduction is the Gaussian (actually Lagrange's) basis reduction. This algorithm solves SVP completely for 2-dimensional lattices in quadratic time.

We also note that the algorithm can produce a basis with angle between the vectors be between 60 and 120 degrees, this means that the new basis is quite orthogonal.

The Babai's Algorithm tries to solve CVP by first writing the non-lattice point as a linear combination of the basis, then just round the coefficients to the nearest vector. In that way the algorithm will only output the lattice points "near" the non-lattice points.

The blue shaded area represents the region in which Babai's algorithm will choose the white point as the "closest" point.