arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1504.05240cs.CCcs.DS
收藏

关于素表计算的复杂性

On the complexity of computing prime tables

Martin Farach-Colton, Meng-Tsung Tsai

摘要:

许多大型算术计算依赖于所有小于$n$的素数的表。例如,计算$n!$的最快算法需要时间$O(M(n\log n) + P(n))$,其中$M(n)$是将两个$n$位数相乘的时间,$P(n)$是计算素数表直到$n$的时间.计算$\binom{n}{n/2}$的最快算法也使用素数表。我们表明,它需要时间$O(M(n) + P(n))$。在各种模型中,考虑到乘法\cite{Furer07,De08}复杂性的提高,$P(n)$的最佳界限大于$M(n\log n)$。本文给出了两种计算素表的算法,并在多带图灵机上分析了它们的复杂性。多带图灵机是分析素表算法的标准模型之一。这两个算法分别在时间$O(M(n\log n))$和$O(n\log^2 n/\log \log n)$中运行。我们通过加速阿特金筛来实现我们的结果。给定$M(n)$上的当前最佳边界是$n\log n 2^{O(\log^*n)}$,第二算法更快,并且比先前的最佳算法改进了$\log^2\log n$倍。我们的快速素表算法加快了$n!$和$\binom{n}{n/2}$的计算。最后,我们表明,计算阶乘需要$Ω(M(n \log^{4/7 - ε} n))$的任何常数$ε> 0$假设只允许乘法。

英文摘要:

Many large arithmetic computations rely on tables of all primes less than $n$. For example, the fastest algorithms for computing $n!$ takes time $O(M(n\log n) + P(n))$, where $M(n)$ is the time to multiply two $n$-bit numbers, and $P(n)$ is the time to compute a prime table up to $n$. The fastest algorithm to compute $\binom{n}{n/2}$ also uses a prime table. We show that it takes time $O(M(n) + P(n))$. In various models, the best bound on $P(n)$ is greater than $M(n\log n)$, given advances in the complexity of multiplication \cite{Furer07,De08}. In this paper, we give two algorithms to computing prime tables and analyze their complexity on a multitape Turing machine, one of the standard models for analyzing such algorithms. These two algorithms run in time $O(M(n\log n))$ and $O(n\log^2 n/\log \log n)$, respectively. We achieve our results by speeding up Atkin's sieve. Given that the current best bound on $M(n)$ is $n\log n 2^{O(\log^*n)}$, the second algorithm is faster and improves on the previous best algorithm by a factor of $\log^2\log n$. Our fast prime-table algorithms speed up both the computation of $n!$ and $\binom{n}{n/2}$. Finally, we show that computing the factorial takes $Ω(M(n \log^{4/7 - ε} n))$ for any constant $ε> 0$ assuming only multiplication is allowed.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