M ODULAR A RITHMETIC Lesson 4.6. This section, we are grouping numbers, based on their reminders. 18 ÷ 4 = 4 r. 2 22 ÷ 4 = 5 r. 2 78 ÷ 4 = 19 r. 2 These.

Slides:



Advertisements
Similar presentations
Mod arithmetic.
Advertisements

Year 10 ISA Controlled assessment Week starting March 4 th 2013.
Cryptography and Network Security
QA50BBME Country Code (2 digits) Security Code (2 digits) Bank Identifier Code (4 digits) Bank Account No.(21 digits) IBAN (29 digits)
Ch 4 Sec 2: Slide #1 Columbus State Community College Chapter 4 Section 2 Writing Fractions in Lowest Terms.
Computability and Complexity
Congruence class arithmetic. Definitions: a ≡ b mod m iff a mod m = b mod m. a  [b] iff a ≡ b mod m.
Announcements: Homework 1 returned. Comments from Kevin? Homework 1 returned. Comments from Kevin? Matlab: tutorial available at
What is the best way to start? 1.Plug in n = 1. 2.Factor 6n 2 + 5n Let n be an integer. 4.Let n be an odd integer. 5.Let 6n 2 + 5n + 4 be an odd.
Chapter 2 Parity checks Simple codes Modular arithmetic.
Mathematics of Cryptography Part I: Modular Arithmetic, Congruence,
Fall 2002CMSC Discrete Structures1 Let us get into… Number Theory.
Objective: Learn to test for divisibility.
BY MISS FARAH ADIBAH ADNAN IMK
CS1101: Programming Methodology Aaron Tan.
Mathematics of Cryptography Part I: Modular Arithmetic, Congruence,
Computer Science: A Structured Programming Approach Using C1 3-7 Sample Programs This section contains several programs that you should study for programming.
© by Kenneth H. Rosen, Discrete Mathematics & its Applications, Sixth Edition, Mc Graw-Hill, 2007 Chapter 3 (Part 2): The Fundamentals: Algorithms, the.
9/2/2015Discrete Structures1 Let us get into… Number Theory.
Section 8.5 Scientific Notation.
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.
Module :MA3036NI Cryptography and Number Theory Lecture Week 7
By: Hector L Contreras SSGT / USMC
Modular Arithmetic.
Mathematics Review Exponents Logarithms Series Modular arithmetic Proofs.
B ASIC P ROOF M ETHODS HWW Math Club Meeting #3 (October 18, 2010) Presentation by Julian Salazar.
Prelude to Public-Key Cryptography Rocky K. C. Chang, February
Ch 1.5: Basic Proof Methods II Proof by Contraposition of P => Q Suppose ~Q …proof details here…. Therefore, ~P (via a direct proof) Thus, ~Q => ~P. Therefore,
Modular Arithmetic, The Codabar System, and applications Tomás Cometto and Daniel Stokley Linear Systems 5/1/06.
Lecture 12.  The ISBN 10-digit uses a reverse weighting system: multiply the first digit by 10, the second by 9, the third by 8 and so on until the check.
Copyright © Curt Hill Divisibility and Modular Arithmetic A Topic in Number Theory.
Chapter 3 Elementary Number Theory and Methods of Proof.
Divisibility rules.
Lecture 11.   Modular arithmetic is arithmetic in which numbers do not continue forever.  Modulo 7 has numbers 0, 1, 2, 3, 4, 5, and 6.  Modulo 5.
Copyright © Zeph Grunschlag, Basic Number Theory Zeph Grunschlag.
Multiplication and Division Basic Facts
Introduction to Modern Algebra. In arithmetic, you learned four operations n n Addition n n Subtraction n n Multiplication n n Division.
Lesson 6-3 Example Example 2 Find the difference of –2 and –4. Use counters. 1.Write the subtraction expression. –2 – (–4)
Chinese Remainder Theorem Dec 29 Picture from ………………………
Chapter 2 (Part 1): The Fundamentals: Algorithms, the Integers & Matrices The Integers and Division (Section 2.4)
Elements of Coding and Encryption 1. Encryption In the modern word, it is crucial that the information is transmitted safely. For example, Internet purchases,
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.
Congruences (2/17) If m (the modulus) is positive and if a and b are integers, then we say a is congruent to b mod m, writing a  b (mod m), provided that.
Modular Arithmetic and the RSA Cryptosystem Great Theoretical Ideas In Computer Science John LaffertyCS Fall 2005 Lecture 9Sept 27, 2005Carnegie.
Monday, August 19, 2013 Write four terms of a pattern for each rule. a. odd numbers b. multiples of 4 c. multiples of 8.
5 Minute Check Write the integer that represents each situation and explain what zero would mean. Complete on your homework. 1. Three miles below sea level.
Basic Number Theory.
Discrete Mathematics 4. NUMBER THEORY Lecture 7 Dr.-Ing. Erwin Sitompul
Discrete Mathematics
MA/CSSE 473 Day 09 Modular Division Revisited Fermat's Little Theorem Primality Testing.
Part I: Numbers and Operations Lesson 1: Numbers.
1 Discrete Structures – CNS2300 Text Discrete Mathematics and Its Applications Kenneth H. Rosen (5 th Edition) Chapter 2 The Fundamentals: Algorithms,
EXAMPLE 3 Write an indirect proof Write an indirect proof that an odd number is not divisible by 4. GIVEN : x is an odd number. PROVE : x is not divisible.
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.
MA/CSSE 473 Day 07 Extended Euclid's Algorithm Modular Division Fermat's little theorem intro.
Dr Nazir A. Zafar Advanced Algorithms Analysis and Design Advanced Algorithms Analysis and Design By Dr. Nazir Ahmad Zafar.
Congruence class arithmetic
Modular Arithmetic Lesson 4.6.
Integers and Division Section 3.4.
Multiplication Inverse
Applied Discrete Mathematics Week 4: Number Theory
Modular Arithmetic II Lecture 10: Oct 6.
Modular Arithmetic and Change of Base
Section 10.3 Modular Arithmetic
Copyright © Zeph Grunschlag,
Miniconference on the Mathematics of Computation
Clements MAΘ October 30th, 2014
Section 9.3 Modular Arithmetic.
Presentation transcript:

