Download presentation

Presentation is loading. Please wait.

Published byDaniel Bell Modified about 1 year ago

1

2
Prime Number Sieve Next_Prime = 2 ====> Mark multiples of 2 as non-prime Next_Prime = 3 ====> Mark multiples of 3 as non-prime.

3
Prime Number Sieve (cont’d) Next_Prime = 5 ====> Mark multiples of 5 as non-prime Next_Prime = 7 ====> Mark multiples of 7 as non-prime. Optimization #1 Q: Do you need to mark multiples of 11 between 1 and 50 ? A: No ! (They are already marked by the help of primes ≤ 7) Optimization #2 Q: Do you need to mark multiples of 7 between 1 and 48? A: No ! (They are already marked by the help of primes < 7)

4
Sequential Time Complexity Analysis Optimization #1: Optimization #2:

5
Parallel Time Complexity Analysis Another Formulation:

6
Programming Project: Parallel Prime Number Generation Read at:

Similar presentations

© 2016 SlidePlayer.com Inc.

All rights reserved.

Ads by Google