Fast compact prime number sieves (among others)
نویسندگان
چکیده
منابع مشابه
Two Compact Incremental Prime Sieves
A prime sieve is an algorithm that finds the primes up to a bound n. We say that a prime sieve is incremental, if it can quickly determine if n+1 is prime after having found all primes up to n. We say a sieve is compact if it uses roughly √ n space or less. In this paper we present two new results: • We describe the rolling sieve, a practical, incremental prime sieve that takes O(n log logn) ti...
متن کاملImproved incremental prime number sieves
An algorithm due to Bengalloun that continuously enumerates the primes is adapted to give the rst prime number sieve that is simultaneously sublinear, additive, and smoothly incremental: { it employs only (n= log log n) additions of numbers of size O(n) to enumerate the primes up to n, equalling the performance of the fastest known algorithms for xed n; { the transition from n to n + 1 takes on...
متن کاملTrading Time for Space in Prime Number Sieves
A prime number sieve is an algorithm that nds the primes up to a bound n. We present four new prime number sieves. Each of these sieves gives new space complexity bounds for certain ranges of running times. In particular, we give a linear time sieve that uses only O(p n=(log log n) 2) bits of space, an O l (n= log log n) time sieve that uses O(n=((log n) l log log n)) bits of space, where l > 1...
متن کاملA Space-eecient Fast Prime Number Sieve
We present a new algorithm that nds all primes up to n using at most O(n= log log n) arithmetic operations and O(n=(log n log log n)) space. This algorithm is an improvement of a linear prime number sieve due to Pritchard. Our new algorithm matches the running time of the best previous prime number sieve, but uses less space by a factor of (log n). In addition, we present the results of our imp...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
ژورنال
عنوان ژورنال: Journal of Algorithms
سال: 1983
ISSN: 0196-6774
DOI: 10.1016/0196-6774(83)90014-7