160 likes | 386 Vues
This review focuses on fundamental topics in Discrete Mathematics, including the Division Algorithm, Greatest Common Divisor (GCD), and Least Common Multiple (LCM). It covers the definition of prime numbers, the concept of relatively prime integers, and introduces modular arithmetic. Relevant applications of modular arithmetic, such as checking congruences and solving problems involving time calculations and pseudorandom number generation, are discussed. The session also includes exercises for practical understanding and a brief look at encryption using modular arithmetic.
E N D
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 • 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 b (mod 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