Prime Number Sieve 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48.

Slides:



Advertisements
Similar presentations
Slides for Parallel Programming Techniques & Applications Using Networked Workstations & Parallel Computers 2nd ed., by B. Wilkinson & M
Advertisements

Test practice Multiplication. Multiplication 9x2.
1 5.1 Pipelined Computations. 2 Problem divided into a series of tasks that have to be completed one after the other (the basis of sequential programming).
1 5.1 Pipelined Computations. 2 Problem divided into a series of tasks that have to be completed one after the other (the basis of sequential programming).
Prime Factorisation Factor Trees
Lists Samuel Marateck © The Sieve of Eratosthenes.
Pipelined Computations Divide a problem into a series of tasks A processor completes a task sequentially and pipes the results to the next processor Pipelining.
Chapter 4 Number Theory. Terms Factors Divides, divisible, divisibility Multiple.
COMPE575 Parallel & Cluster Computing 5.1 Pipelined Computations Chapter 5.
Chapter 5. Operations on Multiple R. V.'s 1 Chapter 5. Operations on Multiple Random Variables 0. Introduction 1. Expected Value of a Function of Random.
1 Matrix Addition, C = A + B Add corresponding elements of each matrix to form elements of result matrix. Given elements of A as a i,j and elements of.
Least Common Multiple (LCM)
Factoring Rainbows Created By Jennifer Conner. First, here is some NEW vocabulary: Prime Number: any number whose only factors are 1 and itself Composite.
Prime Numbers.
Timing circuits Monostable multivibrators (one-shots) –Digital storage circuit with only 1 stable state –Temporarily driven into a transient state by a.
Sieve of Eratosthenes by Fola Olagbemi. Outline What is the sieve of Eratosthenes? Algorithm used Parallelizing the algorithm Data decomposition options.
7 is a prime number Factors of 7: 1, 7 Patterns and Algebra 32 Multiplication and Division 28.
Sieve of Eratosthenes. The Sieve of Eratosthenes is a method that.
Whole Number Arithmetic Factors and Primes. Exercise 5 - Oral examples { factors of 15 } { factors of 32 } { factors of 27 } { factors of 28 } (1, 3,
36 / \ 4 x 9 / \ / \ 2 x 2 x 3 x 3 = 2 2 x 3 2 by D. Fisher.
© T Madas =2 x 2 x 3 12 =2 x 3 Write these numbers as a product of prime factors =2 x =2 x.
© T Madas From the numbers in the list below, find: the square numbers.
Chun-Yuan Lin OpenMP-Programming training-5. “Type 2” Pipeline Space-Time Diagram.
LESSON #6 Prime and Composite Numbers. PRIME NUMBERS & FACTORS  PRIME NUMBER: a number that only has 2 factors (1 and itself)  FACTOR: any of the numbers.
Multiplication Facts. 9 6 x 4 = 24 5 x 9 = 45 9 x 6 = 54.
Number Theory Yolanda McHenry, Ashley Courtney, Tyler Williams, Jamiya Hagger.
Prime Numbers and Factoring. Which expression is equal to 4x6? (a) 2 × 2 x 2 (b) 2 × 3 × 4 (c) 4 × 5 × 3 (d) 6 × 6.
Find the mistake! Here are 10 statements you will have 15 seconds to decide if the statement is right or wrong. List the numbers of the wrong statements.
Contribution: Timing then Mario Luigi Biochemical rules are inherently parallel. Sequentialize? Step 1: Step 2:
Streams Review A Review of Streams Mark Boady. What Are Steams? Delayed lists We pretend that the stream is a list In reality we only know the next value,
Multiplication Facts. 2x2 4 8x2 16 4x2 8 3x3.
Multiplication Facts Review: x 1 = 1 10 x 8 =
Order of Operations Oral examples x 5 x x 5 ÷ ÷ 5 x ÷ 5 ÷ 2 9.
Prime Numbers Lecture L4.4 Sieve of Eratosthenes.
Multiplication Find the missing value x __ = 32.
Sieve of Eratosthenes Quiz questions ITCS4145/5145, Parallel Programming Oct 24, 2013.
Multiplication Facts All Facts. 0 x 1 2 x 1 10 x 5.
EVEN NUMBERS EVEN NUMBERS 1 = prime 2 = prime1 3 = prime 4 = 2 x 22 5 = prime 6 = 2 x 33 7 = prime 8 = 2 x 2 x 24 9 = 3 x 3 10 = 2 x 55.
Multiplication Facts.
Nat. Rev. Neurol. doi:10/1038/nrneurol
Multiplication table. x
Prime Numbers.
6.1.6 Least Common Multiple (LCM)
Sieve of Eratosthenes.
Grow these factor bugs, their legs
Using The Sieve of Eratosthenes
9 x 14 9 x 12 Calculate the value of the following: 1 4 × 5 =
Multiplication Facts.
Sorting Quiz questions
Sieve of Eratosthenes.
مكتبة الإسكندرية ١٣ ديسمبر ٢٠٠٨ دكتور باسم أحمد عوض
Factors, multiple, primes: Factors from prime factors
Prime Factorisation Factor Trees
How to measure 4L of water?
How to measure 4L of water?
X-STANDARD MATHEMATICS ONE MARK QUESTIONS
Understanding Location
AP Java Warm-up Boolean Array.
Understanding Location
Numerical Algorithms Quiz questions
Factors, Multiples, Primes: Product of prime factors
Multiplication Facts.
© T Madas.
Common Array Algorithms
Geometry 3-3 Proving Lines Parallel
Prime Numbers.
Matrix Addition, C = A + B Add corresponding elements of each matrix to form elements of result matrix. Given elements of A as ai,j and elements of B as.
Factors, multiple, primes: Multiples
Presentation transcript:

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

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)

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

Parallel Time Complexity Analysis Another Formulation:

Programming Project: Parallel Prime Number Generation Read at: