DS_Lecture_18.pdf - Lecture 18:Primes and Greatest Common Divisors Dr Chengjiang Long Computer Vision Researcher at Kitware Inc Adjunct Professor at

# DS_Lecture_18.pdf - Lecture 18:Primes and Greatest Common...

• Notes
• 30

This preview shows page 1 - 10 out of 30 pages.

Lecture 18:Primes and Greatest Common Divisors Dr. Chengjiang Long Computer Vision Researcher at Kitware Inc. Adjunct Professor at SUNY at Albany. Email: [email protected]

Subscribe to view the full document.

C. Long Lecture 18 October 17, 2018 2 ICEN/ICSI210 Discrete Structures Outline Prime and Composite Prime Factorizations Distribution of Primes GCD and LCM Euclidean Algorithm Application
C. Long Lecture 18 October 17, 2018 3 ICEN/ICSI210 Discrete Structures Outline Prime and Composite Prime Factorizations Distribution of Primes Greatest Common Divisor (GCD) Least Common Multiple (LCM) Euclidean Algorithm Application

Subscribe to view the full document.

C. Long Lecture 18 October 17, 2018 4 ICEN/ICSI210 Discrete Structures Prime, Composite and Theorem 1 Prime : a positive integer p greater than 1 if the only positive factors of p are 1 and p A positive integer greater than 1 that is not prime is called composite
C. Long Lecture 18 October 17, 2018 5 ICEN/ICSI210 Discrete Structures Example Prime factorizations of integers 100=2∙2∙5∙5=2 2 ∙5 2 641=641 999=3∙3∙3∙37=3 3 ∙37 1024=2∙2∙2∙2∙2∙2∙2∙2∙2∙2=2 10

Subscribe to view the full document.

C. Long Lecture 18 October 17, 2018 6 ICEN/ICSI210 Discrete Structures Theorem 2 As n is composite, n has a factor 1<a<n, and thus n=ab We show that ! ≤ # or \$ ≤ # (by contraposition) Thus n has a divisor not exceeding # This divisor is either prime or by the fundamental theorem of arithmetic, has a prime divisor less than itself, and thus a prime divisor less than less than # In either case, n has a prime divisor \$ ≤ #
C. Long Lecture 18 October 17, 2018 7 ICEN/ICSI210 Discrete Structures Example Show that 101 is prime The only primes not exceeding 101 are 2, 3, 5, 7. As 101 is not divisible by 2, 3, 5, 7, it follows that 101 is prime.

Subscribe to view the full document.

C. Long Lecture 18 October 17, 2018 8 ICEN/ICSI210 Discrete Structures Outline Prime and Composite Prime Factorizations Distribution of Primes Greatest Common Divisor (GCD) Least Common Multiple (LCM) Euclidean Algorithm Application
C. Long Lecture 18 October 17, 2018 9 ICEN/ICSI210 Discrete Structures Procedure for prime factorization Begin by diving n by successive primes, starting with 2 If n has a prime factor, we would find a prime factor not exceeding ! .

Subscribe to view the full document.

• Spring '14
• IASHVILI,I

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern