I have an algorithm to solve this problem * given two valid simplifying fractions $\dfrac{a}{b}$ and $\dfrac{c}{d},$ each transformation is adding both $a$ and $b$ by $+1,$ simplifying it, again and again until we meet $\dfrac{c}{d}.$ Count the number of steps used, $0$ if none" so that $\dfrac{a}{b}, \dfrac{c}{d}< 1$ and $0< a< b\leq 10^{5}, 0< c< d\leq 10^{5}.$ Easily, I see that the steps only continue if $ad< bc.$ Because we have that $\dfrac{a}{b}< \dfrac{a+ 1}{b+ 1}\overset{\div gcd(a, b)}{\rightarrow}\dfrac{a_{new}}{b_{new}}\rightarrow \dfrac{c}{d}.$ That sounds good.
But my test is not perfect, I wonder if there exist any $c, d$ so that $\dfrac{a_{new}}{b_{new}}\rightarrow \dfrac{c}{d}$ but never reaches $\dfrac{c}{d}.$ I need to your helps.
xso that $\frac{a}{b} >= \frac{c}{d}$ – Thomas Sablik Dec 20 '20 at 08:56