Discrete Mathematics 03.20.09
Review Division Algorithm Greatest Common Divisor (GCD) 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 Prime Relatively Prime Integers Pairwise Relatively 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
Today’s Topics Modular Arithmetic Applications of Modular Arithmetic
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.
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 is not congruent to b modulo m m | a – b m divides a - b /
Example Determine whether 17 is congruent to 5 modulo 6. Determine whether 24 and 14 are congruent to modulo 6.
Exercise Decide whether each of these integers is congruent to 5 modulo 17. 80 103 - 29 - 122 35
Applying Modular Arithmetic Problem 1: What time will it be 50 hours from now?
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
Applying Modular Arithmetic Problem 3: Cryptology Encrypt the word HELLO using f(p) = p+3