[Paper Review] On a fast and nearly division-free algorithm for the characteristic polynomial
This paper presents an optimized, nearly division-free algorithm for computing the characteristic polynomial, determinant, and adjugate of a matrix using a baby-step giant-step variant of the Faddeev-Leverrier method. It improves asymptotic complexity to $O(n^{ ho+0.5} + n^3)$ with reduced memory usage and demonstrates through empirical evaluation that it outperforms the Berkowitz algorithm and rivals $O(n^3)$ methods in practice, especially for large $n$.
We review the Preparata-Sarwate algorithm, a simple $O(n^{3.5})$ method for computing the characteristic polynomial, determinant and adjugate of an $n imes n$ matrix using only ring operations together with exact divisions by small integers. The algorithm is a baby-step giant-step version of the more well-known Faddeev-Leverrier algorithm. We make a few comments about the algorithm and evaluate its performance empirically.
Motivation & Objective
- To present a practical and efficient variant of the Preparata-Sarwate algorithm for computing the characteristic polynomial, determinant, and adjugate of a matrix.
- To address the lack of widespread implementation and recognition of the Preparata-Sarwate algorithm despite its superior asymptotic complexity.
- To evaluate the performance of the Preparata-Sarwate algorithm empirically against other algorithms, including Berkowitz and Faddeev-Leverrier, across different rings and precision settings.
- To explore the applicability of the algorithm in high-precision arithmetic and multivariate polynomial quotient rings, where division is costly or unstable.
- To advocate for broader adoption of the Preparata-Sarwate algorithm due to its strong practical performance and theoretical advantages in division-free computation.
Proposed method
- Adapts the Preparata-Sarwate algorithm using a baby-step giant-step strategy to reduce the number of matrix multiplications from $O(n)$ to $O(n^{0.5})$.
- Introduces a memory-optimized version of the algorithm that halves the space complexity from $O(n^{2.5})$ to $O(n^{2.5})$ by reusing intermediate matrices.
- Employs exact divisions by small integers $1, 2, \ldots, n$, ensuring that all operations remain within the ring $R$ without requiring general division.
- Uses matrix powers $A^k$ computed via repeated squaring and intermediate accumulation to compute traces for coefficients of the characteristic polynomial.
- Implements the algorithm in the Arb computer algebra system using ball arithmetic to evaluate numerical stability and precision loss.
- Compares performance across multiple algorithms: Hessenberg reduction, LU factorization, QR-based eigenvalue computation, Berkowitz, and Faddeev-Leverrier variants, under controlled precision settings.
Experimental results
Research questions
- RQ1Can the Preparata-Sarwate algorithm be practically optimized and implemented in a way that makes it competitive with standard $O(n^3)$ methods in high-precision arithmetic?
- RQ2How does the performance of the Preparata-Sarwate algorithm compare to the Berkowitz and Faddeev-Leverrier algorithms in terms of speed and numerical stability across different rings and matrix sizes?
- RQ3Does the algorithm maintain its advantage in multivariate polynomial quotient rings, where division is expensive and entry growth is a concern?
- RQ4What is the observed precision loss in ball arithmetic for division-free algorithms, and how does it compare to numerically stable methods like Hessenberg reduction?
- RQ5Can the Preparata-Sarwate algorithm serve as a reliable fallback in high-precision linear algebra when standard methods fail due to zero pivots or instability?
Key findings
- The Preparata-Sarwate algorithm runs approximately 4 times slower than Hessenberg reduction in high-precision ball arithmetic but is more robust and foolproof.
- For large $n \approx 50$, the Preparata-Sarwate algorithm (Alg2) outperforms the Berkowitz algorithm and is competitive with $O(n^3)$ methods in practice.
- The algorithm exhibits $O(n^{ ho+0.5} + n^3)$ complexity, with the $n^3$ term being negligible in practice, and shows improved memory usage via a space-optimized implementation.
- In ball arithmetic, all division-free algorithms (including Preparata-Sarwate, Berkowitz, and Faddeev-Leverrier) lose $O(n)$ digits of accuracy, though LU and Hessenberg methods are more stable.
- The algorithm performs poorly in multivariate polynomial quotient rings due to rapid growth in matrix entries, where repeated multiplication by $A$ is more expensive than by $A^k$.
- Despite its theoretical advantages, the Preparata-Sarwate algorithm remains underused in practice, likely due to lack of awareness and implementation, despite being faster than Berkowitz for large $n$.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.