Download presentation
Presentation is loading. Please wait.
1
Discrete Mathematics
2
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
3
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
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 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
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.