Section 9.3 Modular Arithmetic.

Slides:



Advertisements
Similar presentations
Number Theory and Cryptography
Advertisements

Congruence class arithmetic. Definitions: a ≡ b mod m iff a mod m = b mod m. a  [b] iff a ≡ b mod m.
Mathematics of Cryptography Part I: Modular Arithmetic, Congruence,
Slide 10-1 Copyright © 2005 Pearson Education, Inc. SEVENTH EDITION and EXPANDED SEVENTH EDITION.
Chapter 3 Math Vocabulary
Course 2: Inequalities Objectives:
Fall 2002CMSC Discrete Structures1 Let us get into… Number Theory.
Mathematics of Cryptography Part I: Modular Arithmetic, Congruence,
Mathematics of Cryptography Part I: Modular Arithmetic
February 24, 2015Applied Discrete Mathematics Week 4: Number Theory 1 Modular Arithmetic Let a be an integer and m be a positive integer. We denote by.
Mathematics of Cryptography Modular Arithmetic, Congruence,
Chapter 4 Numeration and Mathematical Systems © 2008 Pearson Addison-Wesley. All rights reserved.
Variables Tutorial 3c variable A variable is any symbol that can be replaced with a number to solve a math problem. An open sentence has at least one.
CompSci 102 Discrete Math for Computer Science February 16, 2012 Prof. Rodger.
1.4 Solving Equations ●A variable is a letter which represents an unknown number. Any letter can be used as a variable. ●An algebraic expression contains.
4.1 Solving Linear Inequalities
Chapter 1 Section 1. Examples: 2 x 2 system 2 x 3 system 3 x 2 system.
Section 2.7 Solving Inequalities. Objectives Determine whether a number is a solution of an inequality Graph solution sets and use interval notation Solve.
Section 2.1 Solving Equations Using Properties of Equality.
Find the sum or difference. Then simplify if possible.
Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall. Chapter 8 Real Numbers and Introduction to Algebra.
1.6 Solving Compound and Absolute Value Inequalities.
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.
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall. Chapter 1 Real Numbers and Introduction to Algebra.
Copyright © Cengage Learning. All rights reserved. CHAPTER 8 RELATIONS.
Chapter 13 Mathematic Structures 13.1 Modular Arithmetic Definition 1 (modulo). Let a be an integer and m be a positive integer. We denoted by a mod m.
Discrete Mathematics
Divisibility and Modular Arithmetic
1.7 Intro to Solving Equations Objective(s): 1.) to determine whether an equation is true, false, or open 2.)to find solutions sets of an equation 3.)to.
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.
Number Theory Lecture 1 Text book: Discrete Mathematics and its Applications, 7 th Edition.
Copyright 2011, 2007, 2003, 1999 Pearson Education, Inc. An inequality is a sentence containing 1.4 Sets, Inequalities, and Interval Notation.
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
Section 5.3 The Rational Numbers.
Chapter 4 Systems of Linear Equations; Matrices
ISHIK UNIVERSITY FACULTY OF EDUCATION Mathematics Education Department
Unit 2: Absolute Value Absolute Value Equations and Inequalities
Section 5.2 The Integers.
Congruence class arithmetic
Advanced Algorithms Analysis and Design
Introduction to Algebra
Equations and Inequalities
MATH301- DISCRETE MATHEMATICS Copyright © Nahid Sultana Dr. Nahid Sultana Chapter 4: Number Theory and Cryptography.
Chapter 2: Equations and Inequalities
a 1.4 Sets, Inequalities, and Interval Notation
Chapter 4 Section 1.
CSE 311: Foundations of Computing
Modular Arithmetic and Change of Base
Introduction to Variables, Algebraic Expressions, and Equations
EQ: How do I solve an equation in one variable?
Solving Inequalities by Adding or Subtracting
Notes Over 1.4 It’s time to stop “daydreaming”
Section 10.1 Groups.
Section 10.2 Finite Mathematical Systems
Section 10.3 Modular Arithmetic
Chapter 1 Section 3.
Divisibility and Modular Arithmetic
CLOCK ARITHMETIC.
Course 2: Inequalities Objectives:
Objective The student will be able to:
Lecture 3 Strings and Things (Section 1.1)
Number Theory: Prime & Composite Numbers
Section 9.1 Groups.
Finite Mathematical Systems
Presentation transcript:

Section 9.3 Modular Arithmetic

What You Will Learn Upon completion of this section, you will be able to: Solve problems involving modulo m systems. Determine whether a mathematical system defined by a modulo m system is a commutative group.

Modular and Clock Arithmetic There is one difference in notation between clock 12 arithmetic and modulo 12 arithmetic. In the modulo 12 system, the symbol 12 is replaced with the symbol 0. The set of elements {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11} with the operation of addition is called a modulo 12 system or mod 12 system.

