Question: Suppose when searching for a large prime, our first step is to sieve by eliminating multiples of the first n primes. How large should n
Suppose when searching for a large prime, our first step is to sieve by eliminating multiples of the first n primes. How large should n be to speed up our search by a factor of Eliminating all even numbers speeds up our program by a factor of since we've eliminated half of the choices that are composite. If we also immediately disqualify multiples of then we speed up our program by a total of a factor of since we have eliminated of all composites. Check that that argument is correct. Now see what happens when you eliminate all of and Again for Now try to figure out the mathematical result and use it to solve for n again solve for n that is the main goal, has to be a numerical value only
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
