Exercise 9.3.9. To test whether the number n is a prime, you divide n all the integers 1, 2, 3,... up to a, and see if any of them divides evenly. How large does a have to be in order to guarantee that n really is a prime? (*Hint*) G When testing whether n is prime, by the "brute force" method, as long as n is odd we don't need to divide by even numbers (Why?). This means that you only need to test about half of the numbers up to a-more precisely. we only need to test [a/2] numbers, where [x] means "the next integer larger than r". ([x] is called the ceiling of x.) We can pull the same trick with factors that are divisible by 3. Once we've tested 3 as a factor, we don't need to check 9, 15, 21,... or any other number that is divisible by 3. (Why?) So it seems that this reduces the number of factors that we need to check by about a third, since every third integers are divisible by 3. However, we need to be careful here. We've already ruled out the numbers that are divisible by 2, so the numbers that are divisible by both 2 and 3 have already been ruled out. In other words (using m to denote a positive integer, and using the the notation {} to denote the size of sets): {m ≤a and (2| m or 3 | m)}|= |{m ≤a and 2 | m}| + |{m ≤ a and 3 | m}|-|{m ≤a and 6 | m}|.
Exercise 9.3.9. To test whether the number n is a prime, you divide n all the integers 1, 2, 3,... up to a, and see if any of them divides evenly. How large does a have to be in order to guarantee that n really is a prime? (*Hint*) G When testing whether n is prime, by the "brute force" method, as long as n is odd we don't need to divide by even numbers (Why?). This means that you only need to test about half of the numbers up to a-more precisely. we only need to test [a/2] numbers, where [x] means "the next integer larger than r". ([x] is called the ceiling of x.) We can pull the same trick with factors that are divisible by 3. Once we've tested 3 as a factor, we don't need to check 9, 15, 21,... or any other number that is divisible by 3. (Why?) So it seems that this reduces the number of factors that we need to check by about a third, since every third integers are divisible by 3. However, we need to be careful here. We've already ruled out the numbers that are divisible by 2, so the numbers that are divisible by both 2 and 3 have already been ruled out. In other words (using m to denote a positive integer, and using the the notation {} to denote the size of sets): {m ≤a and (2| m or 3 | m)}|= |{m ≤a and 2 | m}| + |{m ≤ a and 3 | m}|-|{m ≤a and 6 | m}|.
Elements Of Modern Algebra
8th Edition
ISBN:9781285463230
Author:Gilbert, Linda, Jimmie
Publisher:Gilbert, Linda, Jimmie
Chapter2: The Integers
Section2.2: Mathematical Induction
Problem 40E: Exercise can be generalized as follows: If and the set has elements, then the number of elements...
Related questions
Question
Please do it to Exercise 9.3.10 and please show step by step and explain
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps with 2 images
Recommended textbooks for you
Elements Of Modern Algebra
Algebra
ISBN:
9781285463230
Author:
Gilbert, Linda, Jimmie
Publisher:
Cengage Learning,
Algebra & Trigonometry with Analytic Geometry
Algebra
ISBN:
9781133382119
Author:
Swokowski
Publisher:
Cengage
Elements Of Modern Algebra
Algebra
ISBN:
9781285463230
Author:
Gilbert, Linda, Jimmie
Publisher:
Cengage Learning,
Algebra & Trigonometry with Analytic Geometry
Algebra
ISBN:
9781133382119
Author:
Swokowski
Publisher:
Cengage