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

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.
Discrete Mathematics Math 6A Homework 9 Solution.
Chapter 4 – Finite Fields. Introduction will now introduce finite fields of increasing importance in cryptography –AES, Elliptic Curve, IDEA, Public Key.
(CSC 102) Lecture 12 Discrete Structures. Previous Lecture Summary Floor and Ceiling Functions Definition of Proof Methods of Proof Direct Proof Disproving.
CSE115/ENGR160 Discrete Mathematics 03/13/12 Ming-Hsuan Yang UC Merced 1.
Number Theory and Cryptography
Basic properties of the integers
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.
Fall 2002CMSC Discrete Structures1 Let us get into… Number Theory.
BY MISS FARAH ADIBAH ADNAN IMK
The Integers and Division
Mathematics of Cryptography Part I: Modular Arithmetic, Congruence,
Proof of Euler-Fermat (2/28) Here’s an outline of the proof of the Euler-Fermat Theorem, which mirrors the proof of flt. Given any m, let B = {b i | 0.
CSE 504 Discrete Mathematics & Foundations of Computer Science
Mathematics of Cryptography Part I: Modular Arithmetic
Mathematics Review Exponents Logarithms Series Modular arithmetic Proofs.
Section 2.1: Shift Ciphers and Modular Arithmetic The purpose of this section is to learn about modular arithmetic, which is one of the fundamental mathematical.
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.
Integer Operations. 1) What’s the rule for adding integers? *If both addends are Positive: - Add together and the sum is positive (Ex = 12) *If.
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.
Chapter The Integers and Division Division
Modular Arithmetic with Applications to Cryptography Lecture 47 Section 10.4 Wed, Apr 13, 2005.
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.
Module #9 – Number Theory 1/5/ Algorithms, The Integers and Matrices.
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,
Foundations of Computing I CSE 311 Fall Review: Division Theorem Let a be an integer and d a positive integer. Then there are unique integers q.
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.
Warm Up If you add two even numbers do you always get an even number? If you add two odd numbers do you always get an odd number.
Discrete Mathematics
Cryptography Lecture 14 Arpita Patra © Arpita Patra.
Divisibility and Modular Arithmetic
MA/CSSE 473 Day 09 Modular Division Revisited Fermat's Little Theorem Primality Testing.
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,
MA/CSSE 473 Day 05 More induction Factors and Primes Recursive division algorithm.
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.
Number Theory Lecture 1 Text book: Discrete Mathematics and its Applications, 7 th Edition.
Ch 2-5 Reasoning in Geometry and Algebra
Multiply Integers SWBAT multiply integers. Multiplication What is multiplication? What is multiplication? Repeated addition Repeated addition How do you.
Discrete Mathematics Chapter 2 The Fundamentals : Algorithms, the Integers, and Matrices. 大葉大學 資訊工程系 黃鈴玲.
The Relation Induced by a Partition
Mathematics of Cryptography
Integers Rules of Operation.
Integer Rules Memorize the Rules.
Congruence class arithmetic
Integers and Division Section 3.4.
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
Modular Arithmetic and Change of Base
More Maths Programming Guides.
CMSC 203, Section 0401 Discrete Structures Fall 2004 Matt Gaston
Properties of Real Numbers
Short Division.
Section 10.3 Modular Arithmetic
Algebra 5 Congruence Classes.
Section 9.3 Modular Arithmetic.
Presentation transcript:

Congruence class arithmetic

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. 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 = = 61. Both are congruent to 1 mod 6.

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.