33h - Discrete Mathematics Modular Arithmetic II 33-2...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Introduction Modular Arithmetic Discrete Mathematics Andrei Bulatov Discrete Mathematics – Modular Arithmetic II 33-2 Previous Lecture Relatively prime, Euler’s totient function Congruences Residues Residues and arithmetic operations Discrete Mathematics – Modular Arithmetic II 33-3 Residues (cntd) The residue of an integer a modulo m is such a number b that a b (mod m) and 0 b < m In other words the residue of a modulo m is the remainder of a when divided by m Let denote the set {0,1,2,…,n – 1}. This is the set of all possible remainders of integers when divided by n It is called the set of residues , and its members are called residues n Z Discrete Mathematics – Modular Arithmetic II 33-4 Modular Arithmetic We define addition, subtraction, and multiplication of residues: Let a,b . Then a + b (mod n) is the element c such that c a + b (mod n) a – b (mod n) is the element c such that c a – b (mod n) a b (mod n) is the element c such that c a b (mod n) Example. Construct operation tables for n Z n Z n Z n Z 5 Z + 0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 0 1 2 3 4 1 2 3 4 0 2 3 4 0 1 3 4 0 1 2 4 0 1 2 3 0 0 0 0 0 0 1 2 3 4 0 2 4 1 3 0 3 1 4 2 0 4 3 2 1 Discrete Mathematics – Modular Arithmetic II 33-5 Applications: Criptography One of the oldest cryptosystems is the Caesar cipher. He made messages secret by shifting each letter three letters forward. Thus B becomes E, and X is sent to A To express this process mathematically we first replace letters by integers from 0 to 25. For example, A is replaced by 0, K by 10. Next, to encrypt a message we add 3 modulo 25 to every letter.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

33h - Discrete Mathematics Modular Arithmetic II 33-2...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online