1

Between the numbers 2.3 and 2.8, the fraction $\frac52$ exists, and it is the fraction between these bounds that has the smallest denominator.

What algorithm can be applied to always find this fraction given two bounds? For example between 3.141 and 3.145 the answer should be $\frac{22}7$ (as far as I know)

1 Answers1

2

An easy way to show that each fraction in some interval $I$ has denominator at least so-and-so, is to exhibit suitable fractions $\frac ab$, $\frac cd$ with $I\subseteq [\frac cd,\frac ab]$ and $ad-bc=1$. Then for $\frac xy\in I$ (all denominators $b,d,y$ are of course positive integers!), we have $$0< \frac xy-\frac cd=\frac{dx-cy}{yd}$$ $$0< \frac ab-\frac xy=\frac{ay-bx}{yb}$$ i.e., the numerators are positive integers, $$dx-cy\ge1,\quad ay-bx\ge 1$$ and can combine this into $$y=(ad-bc)y=b(dx-cy)+d(ay-bx)\ge b+d.$$

In your specific example, this works with $\frac cd=\frac31\le 3.141$ and $3.145\le \frac ab=\frac{19}{6}$ (note that $19\cdot 1-3\cdot 6=1$).