-
High performance SIMD modular arithmetic for polynomial evaluation
Authors:
Pierre Fortin,
Ambroise Fleury,
François Lemaire,
Michael Monagan
Abstract:
Two essential problems in Computer Algebra, namely polynomial factorization and polynomial greatest common divisor computation, can be efficiently solved thanks to multiple polynomial evaluations in two variables using modular arithmetic. In this article, we focus on the efficient computation of such polynomial evaluations on one single CPU core. We first show how to leverage SIMD computing for mo…
▽ More
Two essential problems in Computer Algebra, namely polynomial factorization and polynomial greatest common divisor computation, can be efficiently solved thanks to multiple polynomial evaluations in two variables using modular arithmetic. In this article, we focus on the efficient computation of such polynomial evaluations on one single CPU core. We first show how to leverage SIMD computing for modular arithmetic on AVX2 and AVX-512 units, using both intrinsics and OpenMP compiler directives. Then we manage to increase the operational intensity and to exploit instruction-level parallelism in order to increase the compute efficiency of these polynomial evaluations. All this results in the end to performance gains up to about 5x on AVX2 and 10x on AVX-512.
△ Less
Submitted 24 April, 2020;
originally announced April 2020.
-
Resolving zero-divisors using Hensel lifting
Authors:
John Kluesner,
Michael Monagan
Abstract:
Algorithms which compute modulo triangular sets must respect the presence of zero-divisors. We present Hensel lifting as a tool for dealing with them. We give an application: a modular algorithm for computing GCDs of univariate polynomials with coefficients modulo a radical triangular set over the rationals. Our modular algorithm naturally generalizes previous work from algebraic number theory. We…
▽ More
Algorithms which compute modulo triangular sets must respect the presence of zero-divisors. We present Hensel lifting as a tool for dealing with them. We give an application: a modular algorithm for computing GCDs of univariate polynomials with coefficients modulo a radical triangular set over the rationals. Our modular algorithm naturally generalizes previous work from algebraic number theory. We have implemented our algorithm using Maple's RECDEN package. We compare our implementation with the procedure RegularGcd in the RegularChains package.
△ Less
Submitted 9 January, 2018;
originally announced January 2018.
-
Some results on counting roots of polynomials and the Sylvester resultant
Authors:
Michael Monagan,
Baris Tuncer
Abstract:
We present two results, the first on the distribution of the roots of a polynomial over the ring of integers modulo $n$ and the second on the distribution of the roots of the Sylvester resultant of two multivariate polynomials. The second result has application to polynomial GCD computation and solving polynomial diophantine equations.
We present two results, the first on the distribution of the roots of a polynomial over the ring of integers modulo $n$ and the second on the distribution of the roots of the Sylvester resultant of two multivariate polynomials. The second result has application to polynomial GCD computation and solving polynomial diophantine equations.
△ Less
Submitted 27 September, 2016;
originally announced September 2016.
-
A Modular Algorithm for Computing Polynomial GCDs over Number Fields presented with Multiple Extensions
Authors:
Mark van Hoeij,
Michael Monagan
Abstract:
We consider the problem of computing the monic gcd of two polynomials over a number field L = Q(alpha_1,...,alpha_n). Langemyr and McCallum have already shown how Brown's modular GCD algorithm for polynomials over Q can be modified to work for Q(alpha) and subsequently, Langemyr extended the algorithm to L[x]. Encarnacion also showed how to use rational number to make the algorithm for Q(alpha) ou…
▽ More
We consider the problem of computing the monic gcd of two polynomials over a number field L = Q(alpha_1,...,alpha_n). Langemyr and McCallum have already shown how Brown's modular GCD algorithm for polynomials over Q can be modified to work for Q(alpha) and subsequently, Langemyr extended the algorithm to L[x]. Encarnacion also showed how to use rational number to make the algorithm for Q(alpha) output sensitive, that is, the number of primes used depends on the size of the integers in the gcd and not on bounds based on the input polynomials.
Our first contribution is an extension of Encarnacion's modular GCD algorithm to the case n>1, which, like Encarnacion's algorithm, is is output sensitive.
Our second contribution is a proof that it is not necessary to test if p divides the discriminant. This simplifies the algorithm; it is correct without this test.
Our third contribution is a modification to the algorithm to treat the case of reducible extensions. Such cases arise when solving systems of polynomial equations.
Our fourth contribution is an implementation of the modular GCD algorithm in Maple and in Magma. Both implementations use a recursive dense polynomial data structure for representing polynomials over number fields with multiple field extensions.
Our fifth contribution is a primitive fraction-free algorithm. This is the best non-modular approach. We present timing comparisons of the Maple and Magma implementations demonstrating various optimizations and comparing them with the monic Euclidan algorithm and our primitive fraction-free algorithm.
△ Less
Submitted 5 January, 2016;
originally announced January 2016.
-
A new edge selection heuristic for computing the Tutte polynomial of an undirected graph
Authors:
Michael Monagan
Abstract:
We present a new edge selection heuristic and vertex ordering heuristic that together enable one to compute the Tutte polynomial of much larger sparse graphs than was previously doable. As a specific example, we are able to compute the Tutte polynomial of the truncated icosahedron graph using our Maple implementation in under 4 minutes on a single CPU. This compares with a recent result of Haggard…
▽ More
We present a new edge selection heuristic and vertex ordering heuristic that together enable one to compute the Tutte polynomial of much larger sparse graphs than was previously doable. As a specific example, we are able to compute the Tutte polynomial of the truncated icosahedron graph using our Maple implementation in under 4 minutes on a single CPU. This compares with a recent result of Haggard, Pearce and Royle whose special purpose C++ software took one week on 150 computers.
△ Less
Submitted 24 September, 2012;
originally announced September 2012.