111
Fast Rational Search via Stern-Brocot Tree
arXiv:2512.18036v1 Announce Type: new
Abstract: We revisit the problem of rational search: given an unknown rational number $\alpha = \frac{a}{b} \in (0,1)$ with $b \leq n$, the goal is to identify $\alpha$ using comparison queries of the form ``$\beta \leq \alpha$?''. The problem has been studied several decades ago and optimal query algorithms are known. We present a new algorithm for rational search based on a compressed traversal of the Stern--Brocot tree, which appeared to have been overlooked in the literature. This approach also naturally extends to two related problems that, to the best of our knowledge, have not been previously addressed: (i) unbounded rational search, where the bound $n$ is unknown, and (ii) computing the best (in a precise sense) rational approximation of an unknown real number using only comparison queries.
Abstract: We revisit the problem of rational search: given an unknown rational number $\alpha = \frac{a}{b} \in (0,1)$ with $b \leq n$, the goal is to identify $\alpha$ using comparison queries of the form ``$\beta \leq \alpha$?''. The problem has been studied several decades ago and optimal query algorithms are known. We present a new algorithm for rational search based on a compressed traversal of the Stern--Brocot tree, which appeared to have been overlooked in the literature. This approach also naturally extends to two related problems that, to the best of our knowledge, have not been previously addressed: (i) unbounded rational search, where the bound $n$ is unknown, and (ii) computing the best (in a precise sense) rational approximation of an unknown real number using only comparison queries.