FLINT3.7.0-dev
Algorithm

Greatest common divisors

Cost
Brown: polynomial in the dense sizes ∏i(di+1)\prod_i (d_i + 1) of the inputs and the coefficient size. Zippel and Hu–Monagan: polynomial in the number of terms of the GCD and cofactors, the number of variables, the degrees and the coefficient size, for inputs without unlucky evaluations. Hensel lifting: like dense multivariate Hensel lifting of two factors.

Z[x0,…,xn−1]\mathbb{Z}[x_0, \ldots, x_{n-1}] is a unique factorisation domain, so two polynomials AA, BB have a greatest common divisor GG, unique up to sign; FLINT returns the one with positive leading coefficient, and also the cofactors Aˉ=A/G\bar A = A/G and Bˉ=B/G\bar B = B/G if requested. Euclid's algorithm with pseudo-remainders works in principle, but the coefficients of the intermediate remainders grow and their supports fill up even when GG and the cofactors are small and sparse. All competitive algorithms are therefore modular: they compute images of GG modulo primes and at evaluation points, where the problem is univariate or bivariate over a finite field, and reconstruct GG from these images [Bro1971; GCL1992, Ch. 7; GG2003, §6]. The difficulty is to know the shape of GG in advance or to detect the images that do not reflect it.

The algorithms below are those used for fmpz_mpoly (and through it fmpq_mpoly); the function-level description, with an example, is Greatest common divisors. The algorithms over finite fields are the same inside, with the additional problem that a small field may not have enough evaluation points, which is treated in GCDs over small finite fields. The reconstruction of sparse polynomials from values is described in Sparse interpolation and the lifting of factorisations on Multivariate Hensel lifting. There is no generic multivariate GCD in gr_mpoly; the gr contexts of these modules call the specialised functions.

Contents and normalisation#

Write R=Z[x1,…,xn−1]R = \mathbb{Z}[x_1, \ldots, x_{n-1}], so that A∈R[x0]A \in R[x_0]. The content cont⁡x0(A)∈R\operatorname{cont}_{x_0}(A) \in R is the GCD of the coefficients of AA as a polynomial in x0x_0, and AA is primitive if this content is 1. By Gauss's lemma products of primitive polynomials are primitive, so

gcd⁡(A,B)=gcd⁡(cont⁡x0A,cont⁡x0B)⋅gcd⁡(pp⁡x0A,pp⁡x0B),\gcd(A, B) = \gcd(\operatorname{cont}_{x_0} A, \operatorname{cont}_{x_0} B) \cdot \gcd(\operatorname{pp}_{x_0} A, \operatorname{pp}_{x_0} B),

and the algorithms below assume primitive inputs, computing contents by recursive GCDs in fewer variables (fmpz_mpolyl_content). For an integer content this is the usual gcd⁡(cont⁡(A),cont⁡(B))\gcd(\operatorname{cont}(A), \operatorname{cont}(B)) in Z\mathbb{Z}.

Lemma 1 (Leading coefficient). Let AA, BB be primitive with respect to x0x_0 and G=gcd⁡(A,B)G = \gcd(A, B). Then lc⁡x0(G)\operatorname{lc}_{x_0}(G) divides γ=gcd⁡(lc⁡x0(A),lc⁡x0(B))∈R\gamma = \gcd(\operatorname{lc}_{x_0}(A), \operatorname{lc}_{x_0}(B)) \in R, and G~=(γ/lc⁡x0(G)) G\tilde G = (\gamma / \operatorname{lc}_{x_0}(G)) \, G is the unique multiple of GG by an element of RR with leading coefficient γ\gamma. It satisfies G~Aˉ=γA\tilde G \bar A = \gamma A and G~Bˉ=γB\tilde G \bar B = \gamma B for Aˉ=A/G\bar A = A/G, Bˉ=B/G\bar B = B/G.

