How to compute $x$ and $y$

69 Views Asked by At

How can one find in an efficient way $x,y \in \mathbb{Z}$ with max$\{|x|,|y|\} > 0$ as small as possible such that $\mid \pi x + e y \mid < 10^{-4}$ ?

I have reduced the following lattice basis:

\begin{pmatrix} 1 & 0 \\ 10^4\pi & 10^4e \end{pmatrix}

but is this the right one? And how can I use the reduced basis?

1

There are 1 best solutions below

3
On BEST ANSWER

You are looking for $|1 -\frac yx\frac e\pi| \lt \frac 1{\pi x} 10^{-4}$. Look at the continued fraction or Farey sequence converging to $\frac e\pi$. Following the Farey sequence (start with $\frac 01$ and $\frac 11$, add numerators and denominators, replace one endpoint with the new fraction. Using Alpha, $\mid 13453 \pi - 15548 e \mid$ is just under $10^{-4}$