M ODULAR A RITHMETIC Lesson 4.6

This section, we are grouping numbers, based on their reminders. 18 ÷ 4 = 4 r ÷ 4 = 5 r ÷ 4 = 19 r. 2 These are said to be in the same congruence class. 18 ≡ 22 (mod 4)  bc their remainders are the same

H OW MANY CONGRUENCE CLASSES ARE THERE IN MODULO 7? 77 ÷ 7 = 11 r ÷ 7 = 11 r ÷ 7 = 11 r ÷ 7 = 11 r ÷ 7 = 11 r ÷ 7 = 11 r ÷ 7 = 11 r ÷ 7 = 12 r. 0 R0R0 R0R0 R1R1 R2R2 R3R3 R4R4 R5R5 R6R6 77 ≡ 84 (mod 11) There are 7 congruence classes!

C ONGRUENCE T HEOREM For all integers a and b and all positive integers m, a ≡ b (mod m) iff m is a factor of a – b. ISBN and credit card check numbers are determined in some way by modular arithmetic.

F IND THE CONGRUENCE CLASSES MOD 7: In what class does 427 fall? 426 ≡ x (mod 7) 426 ÷ 7 = 60 r ≡ 6 (mod 7) R6R6 In what class does -17 fall? -17 ≡ y (mod 7) -17 ÷ 7 = -2 r. -3 but r cannot be negative! change to -3 r. 4 R4R4

E XAMPLE 3 Find the smallest positive value of n for which n – 32 ≡ 75 (mod 11) n ≡ 107 (mod 11) Congruence class of R 8 n = 8

E XAMPLE 4 If m ≡ 4 (mod 9) and n≡ 7(mod 9), what is the remainder when 5m + n 2 is divided by 9? 5m + n 2 ≡ ?? (mod 9) Plug in for n and m 5(4) = 69 5m + n 2 ≡ 69 (mod 9) 69 ÷ 9 = 7 r. 6 So, 6!

E XAMPLE 2 Use modular arithmetic to explain why a date that falls on Friday this year will fall on Wednesday four years from now. 365 days in a year + 1 leap year! 1461 days ÷ 7 days in a week = 208 weeks r. 5 Friday – r. 0Tuesday – r. 4 Sat. – r.1Wednesday – r. 5 Sun. – r.2Thursday – r. 6 Monday – r.3

E XAMPLE 5 The final digit of a 12-digit Universal Product Code (UPC) is a check digit. Suppose the digits of a UPS are represented by X 1 X 2 X 3 X 4 X 5 X 6 -X 7 X 8 X 9 X 10 X 11 X c To calculate the check digit X c, first compute 3(X 1 +X 3 +X 5 +X 7 +X 9 +X 11 ) + (X 2 +X 4 +X 6 +X 8 +X 10 ) (mod 10). If this number is zero, then X c =0, If not, subtract the number from 10. Determine the check digit of – ( ) + ( ) = 3(18) + (22) = 76 ÷ 10 = 7 r. 6 So X c =4

E XAMPLE 6 Prove by contradiction: With one exception, If n is a prime number, then n + 1 is not a prime number. Thought: Cannot be true, because if n is a prime number, it must be odd. Therefore, n + 1 is even.  Assume n + 1 IS a prime number. n ≡ 1 (mod 2) n + 1 ≡ 1 (mod 2) Subtracting one from both sides, n ≡ 0 (mod 2) CONTRADICTION!!! Therefore, n + 1 is not a prime number.

H OMEWORK Pages 261 – , 5-11, 19