Proof. G∣AG \mid A gives lc⁡(G)∣lc⁡(A)\operatorname{lc}(G) \mid \operatorname{lc}(A), and similarly for BB, so lc⁡(G)∣γ\operatorname{lc}(G) \mid \gamma. Multiplying GAˉ=AG \bar A = A by γ/lc⁡(G)∈R\gamma / \operatorname{lc}(G) \in R gives G~Aˉ=γA\tilde G \bar A = \gamma A, and similarly for BB. Two multiples of GG by elements of RR with the same leading coefficient are equal, since RR is a domain.

The images of G~\tilde G modulo a prime or at an evaluation point are determined up to the normalisation of the leading coefficient, which is known: this is how images computed independently are made consistent before they are combined. At the end, GG is the primitive part of G~\tilde G.

The same reasoning applies with several main variables, which gives a common frame for the algorithms below [Sch-mpoly]. View AA and BB in R′[xm+1,…,xn−1]R'[x_{m+1}, \ldots, x_{n-1}] with R′=D[x0,…,xm]R' = D[x_0, \ldots, x_m], make them primitive over D[xm+1,…]D[x_{m+1}, \ldots], compute GCDs in m+1m + 1 variables of images at evaluation points of the other variables, impose the image of γ=gcd⁡(lc⁡(A),lc⁡(B))\gamma = \gcd(\operatorname{lc}(A), \operatorname{lc}(B)) (leading coefficients with respect to x0,…,xmx_0, \ldots, x_m) as their leading coefficient, and interpolate. If the primitive part of the interpolated polynomial divides AA and BB, it is the GCD. Brown's algorithm takes m=n−2m = n - 2, with dense interpolation in the last variable and recursion down to the Euclidean algorithm; Zippel's algorithm takes m=0m = 0, and the algorithm of Hu and Monagan m=1m = 1, both with sparse interpolation.

Easy cases#

Before any modular computation, fmpz_mpoly_gcd removes as much structure as possible; the list of steps is described in Easy cases. They rest on three facts.

  • Monomials: the GCD of the monomial contents (term-wise minima of the exponents) can be split off, and gcd⁡(cxe,B)\gcd(c x^e, B) is gcd⁡(c,cont⁡(B))⋅min⁡(xe,mcont⁡(B))\gcd(c, \operatorname{cont}(B)) \cdot \min(x^e, \operatorname{mcont}(B)).
  • Deflation: by Lemma 4 of Monomial orderings and exponent packing, exponents can be divided by common strides without changing the GCD, which reduces degrees, and inputs can then be repacked into one word.
  • Missing variables: if xvx_v occurs in AA but not in BB, then gcd⁡(A,B)=gcd⁡(cont⁡xvA,B)\gcd(A, B) = \gcd(\operatorname{cont}_{x_v} A, B), because every divisor of BB is free of xvx_v and divides AA if and only if it divides all coefficients of AA with respect to xvx_v.

With one common variable the GCD is univariate (fmpz_poly_gcd, see GCDs of polynomials over Z), and when one input is a monomial times a univariate polynomial of degree at most 100 in some variable, the GCD is computed with the coefficients of the other input with respect to the remaining variables.

Degree bounds#

Lemma 2 (Degrees of images). Let π\pi be a ring homomorphism from Z[x0,…,xn−1]\mathbb{Z}[x_0, \ldots, x_{n-1}] to Fp[xv]\mathbb{F}_p[x_v] that reduces modulo pp and evaluates all variables except xvx_v, and assume deg⁡xvπ(A)=deg⁡xvA\deg_{x_v} \pi(A) = \deg_{x_v} A. Then π(G)\pi(G) divides gcd⁡(π(A),π(B))\gcd(\pi(A), \pi(B)) and deg⁡xvG≤deg⁡gcd⁡(π(A),π(B))\deg_{x_v} G \le \deg \gcd(\pi(A), \pi(B)). Equality holds unless π\pi maps a certain nonzero subresultant of A/GA/G and B/GB/G (with respect to xvx_v) to zero.

