Presentation is loading. Please wait.

Presentation is loading. Please wait.

Modular Arithmetic Created by previous Honors Pre- Calculus students.

Similar presentations


Presentation on theme: "Modular Arithmetic Created by previous Honors Pre- Calculus students."— Presentation transcript:

1 Modular Arithmetic Created by previous Honors Pre- Calculus students

2 Division Algorithm If a and b are integers where b > 0, There exist integers, q and r, with the property that: a = bq + r where 0 ≤ r < b. For example, if a = 17 and b = 5, 17 = 5∙3 +2. Thus, q = 3 & r = 2. r=2 is called the remainder.

3 Modular Arithmetic Modular arithmetic is an application of the division algorithm For example, if it’s now May, what month will it be 25 months from now?  You got an answer of June right?  You probably didn’t count did you? You observed, 25 = 2∙12 + 1  So you just added one month to the current month to get your answer of June.

4 Try a couple… 1. counting in hours - if it is 10:00 a.m. what time will it be 30 hours from now? 2. counting in days - if it is Wednesday what day of the week will it be 452 days from now? 3. counting degrees - if you are facing north and spin clockwise 810 degrees, which way are you facing?

5 Counting Answers 1. We are only interested in the fact that 30 is 6 more than 24 and that 10 (a.m.) plus 6 leaves a remainder of 4 when we take away 12. 4 pm 2. in the second case that 452 leaves a remainder of 4 when we take away multiples of 7 Sunday 3.810 leaves a remainder of 90 when we take away multiples of 360. East

6 Clock Arithmetic = Modular Arithmetic Click on the following link to see a visual demonstration of clock arithmetic or display of numbers mod 12. Check out the part about negative numbers! http://www.math.csusb.edu/faculty/susan/nu mber_bracelets/mod_arith.html http://www.math.csusb.edu/faculty/susan/nu mber_bracelets/mod_arith.html

7 Modular Arithmetic Continued… When a = qn + r, where q is the quotient and r is the remainder upon dividing a by n, we write: a mod n = rOR r = a modulo n n is the modulus. Sometimes r is called the residue For example:  17 mod 5 = 2 because 17 = 5∙3 + 2  35 mod 7 = 0 because 35 = 7∙5 + 0  29 mod 8 = 5because 29 = 8∙3 + 5

8 Notice… Notice that when you are modding by 12 your remainders (the answers) will be between 0 and 11. You will never get an answer of 12 because that means that you could have divided further. For example: 36 mod 12 = 0 (it goes in evenly)

9 Try a few on your own 1.8 mod 13 2.23 mod 11 3.46 mod 7 4.42 mod 3 5.58 mod 4 6.92 mod 15 7.27 mod 11 8.84 mod 5

10 Answers 1.8 mod 13 = 8 because 8 = 0∙13 + 8 2.23 mod 11 = 1 because 23 = 2∙11 + 1 3.46 mod 7 = 4 because 46 = 6∙7 + 4 4.42 mod 3 = 0 because 42 = 14∙3 + 0 5.31 mod 8 = 7 because 31 = 3∙8 + 7 6.92 mod 15 = 2 because 92 = 6∙15 + 2 7.27 mod 11 = 5 because 27 = 2∙11 + 5 8.84 mod 5 = 4 because 84 = 16∙5 + 4

11 And a few more… 1.)-5 mod 12 2.)-4 mod 10 3.)-15 mod 15 4.)-23 mod 8 5.)-28 mod 7 6.)-46 mod 4 7.)-50 mod 9 8.)-61 mod 3

12 And a few more… 1.)-5 mod 12= 7because -5 = 12∙ -1 + 7 2.)-4 mod 10 = 6because -4 = 10∙ -1 + 6 3.)-15 mod 15 = 0because -15 = 15∙ -1 + 0 4.)-23 mod 8 = 1because -23 = 8∙ -3 + 1 5.)-28 mod 7 = 0because -28 = 7∙ -4 + 0 6.)-46 mod 4 = 2because -46 = 4∙ -12 + 2 7.)-50 mod 9 = 4because -50 = 9∙ -6 + 4 8.)-61 mod 3 = 2because -61 = 3∙ -21 + 2

13 Congruences This idea of congruence was first developed by the mathematician Carl Friedrich Gauss in the late 18th century. a ≡ b if a = b mod n For example: 24 ≡ 9 mod 5 because 24 mod 5 = 4 and 9 mod 5 = 4

14 Good websites http://mathcentral.uregina.ca/QQ/database/Q Q.09.98/kupper1.html http://mathcentral.uregina.ca/QQ/database/Q Q.09.98/kupper1.html


Download ppt "Modular Arithmetic Created by previous Honors Pre- Calculus students."

Similar presentations


Ads by Google