We consider the computation of the euclidean polynomial modular remainder $R(X)\equiv{A(X)}\mod{B(X)}$ with $A$ and $B$ of respective degrees $n$ and $m\leq{n}$. If the multiplication of two polynomials of degree $k$ can be performed with $\mathfrak{M}(k)$ operations and $\mathcal{O}(k)$ extra space, then standard algorithms for the remainder require $\mathcal{O}(\frac{n}{m}\mathfrak{M}(m))$ arithmetic operations and, apart from that of $A$ and $B$, O(n) extra memory. This extra space is notably usually used to store the whole quotient $Q(X)$ such that $A=BQ+R$ with $\deg{R}<\deg{B}$. We avoid the storage of the whole of this quotient, and propose an algorithm still using $\mathcal{O}(\frac{n}{m}\mathfrak{M}(m))$ arithmetic operations but only $\mathcal{O}(m)$ extra space. When the divisor $B$ is sparse with a constant number of non-zero terms, the arithmetic complexity bound reduces to $\mathcal{O}(n)$. When it is allowed to use the input space of $A$ or $B$ for intermediate computations, but putting $A$ and $B$ back to their initial states after the completion of the remainder computation, we further propose an in-place algorithm (that is with its extra required space reduced to $\mathcal{O}(1)$ only) using $\mathcal{O}(n^{\log_2(3)})$ arithmetic operations over any field of zero or odd characteristic and over most of the characteristic two ones. To achieve this, we develop techniques for Toeplitz matrix operations which output is also part of the input.
翻译:本文考虑欧几里得多项式模余$R(X)\equiv{A(X)}\mod{B(X)}$的计算,其中$A$和$B$的次数分别为$n$和$m\leq n$。如果两个次数均为$k$的多项式乘法可以用$\mathfrak{M}(k)$次运算和$\mathcal{O}(k)$额外空间进行,则求余的标准算法需要$\mathcal{O}(\frac{n}{m}\mathfrak{M}(m))$次算术运算。除了$A$和$B$的空间外,通常需要$\mathcal{O}(n)$的额外空间来存储整个商$Q(X)$,使得$A=BQ+R$且$\deg{R}<\deg{B}$。本文避免了存储整个商的额外空间需求,提出了一种算法,仍使用$\mathcal{O}(\frac{n}{m}\mathfrak{M}(m))$次算术运算,但只需要$\mathcal{O}(m)$的额外空间。当除数$B$稀疏且非零项数为常数时,算术复杂度降至$\mathcal{O}(n)$。在允许使用$A$或$B$的输入空间进行中间计算,但在完成求余计算后将$A$和$B$还原到初始状态时,我们进一步提出了一种就地算法(其额外所需空间仅降至$\mathcal{O}(1)$),可在零或奇数特征的大多数域以及大多数二元特征域上使用,使用$\mathcal{O}(n^{\log_2(3)})$次算术运算。为此,我们开发了关于Toeplitz矩阵操作的技术,其输出也是输入的一部分。