Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 10? Eliminating all even numbers speeds up our program by a factor of 2, since we've eliminated half of the choices that are composite. If we also immediately disqualify multiples of 3, then we speed up our program by a total of a factor of 3, since we have eliminated 2/3 of all composites. Check that that argument is correct. Now see what happens when you eliminate all of 2,3 and 5. Again for 2,3,5,7. 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning C# 5.0 Databases

Authors: Vidya Vrat Agarwal

2nd Edition

1430242604, 978-1430242604

Students also viewed these Databases questions

Question

Explain the pages in white the expert taxes

Answered: 1 week ago