Proof. π(A)=π(G)π(Aˉ)\pi(A) = \pi(G) \pi(\bar A) and similarly for BB, so π(G)\pi(G) divides both images. Since lc⁡xv(G)\operatorname{lc}_{x_v}(G) divides lc⁡xv(A)\operatorname{lc}_{x_v}(A), whose image is nonzero, deg⁡π(G)=deg⁡xvG\deg \pi(G) = \deg_{x_v} G. The images π(Aˉ)\pi(\bar A) and π(Bˉ)\pi(\bar B) are coprime unless their resultant vanishes, and the resultant of the images is the image of the resultant when the leading coefficients survive; the general statement with subresultants is in [GG2003, §6.7].

mpoly_gcd_info_set_estimates uses this with a random 63-bit prime and random evaluation points, for each variable in turn: the degrees of the univariate GCDs are upper bounds for the degrees of GG (exactly the degrees with high probability), and the numbers of their nonzero terms estimate the term counts of GG. If all bounds are zero, GG is the GCD of the contents; if they equal the degrees of AA (or BB), the code tests whether A∣BA \mid B (or B∣AB \mid A) by exact division. The estimates then feed the cost model of Choosing an algorithm.

Brown's algorithm#

Brown's algorithm [Bro1971] computes images of G~\tilde G, Aˉ\bar A and Bˉ\bar B modulo primes pp and reconstructs them by the Chinese remainder theorem. Modulo pp it recurses on the variables: the last variable is evaluated at points of Fp\mathbb{F}_p, the GCDs of the images in one variable fewer are computed recursively, normalised to the image of the leading coefficient γ\gamma, and interpolated (nmod_mpolyn_gcd_brown_smprime, described in GCDs over small finite fields). Over Z\mathbb{Z}:

Algorithm 1: Brown's algorithm over the integers

Input: nonzero A,B∈Z[x0,…,xn−1]A, B \in \mathbb{Z}[x_0, \ldots, x_{n-1}] with their integer contents removed (their GCD is multiplied back at the end); γ=gcd⁡(lc⁡(A),lc⁡(B))∈Z\gamma = \gcd(\operatorname{lc}(A), \operatorname{lc}(B)) \in \mathbb{Z} for the leading coefficients in lex order, which are integers. Output: GG, Aˉ\bar A, Bˉ\bar B.

  1. Set β=2γmax⁡(∥A∥∞,∥B∥∞)\beta = 2 \gamma \max(\|A\|_\infty, \|B\|_\infty) and m=1m = 1.
  2. Take the next prime p>263p > 2^{63} not dividing γ\gamma. Compute gp=gcd⁡(A mod p,B mod p)g_p = \gcd(A \bmod p, B \bmod p) and the cofactors over Fp\mathbb{F}_p, scaled so that lc⁡(gp)=γ mod p\operatorname{lc}(g_p) = \gamma \bmod p. If gp=1g_p = 1, return G=1G = 1.
  3. Compare the leading monomial of gpg_p with that of the current HH: if larger, discard pp (unlucky) and go to 2; if smaller, discard all previous primes and set m=1m = 1.
  4. Combine H≡gpH \equiv g_p, AˉH≡aˉp\bar A_H \equiv \bar a_p, BˉH≡bˉp\bar B_H \equiv \bar b_p modulo mpmp with symmetric remainders, and set m←mpm \gets mp.
  5. If m≤βm \le \beta, go to 2.
  6. If 2min⁡(∥H∥∞∥AˉH∥1,∥H∥1∥AˉH∥∞)<m2 \min(\|H\|_\infty \|\bar A_H\|_1, \|H\|_1 \|\bar A_H\|_\infty) < m and the same holds for BˉH\bar B_H, return G=pp⁡(H)G = \operatorname{pp}(H), Aˉ=AˉH⋅cont⁡(H)/γ\bar A = \bar A_H \cdot \operatorname{cont}(H)/\gamma, and similarly Bˉ\bar B. Otherwise go to 2.

