Univariate Polynomial Real Root Isolation: Continued Fractions Revisited

Elias P. Tsigaridas, Ioannis Z. Emiris

Abstract

Real root isolation—the process of finding disjoint intervals that each contain exactly one real root of a polynomial—is a fundamental operation in computer algebra, computational geometry, and robotics. While methods such as Sturm sequences and Descartes’ subdivision have long possessed well-established theoretical bounds, the Continued Fraction (CF) method has historically exhibited a curious discrepancy: it often outperforms other methods in practice despite having a significantly worse theoretical complexity bound ($O_B(d^5\tau^3)$). This paper provides a major theoretical and practical update to the CF algorithm, proving that its expected bit-complexity matches the current record of $O_B(d^4\tau^2)$, thereby reconciling its observed efficiency with rigorous analysis.

Introduction

The isolation of real roots for univariate integer polynomials is a cornerstone of exact scientific computing. For decades, the Continued Fraction (CF) algorithm, based on Vincent’s Theorem, has been a popular choice for implementers due to its speed. However, the lack of a tight complexity bound made it difficult to justify its use over Descartes-based subdivision methods in a purely theoretical context. This research sets out to close the gap between the algorithm's practical performance and its mathematical foundation, providing both a refined complexity analysis and a high-performance C++ implementation.

Methodology

The CF Algorithm and Vincent’s Theorem

The CF algorithm isolates roots by computing the continued fraction expansion of the real roots. It relies on Vincent’s Theorem, which states that for any square-free polynomial, a sequence of Möbius transformations will eventually produce a polynomial with either zero or one sign variation in its coefficients. According to Descartes’ Rule of Signs, such a state indicates the presence of exactly zero or one real root in the interval $(0, \infty)$.

Theoretical Innovations

The authors introduce several key refinements to the analysis of the CF algorithm:

  1. Improved Step Bounding: Utilizing a new theorem (Theorem 6) grounded in Mahler’s measure and discriminant analysis, the authors significantly tighten the bound on the number of transformations required to isolate all roots.
  2. Average-Case Analysis via Gauss-Kuzmin: To address the "coefficient explosion" problem—where polynomial coefficients grow exponentially during transformations—the authors employ the Gauss-Kuzmin distribution. By treating the expected bitsize of partial quotients as a constant, they prove that the expected bitsize growth is manageable, leading to the improved $O_B(d^4\tau^2)$ complexity.
  3. Algorithmic Optimizations: The implementation leverages fast Taylor shifts ($X \to X + 1$) and homothetic transformations ($X \to bX$) to accelerate the transformation process. The use of the GNU Multiple Precision (GMP) library is central to handling the large integers generated during these steps.

Experimental Results

The authors evaluated their implementation (integrated into the SYNAPS library) against two primary competitors: rs (a state-of-the-art Descartes-based solver) and aberth (a numerical solver). The testing suite included several challenging polynomial classes:

  • Ill-conditioned Benchmarks: Laguerre, Chebyshev (1st and 2nd kind), and Wilkinson polynomials.
  • Mignotte Polynomials: These are specifically engineered to have roots in extremely close proximity, a scenario that typically causes subdivision-based methods to struggle.
  • Real-World Data: A degree-184 polynomial derived from the Voronoi diagram of ellipses.

Performance Highlights

  • The Complexity Match: The proof that CF’s expected complexity is $O_B(d^4\tau^2)$ (where $d$ is degree and $ au$ is bitsize) places it on equal theoretical footing with the most efficient known exact methods.
  • Mignotte Polynomial Superiority: The most dramatic result occurred with a Mignotte polynomial of degree 400. The CF algorithm isolated the roots in just 0.42 seconds, whereas the rs solver required over 7,328 seconds (more than two hours). This is because CF "zooms in" on roots using large partial quotients, effectively bypassing thousands of bisection steps.
  • General Efficiency: The CF implementation was consistently faster than rs on nearly all ill-conditioned benchmarks. In the Voronoi diagram case, CF isolated roots in 0.12s, outperforming both rs (0.3s) and the numerical aberth solver (1.7s).

Discussion and Future Work

The findings demonstrate that the Continued Fraction method is not merely a practical heuristic but a theoretically robust algorithm that excels in "hard" cases where roots are clustered. The ability of CF to skip many bisection steps through the properties of continued fractions gives it a distinct advantage over traditional subdivision methods.

However, some limitations remain. The $O_B(d^4\tau^2)$ bound is an expected complexity based on the distribution of continued fractions; a purely deterministic worst-case bound of the same magnitude remains an open challenge. Additionally, the authors suggest that incorporating semi-numerical techniques, such as interval arithmetic (currently utilized by the rs solver), could further enhance the CF algorithm's speed by avoiding exact integer arithmetic when lower precision suffices. Future research will also focus on making the handling of non-square-free polynomials as robust as the current square-free implementation.

Summary updated

BibTeX
@inproceedings{tsigaridas2006univariate,
  author = {Elias P. Tsigaridas and Ioannis Z. Emiris},
  title = {{Univariate Polynomial Real Root Isolation: Continued Fractions Revisited}},
  booktitle = {ESA},
  year = {2006},
  url = {https://openreview.net/forum?id=pvJCNb8I8ld},
}
Figure