1
$\begingroup$

Given are irrational real numbers $r,s\in (0,1)$ and a positive integer $l$

Given integers $m,n$ with $1\le m\le l$ what is the minimal possible value of $|mr-n-s|$ ?

The pair $(m/n)$ can be considered to be the best-approximation of $s$.

How can I determine the numbers $m$ and $n$ ? Are they always unique ?

Example : $$r=frac(\pi)=\pi-3$$ $$s=frac(e)=e-2$$ $$l=1000$$

Brute force gives $m=111$ , $n=15$ , so $frac(111r)$ is the best approximation of $s$. The error is $0.0015$.

With increasing $l$, the approximations will get better and better because $frac(mr)$ , $m$ running over the positive integers is dense in $[0,1]$ (In fact, even equidistributed modulo $1$). Given $s$, we are looking for the $m$, such that $frac(mr)$ is as close to $s$ as possible, given the treash-hold $l$.

The convergents of the continued fraction of $x$, $\frac{p_j}{q_j}$, are best-approxiamtions of $x$ in the sense that they minimize $b\cdot x-a$ , when $b\le q_j$ holds. But I cannot apply this because a convergent of $r$ would minimize $|mr-n|$ instead of $|mr-n-s|$. Does anyone know a trick ?

0 Answers 0