Theorem 3 (Correctness of Brown's algorithm). If Algorithm 1 returns, its output is correct, and it returns after finitely many primes.

Proof. Each image satisfies gpaˉp=γA mod pg_p \bar a_p = \gamma A \bmod p, and so does every combination: HAˉH≡γA(modm)H \bar A_H \equiv \gamma A \pmod m. The coefficients of the product HAˉHH \bar A_H are bounded in absolute value by min⁡(∥H∥∞∥AˉH∥1,∥H∥1∥AˉH∥∞)\min(\|H\|_\infty \|\bar A_H\|_1, \|H\|_1 \|\bar A_H\|_\infty), since each coefficient is a sum of products hiajh_i a_j in which every hih_i, and every aja_j, occurs at most once. By the test of step 6 these are less than m/2m/2, and those of γA\gamma A are less than m/2m/2 by step 5. Two polynomials with coefficients in (−m/2,m/2)(-m/2, m/2) that are congruent modulo mm are equal, so HAˉH=γAH \bar A_H = \gamma A, and similarly HBˉH=γBH \bar B_H = \gamma B. Hence HH divides γA\gamma A and γB\gamma B, its primitive part divides AA and BB (Gauss's lemma), and so divides GG. Conversely, all images used have leading monomial at most that of GG by Lemma 2, so the leading monomial of HH is that of GG, and a divisor of GG with the same leading monomial and positive leading coefficient is GG up to a unit, since GG is primitive. For termination: only finitely many primes divide γ\gamma or the nonzero integer that detects unluckiness (Lemma 2 applied to reduction modulo pp), and once the combination uses only good primes it equals G~\tilde G, Aˉ\bar A, Bˉ\bar B times γ\gamma-scalings, whose norms are fixed, so step 6 eventually succeeds.

The test of step 6 replaces trial division, which is the expensive final step of most modular GCD algorithms. Brown's algorithm costs about as much as a few dense multiplications of the inputs: it is the method of choice for dense inputs and for two variables, and hopeless for sparse inputs of high degree in many variables, where the dense box has ∏i(di+1)\prod_i (d_i + 1) entries.

Zippel's algorithm#

Zippel's algorithm [Zip1979] exploits sparsity through the shape assumption: the image of GG modulo a random prime has the same monomials as GG. The first prime gives the monomials; for the others, only the coefficients are unknown, and they are found from few evaluations by solving linear systems (sparse interpolation, Known support: transposed Vandermonde systems).

Algorithm 2: Zippel's GCD over the integers

Input: AA, BB in at least two variables, primitive with respect to x0x_0 over Z[x1,…]\mathbb{Z}[x_1, \ldots]; γ=gcd⁡(lc⁡(A),lc⁡(B))∈Z\gamma = \gcd(\operatorname{lc}(A), \operatorname{lc}(B)) \in \mathbb{Z} for the lex leading coefficients. Output: GG, Aˉ\bar A, Bˉ\bar B, or failure.

  1. Choose a prime pp with γ≢0\gamma \not\equiv 0 and A,B≢0A, B \not\equiv 0. Compute gp=gcd⁡(A mod p,B mod p)g_p = \gcd(A \bmod p, B \bmod p) by recursive sparse interpolation over Fp\mathbb{F}_p (nmod_mpolyl_gcdp_zippel_smprime); if 11, return G=1G = 1; if its degree in x0x_0 exceeds the current bound, try another prime; normalise to lc⁡(gp)=γ\operatorname{lc}(g_p) = \gamma and lift it to HH with symmetric coefficients.
  2. For further primes p′p': compute the image gp′g_{p'} with the monomials of HH by solving for its coefficients (nmod_mpolyl_gcds_zippel); on inconsistency go back to 1 with a new first prime. Normalise and combine with HH by the Chinese remainder theorem.
  3. When HH no longer changes, divide HH by its content and test whether it divides AA and BB exactly. If so, return. If HH changes but its coefficients exceed a bound, go back to 1.

The result is correct because of the final divisions and the degree bound: a primitive common divisor of AA and BB whose degree in x0x_0 is the degree of the GCD of images, which by Lemma 2 is at least deg⁡x0G\deg_{x_0} G, is GG itself. The leading coefficient of GG in x0x_0 is in general a polynomial in x1,…x_1, \ldots, not a monomial, so the univariate images computed during sparse interpolation are only known up to scalar multiples; FLINT treats these scalars as additional unknowns of the linear systems, as proposed by de Kleine, Monagan and Wittkopf [dKMW2005].

The bound of step 3, in bits, is the bit size of the smaller of the bounds of fmpz_mpoly_factor_bound_si for the divisors of AA and of BB, which use the degrees in all variables, plus the bit size of γ\gamma.

Sparse interpolation with Berlekamp–Massey#

Zippel's algorithm needs one recursive sparse interpolation per variable. Hu and Monagan [HuMon2016] instead treat two main variables x0,x1x_0, x_1 densely and all others at once: the coefficients of GG as a polynomial in x0,x1x_0, x_1 are sparse polynomials in x2,…x_2, \ldots, which are recovered by the algorithm of Ben-Or and Tiwari [BenOrTiw1988] from their values at the powers of one point (Unknown support: Ben-Or–Tiwari).

Algorithm 3: GCD with Berlekamp–Massey interpolation

Input: AA, BB in at least three variables, primitive with respect to x0,x1x_0, x_1 over Z[x2,…]\mathbb{Z}[x_2, \ldots]; Γ=gcd⁡(lc⁡x0,x1(A),lc⁡x0,x1(B))∈Z[x2,…]\Gamma = \gcd(\operatorname{lc}_{x_0, x_1}(A), \operatorname{lc}_{x_0, x_1}(B)) \in \mathbb{Z}[x_2, \ldots]. Output: GG, Aˉ\bar A, Bˉ\bar B, or failure.

  1. Bound the bidegree of GG in (x0,x1)(x_0, x_1) from bivariate images at random points modulo a word-size prime.
  2. Choose Kronecker substitution degrees for x2,…,xn−1x_2, \ldots, x_{n-1} (degree bounds plus one), so that the coefficients become univariate in one variable zz with exponents below D=∏i≥2(di+1)D = \prod_{i \ge 2} (d_i + 1), and a prime p>Dp > D for which p−1p - 1 is smooth (fmpz_next_smooth_prime), so that discrete logarithms modulo pp are cheap (Pohlig–Hellman [PohHel1978]).
  3. For k=1,2,…k = 1, 2, \ldots: evaluate z=ωkz = \omega^{k} for a generator ω\omega, compute the bivariate GCD of the images and its cofactors (n_polyu1n_mod_gcd_brown_smprime), scaled to have leading coefficient the image of Γ\Gamma, and feed each coefficient to a Berlekamp–Massey instance. Stop when the instances for G~\tilde G, or for one of the cofactors, have stabilised and their roots give monomials ωe\omega^{e} with e<De < D (discrete logarithms); check the candidate at a random point.
  4. With the monomials known, compute images modulo further primes by solving transposed Vandermonde systems (zip_solve), and combine them by the Chinese remainder theorem until stable.
  5. Make the result primitive and verify by exact division.

The number of evaluations is about twice the number of terms of the largest coefficient of G~\tilde G (or of the cofactor used), against roughly the number of terms times the number of variables for Zippel's algorithm. Using Γ\Gamma to normalise the images solves the leading coefficient problem at the price of possibly introducing a factor Γ/lc⁡(G)\Gamma / \operatorname{lc}(G), removed at the end.

Hensel lifting#

The EEZ-GCD algorithm [MosYun1973; Wan1980] views the GCD problem as a factorisation problem: if g=gcd⁡(A(x0,α),B(x0,α))g = \gcd(A(x_0, \alpha), B(x_0, \alpha)) for an evaluation point α∈Zn−1\alpha \in \mathbb{Z}^{n-1} and gg is coprime to the cofactor aˉ=A(x0,α)/g\bar a = A(x_0, \alpha)/g, then A=GAˉA = G \bar A is the unique lifting of A(x0,α)=g⋅aˉA(x_0, \alpha) = g \cdot \bar a with the correct leading coefficients (Lemma 1 of Multivariate Hensel lifting).

Algorithm 4: EEZ-GCD

Input: AA, BB primitive with respect to x0x_0; an upper bound dd for deg⁡x0G\deg_{x_0} G. Output: GG, Aˉ\bar A, Bˉ\bar B, or failure.

  1. Choose α\alpha (first 00, then random values of increasing size) with deg⁡x0A(x0,α)=deg⁡x0A\deg_{x_0} A(x_0, \alpha) = \deg_{x_0} A and likewise for BB. Compute gg and the cofactors aˉ\bar a, bˉ\bar b of the univariate images. If deg⁡g=0\deg g = 0, return G=1G = 1; if deg⁡g>d\deg g > d, try another point; if deg⁡g<d\deg g < d, lower dd and try another point (the bound now has two witnesses only when two points agree).
  2. If deg⁡g\deg g equals deg⁡x0A\deg_{x_0} A, test whether A∣BA \mid B, and symmetrically.
  3. Choose H=AH = A if gcd⁡(g,aˉ)=1\gcd(g, \bar a) = 1, else H=BH = B if gcd⁡(g,bˉ)=1\gcd(g, \bar b) = 1, else H=μ1A+μ2BH = \mu_1 A + \mu_2 B for small rationals μ1/μ2\mu_1/\mu_2 (enumerated in Calkin–Wilf order) such that HH keeps its degree and its image cofactor is coprime to gg.
  4. Let γ=gcd⁡(lc⁡x0A,lc⁡x0B)\gamma = \gcd(\operatorname{lc}_{x_0} A, \operatorname{lc}_{x_0} B). Lift the factorisation γH(x0,α)=g′⋅h′\gamma H(x_0, \alpha) = g' \cdot h', where g′g', h′h' are gg and H(x0,α)/gH(x_0,\alpha)/g scaled to have leading coefficients γ(α)\gamma(\alpha) and lc⁡(H)(α)\operatorname{lc}(H)(\alpha), to a factorisation γH=G′H′\gamma H = G' H' with leading coefficients γ\gamma and lc⁡x0H\operatorname{lc}_{x_0} H, one variable at a time with fmpz_mpoly_hlift. On failure, try another point.
  5. Let G=pp⁡x0(G′)G = \operatorname{pp}_{x_0}(G') and verify that GG divides AA and BB.

Theorem 4 (Correctness of EEZ-GCD). If Algorithm 4 returns GG, then G=gcd⁡(A,B)G = \gcd(A, B).

Proof. GG divides AA and BB by step 5, hence divides gcd⁡(A,B)\gcd(A, B). Its degree in x0x_0 is deg⁡g\deg g, which by Lemma 2 is at least deg⁡x0gcd⁡(A,B)\deg_{x_0} \gcd(A, B), because the evaluation preserves the degrees of AA and BB. So gcd⁡(A,B)/G\gcd(A, B)/G has degree 0 in x0x_0, and as a divisor of the primitive polynomial gcd⁡(A,B)\gcd(A, B) it is a unit.

When the GCD has few terms but a dense structure in few variables, Hensel lifting is efficient, and it needs only one good evaluation point, which matters over small finite fields (GCDs over small finite fields). Its weakness is the cost of dense lifting for sparse polynomials in many variables. fmpz_mpoly_gcd does not use it; it is available as fmpz_mpoly_gcd_hensel. A last method, fmpz_mpoly_gcd_subresultant, computes the last nonzero subresultant in a well chosen main variable with Ducos' algorithm [Duc2000] and is useful only for very small inputs.

Choosing an algorithm#

After the easy cases, the inputs are converted to a lex context in the variables that occur, ordered differently for each algorithm (the variables of largest degree become the dense variables of Brown's algorithm and the main variables of the others), and the estimates of Degree bounds give costs:

  • for Brown's algorithm, roughly the size of the dense boxes of AA, BB, GG and the cofactors, adjusted by the densities ℓA/∏i(deg⁡xiA+1)\ell_A/\prod_i (\deg_{x_i} A + 1) and the expected number of points before stabilisation (mpoly_gcd_info_measure_brown);
  • for the Berlekamp–Massey algorithm, the number of evaluations (the maximal number of terms of a coefficient of GG in the two main variables) times the cost of a bivariate GCD and of evaluating AA and BB (mpoly_gcd_info_measure_bma).

With at most two variables Brown's algorithm is used. With three or more, the Berlekamp–Massey algorithm is tried first if its estimated time is less than Brown's and either the inputs are sparse (n(δA+δB)<1n(\delta_A + \delta_B) < 1 for the densities δ\delta) or its estimate is below 1% of Brown's; otherwise Brown's algorithm comes first. If both fail, Zippel's algorithm is tried. Each algorithm can fail (for instance when it runs out of good points, or when the exponents do not fit), never returning a wrong result, and the next one is used.

Use in FLINT#

Referenced from#

References#

  • [Bro1971] W. S. Brown. On Euclid's algorithm and the computation of polynomial greatest common divisors. Journal of the ACM 18:4 (1971), 478–504. https://doi.org/10.1145/321662.321664
  • [GCL1992] K. O. Geddes, S. R. Czapor and G. Labahn. Algorithms for computer algebra. Springer, 1992. https://doi.org/10.1007/b102438
  • [GG2003] J. von zur Gathen and J. Gerhard, Modern Computer Algebra, second edition, Cambridge University Press (2003)
  • [Sch-mpoly] D. Schultz. Algorithms for multivariate polynomials. Notes in the FLINT source tree, src/mpoly/doc/MPolyAlgorithms.tex.
  • [Zip1979] R. Zippel. Probabilistic algorithms for sparse polynomials. Symbolic and Algebraic Computation (EUROSAM 1979), Lecture Notes in Computer Science 72, Springer, 1979, 216–226. https://doi.org/10.1007/3-540-09519-5_73
  • [dKMW2005] J. de Kleine, M. Monagan and A. Wittkopf. Algorithms for the non-monic case of the sparse modular GCD algorithm. Proceedings of ISSAC 2005, ACM, 124–131. https://doi.org/10.1145/1073884.1073903
  • [HuMon2016] J. Hu and M. Monagan. A fast parallel sparse polynomial GCD algorithm. Proceedings of ISSAC 2016, ACM, 271–278; full version in Journal of Symbolic Computation 105 (2021), 28–63. https://doi.org/10.1016/j.jsc.2020.06.001
  • [BenOrTiw1988] M. Ben-Or and P. Tiwari. A deterministic algorithm for sparse multivariate polynomial interpolation. Proceedings of STOC 1988, ACM, 301–309. https://doi.org/10.1145/62212.62241
  • [PohHel1978] S. C. Pohlig and M. E. Hellman, "An improved algorithm for computing logarithms over GF(p) and its cryptographic significance", IEEE Transactions on Information Theory 24 (1978), 106–110, https://doi.org/10.1109/TIT.1978.1055817
  • [MosYun1973] J. Moses and D. Y. Y. Yun. The EZ GCD algorithm. Proceedings of the ACM Annual Conference 1973, 159–166. https://doi.org/10.1145/800192.805698
  • [Wan1980] P. S. Wang. The EEZ-GCD algorithm. ACM SIGSAM Bulletin 14:2 (1980), 50–60. https://doi.org/10.1145/1089220.1089228
  • [Duc2000] L. Ducos. Optimizations of the subresultant algorithm. Journal of Pure and Applied Algebra 145 (2000), 149–163. https://doi.org/10.1016/S0022-4049(98)00081-4
Cite this page

The FLINT team, “Greatest common divisors,” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/algorithms/multivariate/gcd.html (generated 2026-11-02).