1 / 11

Discrete Mathematics

Discrete Mathematics. 03.20.09. Review. Division Algorithm a = dq + r Greatest Common Divisor (GCD) GCD( a,b ) – the largest integer that divides both a and b Least Common Multiples (LCM) LCM( a,b ) – the smallest positive integer that is divisible by both a and b. Review.

keith
Download Presentation

Discrete Mathematics

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Discrete Mathematics 03.20.09

  2. Review • Division Algorithm • a = dq + r • Greatest Common Divisor (GCD) • GCD(a,b) – the largest integer that divides both a and b • Least Common Multiples (LCM) • LCM(a,b) – the smallest positive integer that is divisible by both a and b

  3. Review • Prime • A positive integer greater than 1 with exactly two positive integer divisors • Relatively Prime Integers • Integers a and b such that GCD(a,b) = 1 • Pairwise Relatively Prime • A set of integers with the property that every pair of these integers is relatively prime

  4. Today’s Topics • Modular Arithmetic • Applications of Modular Arithmetic

  5. Modular Arithmetic • In some situations, we care only about the remainder of an integer when it is divided by some specified positive integer. • Ex.: Identifying if an integer is positive or negative.

  6. Congruences • If a and b are integers and m is a positive integer, then a is congruent to b modulo m if m divides a – b. • a b (mod m) if m | a - b • Definition of Notations: • a b (mod m) • a is congruent to b modulo m • a b (mod m) • a is not congruent to b modulo m • m | a – b • m divides a - b /

  7. Example • Determine whether 17 is congruent to 5 modulo 6. • Determine whether 24 and 14 are congruent to modulo 6.

  8. Exercise • Decide whether each of these integers is congruent to 5 modulo 17. • 80 • 103 • - 29 • - 122 • 35

  9. Applying Modular Arithmetic • Problem 1: • What time will it be 50 hours from now?

  10. Applying Modular Arithmetic • Problem 2: • Generating pseudorandom numbers generated by choosing m=9, a=7, c=4 and x0=3. • Find: • xn+1 = (axn + c) mod m • Find • x1 , x2, x3, x4, x5, x6, x7, x8, x9

  11. Applying Modular Arithmetic • Problem 3: • Cryptology • Encrypt the word HELLO using f(p) = p+3

More Related