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...

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]
Image of page 1

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
Image of page 2
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
Image of page 3

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
Image of page 4
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
Image of page 5

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 $ ≤ #
Image of page 6
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.
Image of page 7

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
Image of page 8
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 ! .
Image of page 9

Subscribe to view the full document.

Image of page 10
  • Spring '14
  • IASHVILI,I

What students are saying

  • Left Quote Icon

    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.

    Student Picture

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

  • Left Quote Icon

    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.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    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.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Ask Expert Tutors You can ask You can ask ( soon) You can ask (will expire )
Answers in as fast as 15 minutes