Modulo m System A modulo m system consists of m elements, { 0, 1, 2, 3, . . . , m – 1 } and a binary operation.

Modulo 7 Addition

Congruence a is congruent to b modulo m, written a ≡ b (mod m), if a and b have the same remainder when divided by m.

Modulo Classes In any modulo system, we can develop a set of modulo classes by placing all numbers with the same remainder in the appropriate modulo class. The solution to a problem in modular arithmetic, if it exists, will always be a number from 0 through m – 1, where m is the modulus of the system.

Modulo 7 Classes Every number is congruent to a number from 0 to 6 in modulo 7. For example, 24 ≡ 3 (mod 7) because 24 is in the same modulo class as 3.

Example 1: Congruence Modulo 7 Determine which number, from 0 to 6, the following numbers are congruent to in modulo 7. a) 60 b) 84 c) 412

Example 1: Congruence Modulo 7 Solution a) 60 ≡ ? (mod 7) Thus 60 ≡ 4 (mod 7).

Example 1: Congruence Module 7 Solution b) 84 ≡ ? (mod 7) 84 ÷ 7 = 12 remainder 0 Thus 84 ≡ 0 (mod 7). c) 412 ≡ ? (mod 7) 412 ÷ 7 = 58 remainder 6 Thus 412 ≡ 6 (mod 7).

Example 3: Using Modulo Classes in Subtraction Determine the positive number replacement (less than the modulus) for the question mark that makes the statement true. a) 3 – 5 ≡ ?(mod 7) b) ? – 4 ≡ 3(mod 5) c) 5 – ? ≡ 7(mod 8)

Example 3: Using Modulo Classes in Subtraction Solution a) In mod 7, adding 7, or a multiple of 7, to a number results in a sum that is in the same modulo class. We want to replace 3 with an equivalent mod 7 number that is greater than 5. We will add 7.

Example 3: Using Modulo Classes in Subtraction Solution a) 3 – 5 ≡ ? (mod 7) (3 + 7) – 5 ≡ ? (mod 7) 10 – 5 ≡ ? (mod 7) 5 ≡ ? (mod 7) 5 ≡ 5 (mod 7) Therefore, ? = 5 and 3 – 5 ≡ 5 (mod 7)

Example 3: Using Modulo Classes in Subtraction Solution b) We want to replace ? with a number less than 5. We need to determine what number, less than 5, the number 7 is congruent to in mod 5. If we subtract the modulus, 5, from 7, we obtain 2. Thus, 2 and 7 are in the same modular class. So, ? = 2.

Example 3: Using Modulo Classes in Subtraction Solution b) ? – 4 ≡ 3 (mod 5) 7 – 4 ≡ 3 (mod 5) 2 – 4 ≡ 3 (mod 5)

Example 3: Using Modulo Classes in Subtraction Solution c) In mod 8, adding 8, or a multiple of 8, to a number results in a sum that is in the same modulo class. Thus, we can add 8 to 5 so that the statement becomes

Example 3: Using Modulo Classes in Subtraction Solution c) (8 + 5) – ? ≡ 7 (mod 8) 13 – ? ≡ 7 (mod 8) We see that 13 – 6 = 7. Therefore, ? = 6 and 5 – 6 ≡ 7 (mod 8)

Example 4: Using Modulo Classes in Multiplication Determine the positive number replacement (less than the modulus) for the question mark that makes the statement true. a) 2 • ? ≡ 3(mod 5) b) 3 • ? ≡ 0(mod 6) c) 3 • ? ≡ 2(mod 6)

Example 4: Using Modulo Classes in Multiplication Solution a) One method of determining the solution is to replace the question mark with the numbers 0, 1, 2, 3, and 4 and then determine the equivalent modulo class of the product. We use the numbers 0–4 because we are working in modulo 5.

Example 4: Using Modulo Classes in Subtraction Solution a) 2 • ? ≡ 3 (mod 5) 2 • 0 ≡ 0 (mod 5) 2 • 1 ≡ 2 (mod 5) 2 • 2 ≡ 4 (mod 5) 2 • 3 ≡ 1 (mod 5) 2 • 4 ≡ 3 (mod 5) Therefore, ? = 4.

Example 4: Using Modulo Classes in Subtraction Solution b) 3 • ? ≡ 0 (mod 6) 3 • 0 ≡ 0 (mod 6) 3 • 1 ≡ 3 (mod 6) 3 • 2 ≡ 0 (mod 6) 3 • 3 ≡ 3 (mod 6) 3 • 4 ≡ 0 (mod 6) 3 • 5 ≡ 3 (mod 6) The answers are 0, 2, and 4.

Example 4: Using Modulo Classes in Subtraction Solution c) Examining the products in part (b) shows there are no values that satisfy the statement 3 • ? ≡ 2 (mod 6). The answer is “no solution.”

Modular Arithmetic and Groups Modular arithmetic systems under the operation of addition are commutative groups.