Get Answers to all your Questions

header-bg qa

What do you mean by sieve of erothenes?

Answers (1)

best_answer

The Sieve of Erathosthenes is an ancient egypt algorithm for finding all prime numbers upto any given limit.
The sieve of Eratosthenes is one of the most efficient ways to find all primes smaller than n when n is smaller than 10 million or so .It does so by iteratively marking as composite the multiples of each prime, starting with the first prime number, 2. The multiples of a given prime are generated as a sequence of numbers starting from that prime, with constant difference between them that is equal to that prime. This is the sieve's key distinction from using trial division to sequentially test each candidate number for divisibility by each prime. Once all the multiples of each discovered prime have been marked as composites, the remaining unmarked numbers are primes.

Posted by

Deependra Verma

View full answer