Congruence class arithmetic

Slides:



Advertisements
Similar presentations
Mod arithmetic.
Advertisements

1 Lect. 12: Number Theory. Contents Prime and Relative Prime Numbers Modular Arithmetic Fermat’s and Euler’s Theorem Extended Euclid’s Algorithm.
Chapter 4 – Finite Fields. Introduction will now introduce finite fields of increasing importance in cryptography –AES, Elliptic Curve, IDEA, Public Key.
Number Theory and Cryptography
Congruence class arithmetic. Definitions: a ≡ b mod m iff a mod m = b mod m. a  [b] iff a ≡ b mod m.
Congruence of Integers
Congruence Classes Z n = {[0] n, [1] n, [2] n, …, [n - 1] n } = the set of congruence classes modulo n.
Mathematics of Cryptography Part I: Modular Arithmetic, Congruence,
The Answer is RIGHT.
Mathematics of Cryptography Part I: Modular Arithmetic, Congruence,
CSE 504 Discrete Mathematics & Foundations of Computer Science
Mathematics of Cryptography Part I: Modular Arithmetic
Module :MA3036NI Cryptography and Number Theory Lecture Week 7
Mathematics Review Exponents Logarithms Series Modular arithmetic Proofs.
Prep Math Competition, Lec. 1Peter Burkhardt1 Number Theory Lecture 1 Divisibility and Modular Arithmetic (Congruences)
Chapter 4 Numeration and Mathematical Systems © 2008 Pearson Addison-Wesley. All rights reserved.
Whole Numbers Section 3.3 Multiplication and Division of Whole Numbers
CompSci 102 Discrete Math for Computer Science February 16, 2012 Prof. Rodger.
Copyright © Curt Hill Divisibility and Modular Arithmetic A Topic in Number Theory.
Section 2.1: Shift Ciphers and Modular Arithmetic Practice HW from Barr Textbook (not to hand in) p.66 # 1, 2, 3-6, 9-12, 13, 15.
8.6 Algebra and Composition of Functions. that limit the domain of a function are: The most common rules of algebra Rule 1: You can’t divide by 0. Rule.
Chinese Remainder Theorem. How many people What is x? Divided into 4s: remainder 3 x ≡ 3 (mod 4) Divided into 5s: remainder 4 x ≡ 4 (mod 5) Chinese Remainder.
© 2010 Pearson Prentice Hall. All rights reserved. CHAPTER 13 Mathematical Systems.
Adding, Subtracting, Multiplying, and Diving Integers!!!
Multiplying Integers with Tiles Student Expectation: 7 th Grade: 7.1.2C Use models, such as concrete objects, pictorial models, and number lines, to add,
Addition Multiplication Subtraction Division. 1.If the signs are the same, add the numbers and keep the same sign = = If the.
Copyright © Cengage Learning. All rights reserved. CHAPTER 8 RELATIONS.
Discrete Mathematics
Cryptography Lecture 14 Arpita Patra © Arpita Patra.
Divisibility and Modular Arithmetic
MA/CSSE 473 Day 06 Mathematical Induction Modular Arithmetic Do question 1 on today's quiz (work with another person)
1 Discrete Structures – CNS2300 Text Discrete Mathematics and Its Applications Kenneth H. Rosen (5 th Edition) Chapter 2 The Fundamentals: Algorithms,
Chapter 4 With Question/Answer Animations 1. Chapter Motivation Number theory is the part of mathematics devoted to the study of the integers and their.
Discrete Mathematics Chapter 2 The Fundamentals : Algorithms, the Integers, and Matrices. 大葉大學 資訊工程系 黃鈴玲.
Chapter 3 The Fundamentals: Algorithms, the integers, and matrices Section 3.4: The integers and division Number theory: the part of mathematics involving.
Dr Nazir A. Zafar Advanced Algorithms Analysis and Design Advanced Algorithms Analysis and Design By Dr. Nazir Ahmad Zafar.
Number Theory. Introduction to Number Theory Number theory is about integers and their properties. We will start with the basic principles of divisibility,
The Relation Induced by a Partition
MA/CSSE 473 Day 07 Extended Euclid's Algorithm Modular Division
Modular Arithmetic with Applications to Cryptography
Mathematics of Cryptography
Integers Rules of Operation.
Integer Rules Memorize the Rules.
WARM-UP Write in Scientific Form Write in Standard Form
Integers and Division Section 3.4.
DIVIDING INTEGERS The University of Texas at Dallas.
Division with Remainders
Knowing your math operation terms
MATH301- DISCRETE MATHEMATICS Copyright © Nahid Sultana Dr. Nahid Sultana Chapter 4: Number Theory and Cryptography.
Assignment statement and Arithmetic operation 2
Partial Products Algorithm for Multiplication
Applied Discrete Mathematics Week 3: Algorithms
Using Rules to Subtract Integers
Review # 2 Math 8.
Modular Arithmetic and Change of Base
Multiplying & Dividing Fractions
More Maths Programming Guides.
Combining Like terms.
CMSC 203, Section 0401 Discrete Structures Fall 2004 Matt Gaston
Properties of Real Numbers
Short Division.
Section 10.3 Modular Arithmetic
Clements MAΘ October 30th, 2014
Multiplying integers 3(3) = (3) = (3) = (3) = 0 -3
Algebra 5 Congruence Classes.
Multiplication and Division of Integers
Lecture 3 Strings and Things (Section 1.1)
Section 9.3 Modular Arithmetic.
New function graphs from old ones: Using Transformations
Presentation transcript:

Congruence class arithmetic

Congruence Definitions: a ≡ b mod m iff a mod m = b mod m. a[b] iff a ≡ b mod m.

It is possible to do arithmetic with congruence classes It is possible to do arithmetic with congruence classes. To add two congruence classes modulo n, we just select any element a from the first class and any element b from the second class, and then compute a + b as we would integers. The sum of the two congruence classes is then defined to be equal to the congruence class containing the sum a + b.

For example, let n=6. Suppose that we wish to add the congruence class [3] to the congruence class [52]. According to the algorithm described above, we just select an element from each class, add them together, and see which class the resulting sum is in. Clearly 3 and 52 are elements of our classes, so the sum is in the congruence class containing 55 which is congruent to 1 mod 6.

Things are fine so far, but suppose that we selected elements other than 3 and 52 from their respective congruence classes? After all, the rule for addition says that we can use any elements from each class to do the addition. Will this work? Let's try some examples. 9 and 15 are in the same class as 3. 4 and 46 are in the same class as 52. 9+4=13 15+46= 61. Both are congruent to 1 mod 6.

Addition is well defined These examples illustrate that addition of congruence classes is well defined. [3] + [52] = [55]=[13]=[61]= [1].

The rule for multiplication is similar to that for addition: to multiply two congruence classes, we select any elements a and b from each of the classes and multiply them together. The product of the congruence classes is then defined to be the congruence class containing the product ab. We modify the above examples to illustrate multiplication of congruence classes.

In moving from the set of integers to congruences modulo n, we go from an infinite set to a set with just n elements, the n congruence classes. Concretely, we can think of the n congruence classes as being represented by the possible remainders for division by n: 0, 1, . . ., n – 1. We can do addition, subtraction, and multiplication with this set.

Since arithmetic for these operations is well defined for congruences, we can be somewhat lax about where we reduce to remainders modulo n.