Ratios of integers in Bezout's Identity

75 Views Asked by At

Bezout's Identity is a classic of elementary number theory: let $m,n\in\mathbb{N}^+$ with $\gcd(m,n)=1$. Then there are $a,b\in\mathbb{Z}$ with $$ am+bn=1 $$With no loss of generality we can assume $m>n$ and take $a,b\in\mathbb{N}$ with $a<b$, and rewrite $$ |am-bn|=1 $$My question is: can the minimal values of $a$ and $b$ be predicted by looking at the ratio $m/n$? My guess is that $b/a$ is in some sense the best approximation to $m/n$, maybe with the lowest possible value of $a$, or maybe $a$ is chosen such that $|m/n-b/a| \le a^{-p}$ for some power $p$.

Ex: $m=47,n=21$. Now $47/21 \approx 2.2381$: clearly $9/4=2.25$ is the 'closest' to this starting with denominator equal to $1$ and increasing, and indeed we have $a=4, b=9$ with $|4\cdot 47-9\cdot 21|=1$.

Ex: $m=101,n=58$. $101/58\approx 1.7414$; $a=4$ and $b=7$ with $b/a=1.75$ almost works with a RHS of $2$, but the actual pair is $a=27,b=47$ with $b/a\approx 1.7407$.

In summary: if we know $m/n$, can we use it to find $b/a$, and if so, what is the 'threshold' or degree of accuracy?