SIEVE ALGORITHMS FOR PERFECT POWER TESTING

被引:20
作者
BACH, E [1 ]
SORENSON, J [1 ]
机构
[1] BUTLER UNIV,DEPT MATH & COMP SCI,INDIANAPOLIS,IN 46208
关键词
PERFECT POWERS; NUMBER THEORETIC ALGORITHMS; RIEMANN HYPOTHESIS; NEWTON METHOD; SIEVE ALGORITHMS; PARALLEL ALGORITHMS; AVERAGE-CASE ANALYSIS;
D O I
10.1007/BF01228507
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
A positive integer n is a perfect power if there exist integers x and k, both at least 2, such that n = x(k). The usual algorithm to recognize perfect powers computes approximate kth roots for k less-than-or-equal-to log2 n, and runs in time O(log3 n log log log n). First we improve this worst-case running time to O(log3 n) by using a modified Newton's method to compute approximate kth roots. Parallelizing this gives an NC2 algorithm. Second, we present a sieve algorithm that avoids kth-root computations by seeing if the input n is a perfect kth power modulo small primes. If n is chosen uniformly from a large enough interval, the average running time is O(log2 n). Third, we incorporate trial division to give a sieve algorithm with an average running time of O(log2 n/log2 log n) and a median running time of O(log n). The two sieve algorithms use a precomputed table of small primes. We give a heuristic argument and computational evidence that the largest prime needed in this table is (logn)1+o(1); assuming the Extended Riemann Hypothesis, primes up to (log n)2+o(1) suffice. The table can be computed in time roughly proportional to the largest prime it contains. We also present computational results indicating that our sieve algorithms perform extremely well in practice.
引用
收藏
页码:313 / 328
页数:16
相关论文
共 32 条
[1]  
BACH E, 1989, MATH COMPUT, V52, P201, DOI 10.1090/S0025-5718-1989-0947467-1
[2]  
BACH E, 1986, SIAM J COMPUT, V4, P1143
[3]  
BACH E, 1988, SIAM J COMPUT, V2, P179
[4]   LOG DEPTH CIRCUITS FOR DIVISION AND RELATED PROBLEMS [J].
BEAME, PW ;
COOK, SA ;
HOOVER, HJ .
SIAM JOURNAL ON COMPUTING, 1986, 15 (04) :994-1003
[5]  
BRENT RP, 1976, ANAL COMPUTATIONAL C, P151
[6]  
Cobham A., 1966, 7 ANN S SWITCHING AU, P78
[7]   COMPUTING MULTIPLICATIVE INVERSES IN GF(P) [J].
COLLINS, GE .
MATHEMATICS OF COMPUTATION, 1969, 23 (105) :197-&
[8]  
Davenport H., 1980, MULTIPLICATIVE NUMBE
[9]  
DIXON JD, 1981, MATH COMPUT, V36, P255, DOI 10.1090/S0025-5718-1981-0595059-1
[10]  
GOLOMB SW, 1973, J NUMBER THEORY, V5, P218